Sunday, May 20, 2012

Syntax to check NIC statistics using 'sar' command

This syntax checks the statistics of 'eth1' interface:
[root@hostxyz ~]# sar -n DEV -f /var/log/sa/sa15 -s 18:00:01 -e 23:01:01 | head -3 | tail -1 | sed 's/^.........../           /'; sar -n DEV -f /var/log/sa/sa15 -s 18:00:01 -e 23:01:01 | grep "eth1"
                      IFACE   rxpck/s   txpck/s   rxbyt/s   txbyt/s   rxcmp/s   txcmp/s  rxmcst/s
06:10:01 PM      eth1     20.54      0.02   2056.62      3.12      0.00      0.00      0.00
06:20:01 PM      eth1     26.11      0.01   2650.42      1.98      0.00      0.00      0.00
06:30:01 PM      eth1     17.03      0.01   1711.49      1.98      0.00      0.00      0.00
06:40:01 PM      eth1     10.40      0.01    972.02      1.60      0.00      0.00      0.00
06:50:01 PM      eth1     24.11      0.02   2426.33      2.74      0.00      0.00      0.00
07:00:01 PM      eth1     25.27      0.01   2554.85      1.87      0.00      0.00      0.00
07:10:01 PM      eth1     13.36      0.01   1312.31      1.98      0.00      0.00      0.00
07:20:01 PM      eth1     12.21      0.02   1175.69      3.12      0.00      0.00      0.00
07:30:01 PM      eth1     25.09      0.01   2566.25      1.98      0.00      0.00      0.00
07:40:01 PM      eth1     26.01      0.01   2612.24      1.60      0.00      0.00      0.00
07:50:01 PM      eth1    206.35    635.89  13526.21 947854.38      0.00      0.00      0.00
08:00:01 PM      eth1   1326.80   4410.98  80781.99 6673444.08      0.00      0.00      0.00
08:10:01 PM      eth1    796.86   2608.67  49050.73 3947034.38      0.00      0.00      0.00
08:20:01 PM      eth1    773.95   2411.76  47858.10 3649035.90      0.00      0.00      0.00
08:30:01 PM      eth1    798.65   2814.04  48448.94 4257857.47      0.00      0.00      0.00
08:40:01 PM      eth1 599122.53 1729538.33 3278958.93 585797.40      0.00      0.00      0.00
08:50:01 PM      eth1   1126.42   3821.02  68802.91 5781612.42      0.00      0.00      0.00
09:00:01 PM      eth1   1416.86   4984.36  85843.95 377147.69      0.00      0.00      0.00
09:10:01 PM      eth1    803.29   2777.80  48717.98 4202947.25      0.00      0.00      0.00
09:20:01 PM      eth1    129.55    352.83   8700.49 533737.74      0.00      0.00      0.00
09:30:01 PM      eth1     25.34      0.01   2581.83      1.98      0.00      0.00      0.00
09:40:01 PM      eth1     15.67      0.01   1523.95      1.79      0.00      0.00      0.00
09:50:01 PM      eth1     11.38      0.01   1066.06      1.60      0.00      0.00      0.00
10:00:01 PM      eth1     23.75      0.03   2366.47      3.01      0.00      0.00      0.00
10:10:01 PM      eth1     26.29      0.01   2679.49      1.98      0.00      0.00      0.00
10:20:01 PM      eth1     12.79      0.01   1241.40      1.98      0.00      0.00      0.00
10:30:01 PM      eth1     13.03      0.03   1273.22      3.12      0.00      0.00      0.00
10:40:01 PM      eth1     25.71      0.01   2586.43      1.60      0.00      0.00      0.00
10:50:01 PM      eth1     24.44      0.01   2448.89      1.60      0.00      0.00      0.00
11:00:01 PM      eth1     10.38      0.01    958.51      1.87      0.00      0.00      0.00
Average:         eth1    288.58    929.73  18156.03 212554.92      0.00      0.00      0.00
[root@hostxyz ~]#

No comments:

Post a Comment

Popular Posts

About Me

My photo
The intent of this blog is to share my work experience and spread some smart solutions on Linux to System Administrators. I'm hoping the solutions shared in this Blog would be helpful and come as a handy for Viewers. Brief about me: I have 18+ years work experience in System and Cloud Administration domain, primarily works on VMware Cloud Products (vSphere, vCloud Director, vRealize Automation, NSX Adv. Load Balancer, vROps).