安装iftop-ip实时带宽监控
  • 作者:sk55
  • 发表时间:2019-9-27 16:29
  • 来源:sk55

yum -y install wget flex byacc libpcap ncurses ncurses-devel libpcap-devel gcc

wget http://chao.kaiuu.cn/sh/iftop-0.17.tar.gz

tar zxvf iftop-0.17.tar.gz

cd iftop-0.17

./configure --prefix=/usr/local/iftop

make && make install

vi /etc/profile

然后里面最下面粘贴

PATH=$PATH:/usr/local/iftop/sbin
export PATH

按esc键 :wq

保存:然后运行这个代码 : source /etc/profile

网上的教程少gcc 导致编译不了
使用iftop 或这个命令启动 /usr/local/iftop/sbin/iftop
iftop -i eth1(网卡名) -n
TX:发送流量
RX:接收流量
TOTAL:总流量
Cumm:运行iftop到目前时间的总流量
peak:流量峰值
rates:分别表示过去 2s 10s 40s 的平均流量