Re: Iptables, php , realtime bandwidth usage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 I wonder if someone could help me find something similiar to this :

 -can monitor bandwidthd usage in real time (php maybe...)

-if possible it could resolve ip address to dns name ? ( I have setup my own dynamicdns dhcp server combo )

You may want to look in to some of the SNMP monitoring tools (two come to mind MRTG and Cacti) as they will do a lot of the graphics and graphical web access for you. However to do this you will either need a manged + SNMP capable switch to watch which port each computer is plugged in to or you will need to set up some sort of rules for counting on your router / firewall and then set up some sort of SNMP package on the router / firewall to point your SNMP monitoring app at.

As far as getting close to real time stats you could set up some iptables rules to easily count what passes through the router in each direction for each client.  You may want to look at the accounting matches as they are designed explicitly for this or just basic packet matching rules will work too.  One word to the wise (unless there is a way to defeat this) the bytes and packet counters on iptables output will start rounding at some point, I'm not sure where, so you may want to pass the -Z option to zero out the counters periodically (each polling cycle) to make sure that you get all packets and not loose them to rounding.



Grant. . . .


[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux