December 19 2014

linux sar

用来查看网络使用和流量

sar -n DEV 5 2

Usage: sar [ options ] [ <interval> [ <count> ] ]
Options are:
[ -A ] [ -b ] [ -B ] [ -C ] [ -d ] [ -h ] [ -m ] [ -p ] [ -q ] [ -r ] [ -R ]
[ -S ] [ -t ] [ -u [ ALL ] ] [ -v ] [ -V ] [ -w ] [ -W ] [ -y ]
[ -I { <int> [,…] | SUM | ALL | XALL } ] [ -P { <cpu> [,…] | ALL } ]
[ -j { ID | LABEL | PATH | UUID | … } ] [ -n { <keyword> [,…] | ALL } ]
[ -o [ <filename> ] | -f [ <filename> ] ] [ –legacy ]
[ -i <interval> ] [ -s [ <hh:mm:ss> ] ] [ -e [ <hh:mm:ss> ] ]

命令后面 5 2 意思是:每5秒钟取一次值,取2次。
IFACE:LAN接口
rxpck/s:每秒钟接收的数据包
txpck/s:每秒钟发送的数据包
rxbyt/s:每秒钟接收的字节数
txbyt/s:每秒钟发送的字节数
rxcmp/s:每秒钟接收的压缩数据包
txcmp/s:每秒钟发送的压缩数据包
rxmcst/s:每秒钟接收的多播数据包



Copyright 2019. All rights reserved.

Posted 2014年12月19日 by ucjmh in category "linux

Leave a Reply

Your email address will not be published. Required fields are marked *