To check the bandwidth usage on per machine I'd go for a solution with iptablesif you are pretty much interested in totals, the built in logging does notaverage counts. The big advantage is that you probably have little or no extraneed for software, little or no impact on system resources. Just add a handfulrules to IP-tables and read the counters.
You'll have to read the manual pages yourself, but it should go something likethis:
You'll have to read the manual pages yourself, but it should go something likethis:
Code:
iptables --append INPUT --jumpACCEPT --source <IP1>
iptables --append INPUT --jumpACCEPT --destination <IP1>
iptables --append OUTPUT --jumpACCEPT --source <IP1>
iptables --append OUTPUT --jumpACCEPT --destination <IP1>
Four lines per IP-addres you want tomonitor, replace <IP1> with the proper IP-address of your ... PC, laptop,...
To examine the totals:
To examine the totals:
Code:
iptables -L -v -x
Andonce 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 yourpower goes down and the packet count is reset) and/or set up a collectd processthat collects the packet count data. collectd basically would do the same asthe cron/logfile combination would do, but supports all different kinds ofexport types like CSV, images and much more.
Thanks...
0 comments:
Post a Comment