NIC statistics explanation (ethtool -S eth1)

networkingstatistics

What is the meaning of each of the results from ethtool -S eth1 command?
For example, when I used ethtool -S eth1, I got something like this:

>root@localhost ~]# ethtool –S eth1

>NIC statistics:
tx_packets: 2654
rx_packets: 3960
tx_errors: 0
rx_errors: 316
rx_missed: 0
align_errors: 9194
tx_single_collisions: 0
tx_multi_collisions: 0
unicast: 3396
broadcast: 198
multicast: 366
tx_aborted: 0
tx_underrun: 0

Is it correct that tx_packets, rx_packets – are transmitted and received packets? But what with the rest of the results?

Best Answer

tx_packets:           Trasmitted packets
rx_packets:           Received packets
tx_errors:            Trasmission errors
rx_errors:            Received errors
rx_missed:            Recieved misses
align_errors:         Received alignment errors
tx_single_collisions: Trasmitted singular collisions
tx_multi_collisions:  Trasmitted multiple collisions
unicast:              Received unicast
broadcast:            Received broadcast
multicast:            Recieved multicast
tx_aborted:           Aborted trasmissions
tx_underrun:          Aborted underruns

For a better understanding of the terminology:

An underrun error on an ethernet is a transmission error. The way most ethernet chips transmit packets is that they DMA packet data from memory into their internal transmit fifo for sending. They do not ususally load the entire packet into the fifo before transmitting (some may have fifos smaller than the max. pkt size), so they go grab the data as they need it - there is usually a low-water mark in the fifo which triggers this. A transmit fifo underrun will occur if the ethernet chip cannot obtain the local bus in order to get more packet data for the fifo, and the fifo becomes empty before the end of the packet has been reached.

https://www.mail-archive.com/cisco@groupstudy.com/msg70531.html

multicast - imagine trying to communicate from one system to a select number of others broadcast - imagine trying to communicate from one system to all other systems collision - imagine what will happen when two system are trying to communicate with one another simultaneously they end up blocking one another alignment - imagine you can only communicate in specific units. Words of 4 characters at a time only. If there is a mis-alignment of characters systems can't communicate with one another. It's the same here.

http://www.networkcomputing.com/netdesign/t15errors.html

If you're interested, it may be worth taking a look at the following.

http://www.cs.fsu.edu/~baker/devices/lxr/http/source/linux/drivers/net/sfc/ethtool.c

Related Question