Linux – How to find network latency for network interfaces using SAR on linux environment

linuxsar

I want to get the network latency for network interfaces using SAR on linux environment.
sar -n command provides following output:

10:00:13 AM  IFACE   rxpck/s   txpck/s    rxkB/s    txkB/s   rxcmp/s   txcmp/s  rxmcst/s
10:00:14 AM   lo      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10:00:14 AM   eth0    0.00      0.00      0.00      0.00      0.00      0.00      0.00
10:00:14 AM   eth1    0.00      0.00      0.00      0.00      0.00      0.00      0.00

Best Answer

You can't. SAR takes readings of your system, but, per definition, network latency only exists between two systems. So you have to define a start and end point, and then figure out the best way to collect latency information. This could be ping, or other means if one or both of the systems don't handle ICMP well (for example big routers with linecards).