2015-02-06 101 views

回答

0

如果你的平臺是Linux,SAR-Collect, report, or save system activity information.可以給你基於區間網絡狀態,你需要:

Linux:~$ sar -n DEV 1 
Linux 3.5.0-54-generic 02/06/2015 _x86_64_ (4 CPU) 
05:16:18 PM  IFACE rxpck/s txpck/s rxkB/s txkB/s rxcmp/s txcmp/s rxmcst/s 
05:16:19 PM  eth0  74.00  43.00  77.62  8.03  0.00  0.00  0.00 
05:16:19 PM  lo  0.00  0.00  0.00  0.00  0.00  0.00  0.00 
05:16:19 PM  wlan0  0.00  0.00  0.00  0.00  0.00  0.00  0.00 

05:16:19 PM  IFACE rxpck/s txpck/s rxkB/s txkB/s rxcmp/s txcmp/s rxmcst/s 
05:16:20 PM  eth0  32.00  9.00  4.78  3.45  0.00  0.00  0.00 
05:16:20 PM  lo  0.00  0.00  0.00  0.00  0.00  0.00  0.00 
05:16:20 PM  wlan0  0.00  0.00  0.00  0.00  0.00  0.00  0.00 
^C 

對於10秒的時間間隔:

Linux:~$ sar -n DEV 10 
Linux 3.5.0-54-generic 02/06/2015 _x86_64_ (4 CPU) 

05:16:36 PM  IFACE rxpck/s txpck/s rxkB/s txkB/s rxcmp/s txcmp/s rxmcst/s 
05:16:46 PM  eth0  50.80  24.30  54.90  2.79  0.00  0.00  0.00 
05:16:46 PM  lo  0.30  0.30  0.07  0.07  0.00  0.00  0.00 
05:16:46 PM  wlan0  0.00  0.00  0.00  0.00  0.00  0.00  0.00 

05:16:46 PM  IFACE rxpck/s txpck/s rxkB/s txkB/s rxcmp/s txcmp/s rxmcst/s 
05:16:56 PM  eth0  37.80  19.00  31.72  3.68  0.00  0.00  0.00 
05:16:56 PM  lo  0.50  0.50  0.12  0.12  0.00  0.00  0.00 
05:16:56 PM  wlan0  0.00  0.00  0.00  0.00  0.00  0.00  0.00 
^C 
相關問題