ethtool 有一个参数可以查看网卡收发包的统计信息:
ethtool -S eth0 // 这样就可以查看网卡的收发包的信息,并会看到是不是一些相关的error包
结果如下:
NIC statistics:
rx_bytes: 884421533120
rx_error_bytes: 0
tx_bytes: 7174323033878
tx_error_bytes: 0
rx_ucast_packets: 6437174450
rx_mcast_packets: 0
rx_bcast_packets: 2992368
tx_ucast_packets: 7288180680
tx_mcast_packets: 6
tx_bcast_packets: 20
tx_mac_errors: 0
tx_carrier_errors: 0
rx_crc_errors: 0
rx_align_errors: 0
tx_single_collisions: 0
tx_multi_collisions: 0
tx_deferred: 0
tx_excess_collisions: 0
tx_late_collisions: 0
tx_total_collisions: 0
rx_fragments: 0
rx_jabbers: 0
rx_undersize_packets: 0
rx_oversize_packets: 0
rx_64_byte_packets: 4075086918
rx_65_to_127_byte_packets: 1081126012
rx_128_to_255_byte_packets: 6106330
rx_256_to_511_byte_packets: 1174390761
rx_512_to_1023_byte_packets: 86691884
rx_1024_to_1522_byte_packets: 16764913
rx_1523_to_9022_byte_packets: 0
tx_64_byte_packets: 1167805414
tx_65_to_127_byte_packets: 692803654
tx_128_to_255_byte_packets: 141127432
tx_256_to_511_byte_packets: 296572194
tx_512_to_1023_byte_packets: 534084637
tx_1024_to_1522_byte_packets: 160820079
tx_1523_to_9022_byte_packets: 0
rx_xon_frames: 0
rx_xoff_frames: 0
tx_xon_frames: 0
tx_xoff_frames: 0
rx_mac_ctrl_frames: 0
rx_filtered_packets: 9732685
rx_discards: 0
rx_fw_discards: 310
我们关注的是error相关的项,所以可以使用这个命令来看error的项:
ethtool -S eth0 |grep error
rx_error_bytes: 0
tx_error_bytes: 0
tx_mac_errors: 0
tx_carrier_errors: 0
rx_crc_errors: 0
rx_align_errors: 0
如果这几项有非零的,就需要注意了。
ethtool -S eth0 // 这样就可以查看网卡的收发包的信息,并会看到是不是一些相关的error包
结果如下:
NIC statistics:
rx_bytes: 884421533120
rx_error_bytes: 0
tx_bytes: 7174323033878
tx_error_bytes: 0
rx_ucast_packets: 6437174450
rx_mcast_packets: 0
rx_bcast_packets: 2992368
tx_ucast_packets: 7288180680
tx_mcast_packets: 6
tx_bcast_packets: 20
tx_mac_errors: 0
tx_carrier_errors: 0
rx_crc_errors: 0
rx_align_errors: 0
tx_single_collisions: 0
tx_multi_collisions: 0
tx_deferred: 0
tx_excess_collisions: 0
tx_late_collisions: 0
tx_total_collisions: 0
rx_fragments: 0
rx_jabbers: 0
rx_undersize_packets: 0
rx_oversize_packets: 0
rx_64_byte_packets: 4075086918
rx_65_to_127_byte_packets: 1081126012
rx_128_to_255_byte_packets: 6106330
rx_256_to_511_byte_packets: 1174390761
rx_512_to_1023_byte_packets: 86691884
rx_1024_to_1522_byte_packets: 16764913
rx_1523_to_9022_byte_packets: 0
tx_64_byte_packets: 1167805414
tx_65_to_127_byte_packets: 692803654
tx_128_to_255_byte_packets: 141127432
tx_256_to_511_byte_packets: 296572194
tx_512_to_1023_byte_packets: 534084637
tx_1024_to_1522_byte_packets: 160820079
tx_1523_to_9022_byte_packets: 0
rx_xon_frames: 0
rx_xoff_frames: 0
tx_xon_frames: 0
tx_xoff_frames: 0
rx_mac_ctrl_frames: 0
rx_filtered_packets: 9732685
rx_discards: 0
rx_fw_discards: 310
我们关注的是error相关的项,所以可以使用这个命令来看error的项:
ethtool -S eth0 |grep error
rx_error_bytes: 0
tx_error_bytes: 0
tx_mac_errors: 0
tx_carrier_errors: 0
rx_crc_errors: 0
rx_align_errors: 0
如果这几项有非零的,就需要注意了。
编辑回复