一.添加yum源方便安装bmon
(%$$#^32267*&%2)我型我塑www.5x54.com # rpm -Uhv http://apt.sw.be/redhat/el5/en/x ... 1.el5.rf.x86_64.rpm
(%$$#^32267*&%2)我型我塑www.5x54.com # yum install bmon
(%$$#^32267*&%2)我型我塑www.5x54.com - bandwidth monitor
(%$$#^32267*&%2)我型我塑www.5x54.com 可以在 shell 下监控网络流量的状况( 具有动态效果 )
(%$$#^32267*&%2)我型我塑www.5x54.com RX: 流进
(%$$#^32267*&%2)我型我塑www.5x54.com TX: 流出
(%$$#^32267*&%2)我型我塑www.5x54.com 安装成功后输入bmon命令后(%$$#^32267*&%2)我型我塑www.5x54.com,选择eth0按g,按d。查看效果如如下:
(%$$#^32267*&%2)我型我塑www.5x54.com #bmon
(%$$#^32267*&%2)我型我塑www.5x54.com
(%$$#^32267*&%2)我型我塑www.5x54.com 以基本的方式查看:
(%$$#^32267*&%2)我型我塑www.5x54.com #bmon -o ascii -p eth0
(%$$#^32267*&%2)我型我塑www.5x54.com
(%$$#^32267*&%2)我型我塑www.5x54.com linuxtone补充:
(%$$#^32267*&%2)我型我塑www.5x54.com 再介绍两个查看网络状况的软件:
(%$$#^32267*&%2)我型我塑www.5x54.com # yum install nload
(%$$#^32267*&%2)我型我塑www.5x54.com
(%$$#^32267*&%2)我型我塑www.5x54.com nload默认分为上下两块:
(%$$#^32267*&%2)我型我塑www.5x54.com 上半部分是:Incoming也就是进入网卡的流量(%$$#^32267*&%2)我型我塑www.5x54.com,
(%$$#^32267*&%2)我型我塑www.5x54.com 下半部分是:Outgoing(%$$#^32267*&%2)我型我塑www.5x54.com,也就是从这块网卡出去的流量(%$$#^32267*&%2)我型我塑www.5x54.com,
(%$$#^32267*&%2)我型我塑www.5x54.com 每部分都有当前流量(Curr)(%$$#^32267*&%2)我型我塑www.5x54.com,平均流量(Avg)(%$$#^32267*&%2)我型我塑www.5x54.com,最小流量(Min)(%$$#^32267*&%2)我型我塑www.5x54.com,最大流量(Max)(%$$#^32267*&%2)我型我塑www.5x54.com,总和流量(Ttl)这几个部分(%$$#^32267*&%2)我型我塑www.5x54.com,
(%$$#^32267*&%2)我型我塑www.5x54.com 看起来还是蛮直观的。
(%$$#^32267*&%2)我型我塑www.5x54.com #nload --help 查看具体用法
(%$$#^32267*&%2)我型我塑www.5x54.com 2.iftop
(%$$#^32267*&%2)我型我塑www.5x54.com # yum install iftop
(%$$#^32267*&%2)我型我塑www.5x54.com # iftop -i eth0
(%$$#^32267*&%2)我型我塑www.5x54.com
(%$$#^32267*&%2)我型我塑www.5x54.com TX:发送流量
(%$$#^32267*&%2)我型我塑www.5x54.com RX:接收流量
(%$$#^32267*&%2)我型我塑www.5x54.com TOTAL:总流量
(%$$#^32267*&%2)我型我塑www.5x54.com Cumm:运行iftop到目前时间的总流量
(%$$#^32267*&%2)我型我塑www.5x54.com peak:流量峰值
(%$$#^32267*&%2)我型我塑www.5x54.com rates:分别表示过去 2s 10s 40s 的平均流量
(%$$#^32267*&%2)我型我塑www.5x54.com #iftop -i eth0 -n 就可以看到eth0网卡的流量状况:
(%$$#^32267*&%2)我型我塑www.5x54.com iftop 相关命令 :
(%$$#^32267*&%2)我型我塑www.5x54.com 监控eth1的网卡的流量
(%$$#^32267*&%2)我型我塑www.5x54.com # iftop -i eth1
(%$$#^32267*&%2)我型我塑www.5x54.com 以位元组(bytes)为单位显示流量(预设是位元bits):
(%$$#^32267*&%2)我型我塑www.5x54.com $ iftop -B
(%$$#^32267*&%2)我型我塑www.5x54.com 直接显示IP, 不进行DNS反解:
(%$$#^32267*&%2)我型我塑www.5x54.com $ iftop -n
(%$$#^32267*&%2)我型我塑www.5x54.com 直接显示连接埠编号, 不显示服务名称:
(%$$#^32267*&%2)我型我塑www.5x54.com $ iftop -N
(%$$#^32267*&%2)我型我塑www.5x54.com 显示某个网段进出封包流量
(%$$#^32267*&%2)我型我塑www.5x54.com $ iftop -F 192.168.1.0/24 or 192.168.1.0/255.255.255.0
(%$$#^32267*&%2)我型我塑www.5x54.com 其他参数可下 iftop -h 看说明.
(%$$#^32267*&%2)我型我塑www.5x54.com 进入iftop画面时, 可按 p 切换是否显示连接埠, n 切换显示IP或主机的domain name, N切换显
(%$$#^32267*&%2)我型我塑www.5x54.com 示连接埠代号或名称, p暂停显示, b切换是否显示长条, B切换计算几秒内的平均流量, 其他按键
(%$$#^32267*&%2)我型我塑www.5x54.com 可以按h观看说明.
|