admin 管理员组

文章数量: 1184232

netstat

          netstat -i和netstat -s平时感觉不是经常用到,有点陌生,学习一下。

netstat -i 打印网络接口信息

[root@localhost ~]# netstat -i
Kernel Interface table
Iface      MTU    RX-OK RX-ERR RX-DRP RX-OVR    TX-OK TX-ERR TX-DRP TX-OVR Flg
ens33     1500     2114      0      0 0           909      0      0      0 BMRU
lo       65536        0      0      0 0             0      0      0      0 LRU

Iface:网络接口名称

MTU:最大传输单元

RX-OK:接收时,正确的数据包数

RX-ERR:接收时,产生错误的数据包数

RX-DRP:接收时,丢弃的数据包数

RX-OVR:接收时,由于过速而丢失的数据包数

TX-OK:发送时,正确的数据包数

TX-ERR:发送时,产生错误的数据包数

TX-DRP:发送时,丢弃的数据包数

TX-OVR:发送时,由于过速而丢失的数据包数

Flg:标志

         B  已经设置了一个广播地址

         L 该接口是一个回送设备

         M 接收所有的数据包(混乱模式)

         N 避免跟踪

         O 在该接口上,禁用ARP

         P 这是一个点到点连接

         R 接口正在运行

         U 接口处于"活动"状态

netstat -s  按照各个协议分别显示其统计数据

[root@localhost ~]# netstat -s
Ip:1943 total packets received0 forwarded0 incoming packets discarded1103 incoming packets delivered835 requests sent out16 dropped because of missing route
Icmp:1 ICMP messages received1 input ICMP message failed.ICMP input histogram:echo requests: 16 ICMP messages sent0 ICMP messages failedICMP output histogram:destination unreachable: 6
IcmpMsg:InType8: 1OutType3: 6
Tcp:1 active connections openings1 passive connection openings0 failed connection attempts1 connection resets received1 connections established959 segments received673 segments send out0 segments retransmited0 bad segments received.0 resets sent
Udp:143 packets received0 packets to unknown port received.0 packet receive errors156 packets sent0 receive buffer errors0 send buffer errors
UdpLite:
TcpExt:5 delayed acks sent1 packets directly queued to recvmsg prequeue.1 bytes directly received in process context from prequeue865 packet headers predicted24 acknowledgments not containing data payload received41 predicted acknowledgmentsTCPRcvCoalesce: 15TCPOrigDataSent: 72
IpExt:InNoRoutes: 3InMcastPkts: 22InBcastPkts: 365InOctets: 1157801OutOctets: 55171InMcastOctets: 704InBcastOctets: 51754InNoECTPkts: 1943

 

本文标签: netstat