My environment is centos6.5 x64 bit.
1, install the Nethogs dependency package
Yum Install Libpcap Libpcap-devel
2, then go to ftp://ftp.muug.mb.ca/mirror/fedora/epel/6/x86_64/nethogs-0.8.0-1.e16.x86_64.rpm.
Http://rpm.pbone.net/index.php3/stat/4/idpl/17273936/dir/redhat_el_6/com/nethogs-0.8.0-1.el6.x86_64.rpm.html
3, install Nethogs
RPM–IVH nethogs-0.8.0-1.e16.x86_64.rpm
NETHOGS-P network card numbers (such as eth0), such as:
Nethogs version 0.8.0
PID USER program DEV SENT RECEIVED
? Root. 143:1388-192.168.21.6:139 0.000 0.634 kb/sec
13439 root sshd: [email protected]/0 eth0 1.730 0.123 kb/sec
? Root. 92:80-192.168.25.57:47869 0.014 0.040 kb/sec
? Root. 92:80-192.168.25.99:60509 0.014 0.040 kb/sec
? Root. 99:52052-192.168.20.94:80 0.000 0.014 kb/sec
? Root. 57:54920-192.168.20.94:80 0.000 0.014 kb/sec
? Root. 92:80-192.168.25.57:47867 0.000 0.000 kb/sec
? Root. 92:80-192.168.25.99:60507 0.000 0.000 kb/sec
? Root. 99:52050-192.168.20.94:80 0.000 0.000 kb/sec
? Root. 57:54918-192.168.20.94:80 0.000 0.000 kb/sec
? Root. 2337-192.168.25.118:10050 0.000 0.000 kb/sec
? Root. 2336-192.168.25.118:10050 0.000 0.000 kb/sec
? Root. 92:80-192.168.25.57:47865 0.000 0.000 kb/sec
? Root. 92:80-192.168.25.99:60505 0.000 0.000 kb/sec
? Root. 99:52048-192.168.20.94:80 0.000 0.000 kb/sec
? Root. 57:54916-192.168.20.94:80 0.000 0.000 kb/sec
? Root. 2335-192.168.25.118:10050 0.000 0.000 kb/sec
? Root. 2334-192.168.25.118:10050 0.000 0.000 kb/sec
? Root. 2333-192.168.25.118:10050 0.000 0.000 kb/sec
? Root. 2332-192.168.25.118:10050 0.000 0.000 kb/sec
This article is from the "Boyhack" blog, make sure to keep this source http://461205160.blog.51cto.com/274918/1752459
Installation of real-time traffic nethogs for monitoring process under Linux