iftop命令用法
[root@TEST ~]# iftop --help
iftop: unknown option --
iftop: display bandwidth usage on aninterface by host
Synopsis: iftop -h | [-npblNBP] [-iinterface] [-f filter code]
[-F net/mask][-G net6/mask6]
-h display thismessage #帮助信息
-n don't do hostname lookups #禁用主机解析,即不会出现IP显示域名
-N don't convertport numbers to services #以数字为示端口号,如21端口不会显示成ftp
-p run inpromiscuous mode (show traffic between other
hosts on the samenetwork segment)
-b don't displaya bar graph of traffic #以b单位显示
-B Displaybandwidth in bytes #以B单位显示
-iinterface listen on namedinterface #指定监听的网口
-ffilter code use filter code toselect packets to count
(default: none, but onlyIP packets are counted)
-Fnet/mask show traffic flowsin/out of IPv4 network #显示指定Ipv4段流量
-Gnet6/mask6 show traffic flowsin/out of IPv6 network #显示指定Ipv6段流量
-l display andcount link-local IPv6 traffic (default: off) #显示Ipv6的流量
-P show ports aswell as hosts #显示端口信息
-mlimit sets the upper limit forthe bandwidth scale
-cconfig file specifies an alternativeconfiguration file
-t use textinterface without ncurses #使用文本模式输出
Sorting orders:
-o2s Sort by first column(2s traffic average) #按2s平均流量列排序
-o10s Sort by second column(10s traffic average) [default] #按10s平均流量列排序
-o40s Sort by third column(40s traffic average) #按50s平均流量列排序
-osource Sort by source address #按源IP列排序
-odestination Sort by destinationaddress #按目的IP列排序
The following options are only available in combination with -t
-snum print one single textoutput afer num seconds, then quit #指定刷新几次。
-Lnum number of lines to print #显示多少行数据。当程序多流量大时,则要显示行数多些才行。
iftop, version 1.0pre4 #版本信息。
文本输出方法:
iftop -Pp -Nn -t -L 100 -s 1 >temp_file
直接查看输iftop 即可。
iftop详细用法见网上文档。
http://www.vpser.net/manage/iftop.html