netstat

netstat

爷,独闯天下 提交于 2019-11-28 01:08:23
Netstat 是一款命令行工具,可用于列出系统上所有的网络套接字连接情况,包括 tcp, udp 以及 unix 套接字,另外它还能列出处于监听状态(即等待接入请求)的套接字。如果你想确认系统上的 Web 服务有没有起来,你可以查看80端口有没有打开。 列出所有当前的连接。使用 -a 选项 一个要介绍的,是最简单的命令:列出所有当前的连接。使用 -a 选项即可。 $ netstat - a Active Internet connections ( servers and established ) Proto Recv - Q Send - Q Local Address Foreign Address State tcp 0 0 enlightened : domain *:* LISTEN tcp 0 0 localhost : ipp *:* LISTEN tcp 0 0 enlightened . local : 54750 li240 - 5.members . li : http ESTABLISHED tcp 0 0 enlightened . local : 49980 del01s07 - in - f14 . 1 : https ESTABLISHED tcp6 0 0 ip6 - localhost : ipp [::]:* LISTEN udp 0 0

netstat

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-28 01:08:04
-a 所有端口 -t tcp,有监听的状态 -u udp -n 数字方式显示 -l 显示监控中的服务器的socket -p 程序 netstat -autn Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 127.* 0.0.0.0:* LISTEN tcp 0 0 10.* 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:8281 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:8379 0.0.0.0:* LISTEN 1. netstat -antp |grep 9989 tcp6 0 0 :::9989 :::* LISTEN - tcp6 0 0 10.*************************************62301 ESTABLISHED - tcp6 0 0 10.*************************************62300 ESTABLISHED - 2. netstat -ntp |grep 9989 tcp6 0 0 10.*************************************62301 ESTABLISHED - tcp6 0 0 10.***********************

netstat

為{幸葍}努か 提交于 2019-11-28 01:07:50
netstat命令用于显示与IP、TCP、UDP和ICMP协议相关的统计数据,一般用于检验本机各端口的网络连接情况。netstat是在内核中访问网络及相关信息的程序,它能提供TCP连接,TCP和UDP监听,进程内存管理的相关报告。 netstat输出结果分析 说明: 从整体上看,netstat的输出结果可以分为两个部分: 一个是Active Internet connections,称为有源TCP连接,其中"Recv-Q"和"Send-Q"指的是接收队列和发送队列。这些数字一般都应该是0。如果不是则表示软件包正在队列中堆积。这种情况只能在非常少的情况见到。 另一个是Active UNIX domain sockets,称为有源Unix域套接口(和网络套接字一样,但是只能用于本机通信,性能可以提高一倍)。 Proto显示连接使用的协议,RefCnt表示连接到本套接口上的进程号,Types显示套接口的类型,State显示套接口当前的状态,Path表示连接到套接口的其它进程使用的路径名。 套接口类型: -t :TCP -u :UDP -raw :RAW类型 --unix :UNIX域类型 --ax25 :AX25类型 --ipx :ipx类型 --netrom :netrom类型 状态说明: LISTEN:侦听来自远方的TCP端口的连接请求 SYN-SENT

netstat命令详解

时光毁灭记忆、已成空白 提交于 2019-11-28 01:07:38
它主要的用法和详解! (netstat -na 命令),本文主要是说Linux下的netstat工具,然后详细说明一下各种网络连接状态。 netstat -nat |awk ‘{print $6}’|sort|uniq -c|sort -nr 1.netstat命令详解 其实我常用的是 netstat -tnl | grep 443 (查看443端口是否被占用),如果有当前是root用户,我喜欢用netstat -pnl | grep 443 (还可显示出占用本机443端口的进程PID)。 netstat 功能说明:显示网络状态。 语  法:netstat [-acCeFghilMnNoprstuvVwx] [-A<网络类型>][--ip] 补充说明:利用netstat指令可让你得知整个Linux系统的网络情况。 参  数: -a 或–all 显示所有连线中的Socket。 -A <网络类型>或–<网络类型> 列出该网络类型连线中的相关地址。 -c 或–continuous 持续列出网络状态。 -C 或–cache 显示路由器配置的快取信息。 -e 或–extend 显示网络其他相关信息。 -F 或 –fib 显示FIB。 -g 或–groups 显示多重广播功能群组组员名单。 -h 或–help 在线帮助。 -i 或–interfaces 显示网络界面信息表单。 -l 或

Linux netstat命令详解

别说谁变了你拦得住时间么 提交于 2019-11-28 01:07:26
简介 Netstat 命令用于显示各种网络相关信息,如网络连接,路由表,接口状态 (Interface Statistics),masquerade 连接,多播成员 (Multicast Memberships) 等等。 输出信息含义 执行netstat后,其输出结果为 Active Internet connections (w/o servers)Proto Recv-Q Send-Q Local Address Foreign Address Statetcp 0 2 210.34.6.89:telnet 210.34.6.96:2873 ESTABLISHEDtcp 296 0 210.34.6.89:1165 210.34.6.84:netbios-ssn ESTABLISHEDtcp 0 0 localhost.localdom:9001 localhost.localdom:1162 ESTABLISHEDtcp 0 0 localhost.localdom:1162 localhost.localdom:9001 ESTABLISHEDtcp 0 80 210.34.6.89:1161 210.34.6.10:netbios-ssn CLOSEActive UNIX domain sockets (w/o servers)Proto RefCnt Flags

Linux基础命令:netstat

巧了我就是萌 提交于 2019-11-28 00:13:50
简介 Netstat 命令用于显示各种网络相关信息,如网络连接,路由表,接口状态 (Interface Statistics),masquerade 连接,多播成员 (Multicast Memberships) 等等。 输出信息含义 执行netstat后,其输出结果为 Active Internet connections (w/o servers)Proto Recv-Q Send-Q Local Address Foreign Address Statetcp 0 2 210.34.6.89:telnet 210.34.6.96:2873 ESTABLISHEDtcp 296 0 210.34.6.89:1165 210.34.6.84:netbios-ssn ESTABLISHEDtcp 0 0 localhost.localdom:9001 localhost.localdom:1162 ESTABLISHEDtcp 0 0 localhost.localdom:1162 localhost.localdom:9001 ESTABLISHEDtcp 0 80 210.34.6.89:1161 210.34.6.10:netbios-ssn CLOSEActive UNIX domain sockets (w/o servers)Proto RefCnt Flags

When using Docker, ESTABLISHED connections don't appear in netstat

試著忘記壹切 提交于 2019-11-27 23:44:20
问题 I have a docker container running on RHEL 7 with Docker 1.7.0. The program which running in this container listens for TCP connections on port 5000. In my Dockerfile I put the sentence EXPOSE 5000 and I run the container with the following command: docker run \ --name myProgram \ --detach \ --publish 5000:5000 \ --volume /home/docker/apps/myProgram/logs:/var/log/myProgram/ \ --volume /home/docker/apps/myProgram/conf:/usr/local/snnotificationreceiver/conf/ \ --restart always \ 10.167.152.15

linux上一些常用的命令

半世苍凉 提交于 2019-11-27 21:51:50
1、时时查看tomcat启动信息,首先切换到tomcat的logs目录下 tail -f catalina.out 2、在tomcat的bin目录下启动无权限,需要赋权 chmod 777 *.sh 3、查看tomcat启动的信息 ps -ef|grep tomcat 4、PID杀死进程 kill -9 pid 5、开放端口 iptables -I INPUT -p tcp --dport 8080 -j ACCEPT 6、查看已开放端口 netstat -nupl (UDP类型的端口) netstat -ntpl (TCP类型的端口) 来源: https://www.cnblogs.com/sung1024/p/11379210.html

Use of Recv-Q and Send-Q

不问归期 提交于 2019-11-27 10:57:01
问题 What is the use of the Recv-Q and Send-Q columns in netstat's output? How do I use use this in a realistic scenario? On my system, both of the columns are always shown as zero. What is the meaning for that? 回答1: From my man page: Recv-Q Established: The count of bytes not copied by the user program connected to this socket. Listening: Since Kernel 2.6.18 this column contains the current syn backlog. Send-Q Established: The count of bytes not acknowledged by the remote host. Listening: Since

Starting apache fails (could not bind to address 0.0.0.0:80)

不羁的心 提交于 2019-11-27 09:10:20
问题 Update: Already fixed, it seems that one of VirtualHosts configurations files was wrong in sites-enabled. I have Ubuntu 11.10 When I run the command to start apache2: sudo /etc/init.d/apache2 start I get the following error message: Starting web server apache2 apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName (98)Address already in use: make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting down