1.yum安装nethogs的依赖包
yum install libpcap libpcap-devel -y
2.下载编译安装nethogs
wget http://sourceforge.net/projects/nethogs/files/latest/download?source=filestar zxf nethogs-0.8.0.tar.gz cd nethogsmake && make install默认安装路径在/usr/local/sbin/nethogs
3.运行
/usr/local/sbin/nethogs
按q退出
常用参数: [-d seconds] [device(s)]
-d seconds 指定数据刷新时间
device(s) 指定监控的网卡,默认是监控 eth0