As I already pointed out,
nethogs is a very useful app for quickly identifying the process causing the bottleneck in your network traffic of your LTSP server (or any other linux server

). However in case of LTSP it's usefulness is very limited by the fact that the processes are sorted by the incoming traffic and this cannot be changed. But no problem: open source comes to the rescue!
I looked into the source and creating a patch for an extra switch (to allow sorting by outgoing traffic) was really not a big deal. While already at it, I've also added two other options: "-c" to limit the number of updates/refreshes (useful if using trace mode) and "-l" to limit the number of processes displayed. I've also fixed the missing implementation of the "s" (sort by sent column) and "r" (sort by received column) keyboard shortcuts in the curses mode.
So here you're: I've created two patches: one for the current Ubuntu package (v0.6.0-3) and one for the latest available development snapshot of nethogs (v0.6.1-pre2). See the attached files. For a howto on applying patches, see
one of my previous posts.
Running the patched nethogs with the "-s" switch for the loopback interface on an LTSP server quickly reveals the top apps that push the most traffic out into the users' ssh tunnel:
nethogs -s lo -l 3
P.S.: I've implemented the above changes for the current (9th Sep 2008) CVS version too. The CVS version already contained the "s" and "r" keyboard shortcuts. See attached patch.
Recent comments
6 days 16 hours ago
1 week 15 hours ago
1 week 16 hours ago
1 week 1 day ago
1 week 1 day ago
1 week 5 days ago
1 week 5 days ago
3 weeks 3 days ago
3 weeks 3 days ago
3 weeks 5 days ago