linux之网络流量监控

ifstat是一个比较简单的查看网络流量的工具

常用的参数如下:

       -l  Enables monitoring of loopback interfaces for which statistics are available. By default, ifstat monitors all non-loopback interfaces that are up.

 

       -a  Enables monitoring of all interfaces found for which statistics are available.

 

       -z  Hides interface which counters are null, eg interfaces that are up but not used.

 

       -i  Specifies the list of interfaces to monitor, separated by commas (if an interface name has a comma, it can be escaped with '\'). Multiple instances

           of the options are added together.

 

       -s  Equivalent to -d snmp:[comm@][#]host[/nn]] to poll a remote host through SNMP. See below for details.

 

       -h  Displays a short help message.

 

       -n  Turns off displaying the header periodically.

 

       -t  Adds a timestamp at the beginning of each line.

 

       -T  Reports total bandwith for all monitored interfaces.

 

       -A  Disables use of interface indexes: by default, when polling mechanism is index based (snmp, ifmib), ifstat remembers indexes of monitored inter-

           faces to poll only them. However, if interfaces indexes change often (new interfaces added, etc), you might loose some stats, hence this flag. Note

           that if you ask ifstat to monitor a non existent interface, it will poll all interfaces until it finds the requested one (regardless of this flag)

           so you can poll for an interface that goes up and down.

 

       -w  Uses fixed width columns, instead of enlarging them if needed for interfaces names to fit.

 

       -W  Wrap lines that are larger than the terminal width (implies -w). Wrapped lines are prefixed with a cycling letter to ease reading.

 

       -S  Keep stats updated on the same line if possible (no scrolling nor wrapping).

 

       -b  Reports bandwith in kbits/sec instead of kbytes/sec.

 

       -q  Quiet mode, warnings are not printed.

 

       -v  Displays version and the compiled-in drivers.

常用:

ifstat -TS

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值