0

Linux has the ability to display protocol statistics with netstat -s. The output looks something like:

Excerpt:

7487 times unabled to send RST due to no memory
TCPDSACKIgnoredOld: 817
TCPDSACKIgnoredNoUndo: 7246527
TCPSpuriousRTOs: 4583587
TCPSackShifted: 15825
TCPSackMerged: 455582

But these are accumulated over all networking interfaces. Is there a way to see these statistics per interface? I know that there are packet level statistics in /sys/class/net/$INTERFACE/statistics, but have not been able to find any protocol related ones.

1

Netstat -s is a more intuitive display of /proc/net/netstat. Counters in it are global and not per interface. To get that kind of information you will need to use/write a monitoring tool using libpcap.

| improve this answer | |
  • I am aware of it. But as that file isn't necessarily the full extent of statistics that are being kept, I was hoping for something else. Libpcap has too great of an overhead/will not keep up with the data rate, so that solution is out. – data Dec 15 '14 at 18:07
0

The code which captures these statistics is called in the various related TCP/UDP/IP codepaths and increments SNMP MIBs.

There is no information stored about interface or any connection properties like port or IP, it's only a basic counter of the times that codepath has been entered.

netstat -s just reads those counters.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.