# netstat -s Ip: 6626695 total packets received 6625 with invalid addresses 0 forwarded 0 incoming packets discarded 5055725 incoming packets delivered 4377026 requests sent out 96 dropped because of missing route ... Tcp: 3196 active connections openings 1666 passive connection openings 382 failed connection attempts 39 connection resets received 22 connections established 5043080 segments received 4352432 segments send out 6833 segments retransmited 73 bad segments received. 443 resets sent Udp: 10653 packets received 80 packets to unknown port received. 0 packet receive errors 14349 packets sent ...
利用数字取代别名(主机、用户名),并加速输出所有网络连接信息
1 2 3 4 5 6 7 8 9 10 11 12 13 14
# netstat -n Active Internet connections (w/o servers) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 127.0.0.1:35206 127.0.0.1:6379 ESTABLISHED tcp 0 0 127.0.0.1:35286 127.0.0.1:6379 ESTABLISHED tcp 0 0 127.0.0.1:36227 127.0.0.1:6379 ESTABLISHED tcp 0 0 127.0.0.1:6379 127.0.0.1:36306 ESTABLISHED tcp 0 0 127.0.0.1:6379 127.0.0.1:35286 ESTABLISHED tcp 0 0 127.0.0.1:6379 127.0.0.1:36226 ESTABLISHED ...
# netstat -c 60 # 每隔60秒运行一次 Active Internet connections (w/o servers) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 localhost:35206 localhost:6379 ESTABLISHED tcp 0 0 localhost:35286 localhost:6379 ESTABLISHED tcp 0 0 localhost:36227 localhost:6379 ESTABLISHED tcp 0 0 localhost:6379 localhost:36306 ESTABLISHED ...
显示核心路由信息
1 2 3 4 5 6
# netstat -r Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 192.168.0.1 * 255.255.255.0 U 0 0 0 eth0 192.168.122.0 * 255.255.255.0 U 0 0 0 virbr0 default 192.168.0.1 0.0.0.0 UG 0 0 0 eth0