Welcome to my site. Please CLICK HERE to give your opinions regarding this new look of "PCTipsbyAnu". Thanks for visiting.

Monday, November 8, 2010

Browse » Home » , , » How to check the bandwidth usage on per machine basis?

How to check the bandwidth usage on per machine basis?




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:
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:
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...
You can leave a response, or trackback from your own site.

About 'Anu': My name is 'Anu' also Known as 'ANU 007 TIGER' .I'm administrator of 'PC Tips by Anu' blog .This blog was opened for sharing contents about hacking n cracking.
Thanks YAHOO OR GMAIL

0 comments:

Post a Comment

 
Back to Top