jump to navigation

Monitor Network Traffic by PID with “nethogs” on Linux March 9, 2011

Posted by Tournas Dimitrios in Linux admin tools.

Have you ever notice some suspicious spikes in your internet connection and wondered “What the hell is using up all that bandwidth ? ” , or worse , ” Have I been hacked?” . If so , then nethogs might be the program for you . It’s a lightweight  Linux terminal-based tool that monitors bandwidth usage , then groups it by process , so you can see which PID’s are using the most bandwidth  , and if necessary , kill them with gnome-system-monitor or kill .

If EPEL is on the repository list of CentOs 5.x ,  yum will handle the installation .

I’m using tmux and  kill to demonstrate nethogs . In this example somebody is downloading 400M from my web-server .

Similar utility is iftop .



No comments yet — be the first.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s