11

On occasion I see my bandwidth usage using gnome-system-monitor going up to 300kbit/s. I just can't figure out what is causing it. I want to know what process or program in using my network like that?

I do ssh into different machines and servers, where I would really like to be able to monitor bandwidth usage. It would be very useful to know which utilities people use to see what bandwidth is being used and by which applications / programs / processes / or threads. I don't even know where to start looking.

The two small programs I have found are insufficient. bmon and bwm-ng And tools like wireshark (packet sniffers) are overkill. I would like something in the middle, preferably text console-based.

0

4 Answers 4

11

You can use

iptraf

or

iftop -P

to identify connections that consume much of your bandwidth. A connection is identified by a pair of (localip:port, remoteip:port). You can then use

netstat -tunp

to look up what process uses that connection. Mostly however, you will be able to tell what service is responsible only by looking at the port, e.g. if the connection uses localip:80 on the local side its probably your webserver ;-)

11

Well, there is iftop but that only shows the source and destination, not the program causing the traffic.

Edit:

Just found nethogs. It does exactly what you want.

0

Iftop

It works well showing which ip / hosts the bandwidth is being used by. It can isolate the information down to a single program or port.

sudo Iftop

once it is running you can the access the help menu with H or ?. Which has numerous useful options

Host display:                          General:
 n - toggle DNS host resolution         P - pause display
 s - toggle show source host            h - toggle this help display
 d - toggle show destination host       b - toggle bar graph display
 t - cycle line display mode            B - cycle bar graph average
                                        T - toggle cummulative line totals
Port display:                           j/k - scroll display
 N - toggle service resolution          f - edit filter code
 S - toggle show source port            l - set screen filter
 D - toggle show destination port       L - lin/log scales
 p - toggle port display                ! - shell command
                                        q - quit
Sorting:
 1/2/3 - sort by 1st/2nd/3rd column
 < - sort by source name
 > - sort by dest name
 o - freeze current order

iftop, version 0.17
-3

The SSH System Administration Tool has facilities for bandwidth monitoring.

1
  • 2
    This doesn't really answer the question... If this program does it, include instructions Jul 24, 2013 at 1:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .