LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   monitor internet usage with simple setup (https://www.linuxquestions.org/questions/linux-networking-3/monitor-internet-usage-with-simple-setup-946724/)

mrpurple 05-24-2012 08:35 PM

monitor internet usage with simple setup
 
A popular (unanswered) question is "How can I monitor which computer on my network is using all my bandwidth?" Does anyone have a nice easy answer?

I thought I could build a box between my router and my switch and monitor which computers are using up all the bandwidth, but I cannot find a simple "install this version of linux onto said box with two nics and configure like so" answer.

So building up from components would require, I'm guessing, a transparent proxy based on squid with some kind of monitoring addon?

I did manage to get CACTI running on an Ubuntu/Squid box with a transparent proxy, but it was not simple, and the available graphs/SNMP didnt report the desired "who is using up my bandwidth" information anyhow.

I also thought about IPCOP but this doesnt seem to supply the required info either.

Heck, I wouldn't mind if i had to plug a screen into the box, log on, and go through logs which saved traffic against local ips, but alas I know of no such solution.

Seriously, after trying quite hard, I cant find a simple solution to this rather popular problem? So popular (based on the number of people requesting help on this very problem in various forums) I would have thought it had been solved a long time ago - I just cant find it, or havent asked google the right question.

TLDR:
Whos using up my internet bandwidth?

uhelp 05-24-2012 08:42 PM

Have a look at "ntop"

mrpurple 05-24-2012 09:15 PM

Looks very promising, now I have a thread to pull on.
I'm guessing ntop & squid. I'm sure what I need is a mear handfull on command lines.
Thanks again
I may write a nice how-to-forge when I have it sorted.

mrpurple 10-23-2012 09:56 PM

As a matter of fact if you have Squid installed with snmp and you can carry out an snmpwalk successfully you only need to do
Code:

snmpbulkwalk -v2c -Os -Cc -c communitystring hostname:3401 cacheClientHttpKb
Or
Code:

snmpbulkwalk -v2c -Os -Cc -c communitystring hostname:3401 cacheClientHTTPHitKb
To tell you exactly who's generating the most traffic (through the squid cache).
The first command lists all the cache clients and their total traffic from squid and the second lists all the cache clients and the cached traffic from squid.

NB all the OIDs (like cacheClientHTTPHitKb) available are listed here http://wiki.squid-cache.org/Features/Snmp

Instead of mucking about for hours and hours getting a massive tool like cacti to (fail to) generate the graphs I wanted I redirected the outputs of these commands to a file in a cron job and parsed the files in php and then used the php extension "libchart" to graph them. Took me about an hour, and I still may post that how to.


All times are GMT -5. The time now is 01:19 AM.