Skip to content
Advertisement

Can ethtool provide the current incoming bitrate on a NIC

Is there an option in linux’s ethtool command that retrieves the current incoming bitrate or packets-per-second straight from the NIC?

Advertisement

Answer

Not per packets-per-second, but overall RX/TX. You could write a script around it:

ethtool -S <interface>

For example currently on my wifi nice:

JavaScript

The same information could be extracted from:

  • /sys/class/net//statistics/rx_packets: number of packets received
  • /sys/class/net//statistics/tx_packets: number of packets transmitted
  • /sys/class/net//statistics/rx_bytes: number of bytes received
  • /sys/class/net//statistics/tx_bytes: number of bytes transmitted
  • /sys/class/net//statistics/rx_dropped: number of packets dropped while received
  • /sys/class/net//statistics/tx_dropped: number of packets dropped while transmitted

Also see superuser.com for a specific real time solution.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement