netstat - Print network connections, routing tables, interface statistics, masquerade connections, and multicast memberships
netstat
—interfaces, -i Display a table of all network interfaces.
netstat -i Kernel Interface table Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg eth0 1500 0 121662 0 0 0 2058 0 0 0 BMRU lo 16436 0 8 0 0 0 8 0 0 0 LRU
Iface: Interface
link-layer: MTU: 最大传输单元 in byte
RX-OK/TX-OK: 正确传输了多少数据包: RX-ERR/TX-ERR: 错误 RX-DRP/TX-DRP: 丢弃 RX-OVR/TX-OVR: 误差
以上各值如果不为0并且很大,网络质量有问题, 1. 查看网卡设备故障 2. 检查网络部署 3. 升级千兆网卡和光纤网络。
Flg:
如果网络异常,首先需要监测路由表:
justin@Justin:~/projects/linux/gst-plugins$ netstat -r Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 10.194.44.0 * 255.255.254.0 U 0 0 0 eth0 default gateway10-194-4 0.0.0.0 UG 0 0 0 eth0
和 sudo route
输出相同