linux sar查看网络流量

时间:2022-03-27 15:28:26
sar -n DEV 1 10
-n { keyword [,...] | ALL }
Report network statistics. IFACE
Name of the network interface for which statistics are reported. rxpck/s
Total number of packets received per second. txpck/s
Total number of packets transmitted per second. rxkB/s
Total number of kilobytes received per second. txkB/s
Total number of kilobytes transmitted per second. rxcmp/s
Number of compressed packets received per second (for cslip etc.). txcmp/s
Number of compressed packets transmitted per second. rxmcst/s
Number of multicast packets received per second. [oracle@dwhtest ~]$ sar -n DEV 1 10
Linux 2.6.32-220.el6.x86_64 (dwhtest) 05/21/2014 _x86_64_ (24 CPU) 03:41:25 PM IFACE rxpck/s txpck/s rxkB/s txkB/s rxcmp/s txcmp/s rxmcst/s
03:41:26 PM lo 3.96 3.96 0.23 0.23 0.00 0.00 0.00
03:41:26 PM em1 2.97 1.98 0.31 0.27 0.00 0.00 0.00
03:41:26 PM em2 0.00 0.00 0.00 0.00 0.00 0.00 0.00 03:41:26 PM IFACE rxpck/s txpck/s rxkB/s txkB/s rxcmp/s txcmp/s rxmcst/s
03:41:27 PM lo 0.00 0.00 0.00 0.00 0.00 0.00 0.00
03:41:27 PM em1 1.04 1.04 0.07 0.49 0.00 0.00 0.00
03:41:27 PM em2 0.00 0.00 0.00 0.00 0.00 0.00 0.00 03:41:27 PM IFACE rxpck/s txpck/s rxkB/s txkB/s rxcmp/s txcmp/s rxmcst/s
03:41:28 PM lo 5.88 5.88 0.28 0.28 0.00 0.00 0.00
03:41:28 PM em1 1.96 1.96 0.23 0.52 0.00 0.00 0.00
03:41:28 PM em2 0.00 0.00 0.00 0.00 0.00 0.00 0.00 03:41:28 PM IFACE rxpck/s txpck/s rxkB/s txkB/s rxcmp/s txcmp/s rxmcst/s
03:41:29 PM lo 0.00 0.00 0.00 0.00 0.00 0.00 0.00
03:41:29 PM em1 2.00 1.00 0.16 0.47 0.00 0.00 0.00
03:41:29 PM em2 0.00 0.00 0.00 0.00 0.00 0.00 0.00 03:41:29 PM IFACE rxpck/s txpck/s rxkB/s txkB/s rxcmp/s txcmp/s rxmcst/s
03:41:30 PM lo 0.00 0.00 0.00 0.00 0.00 0.00 0.00
03:41:30 PM em1 1.98 0.99 0.15 0.46 0.00 0.00 0.00
03:41:30 PM em2 0.00 0.00 0.00 0.00 0.00 0.00 0.00