I have a linux Gateway machine . Last month my Internet bill way too high so I want to check the bandwidth usage on per machine basis
I tried vnstat but it is just showing the daily usage but not on per machine/IP basis
So please help me to find out a network monitoring system to install it in my gateway so that I can capture daily Internet usage on per IP basis
Basically I need to check the Internet Bandwidth usage on per machine/IP basis , So that I can find it out which machine uses much bandwidth
Advance Thanks and Regards
you can configure ip tables rules per pc and packet counters in iptables can help you in finding which PC using more bandwidth.
I think Ntop is the suitable tool for this condition. I am also facing the same situation and want to implement ntop. Will post once I complete with my setup.
Use iftop command which gives you robust feature more than your expectation
Bandwidth Monitoring with ipac-ng
Not sure how well it works on newer distros, but on smoothwall 2.0 it's a treat.
I'd go for a solution with iptables if you are pretty much interested in totals, the built in logging does not average counts. The big advantage is that you probably have little or no extra need for software, little or no impact on system resources. Just add a handful rules to IP-tables and read the counters.
You'll have to read the manual pages yourself, but it should go something like this:
Four lines per IP-addres you want to monitor, replace <IP1> with the proper IP-address of your ... PC, laptop, ...
iptables --append INPUT --jump ACCEPT --source <IP1>
iptables --append INPUT --jump ACCEPT --destination <IP1>
iptables --append OUTPUT --jump ACCEPT --source <IP1>
iptables --append OUTPUT --jump ACCEPT --destination <IP1>
To examine the totals:
Coming to think of it, logging both INPUT and OUTPUT is not necessary. Just disregard the lines for OUTPUT chain.
Packets that travel in, will travel out too, so the counters for INPUT and OUTPUT will be identical :) (provided you don't have any other rules set up).
And once you have set up these iptable rules you can either run "itpables -L -v -x" as a cron job and append the output to a logfile (in case your power goes down and the packet count is reset) and/or set up a collectd process that collects the packet count data. collectd basically would do the same as the cron/logfile combination would do, but supports all different kinds of export types like CSV, images and much more.
Have a look at RRDTool. It may meet your needs. I do not have any experience setting up or configuring but I have seen it in action.
Thanks a lot for the help. The iptable configuration looks fine. I'll probably go with that.
Once again thanks to all who helped me
Have a nice day