rx_packets are much larger than
rx_pkts_nic. Why is this the case?
Is there a doc somewhere with explanation of all the NIC stat fields?
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.Sign up to join this community
The output of
ethtool -S is a driver specific. Seems like you use some intel NIC.
Likely you have enabled some offload (
GRO - Generic Receive Offload,
LRO - Large Receive Offload). You can check the output of
ethtool -k <iface>.
In this case several received packets (counted by
rx_pkts_nic) are merged in a single bigger packet (counted by
rx_packets). And only then this big single packet is passed into the system network stack.
Unfortunately I don't know the complete documentation with detailed description of various NIC counters. Most of them have intuitive names, but not all. Some of them you can try to understand with the linux kernel mail list messages. Also you can try to write to the mail lists to ask the meanings.
I've looked into the source code of the driver and have found some interesting things.
rx_packets counter value is received from statistics of the network device in the system, not from hardware. This value is counted as sum of packets from all NIC queues. This value also includes a bad packets.
rx_pkts_nic is received from the hardware, but also it is decremented by
rx_missed value. Seems like this value includes only good packets (real name of this counter is
gprc, that means
good packets received count).
So, if you have a difference between
rx_pkts_nic, check the error counters.
Good thing for investigation of NIC statistics counters is the
ethtool --register-dump <iface> command.