On Monday 19 January 2004 6:30 am, Lorin Scraba wrote: > On Monday 19 January 2004 02:25, David Cannings wrote: > > Hi, > > > > I've used rrdtool before to create stats on my network interfaces > > but, as all the machines I generate data for reboot quite regularly > > (desktops, test machines, broken things, etc), I get alot of spikes > > on my graphs. All are running Linux, either 2.4.24 or 2.6. > > > > I'm looking for the simplest way to graph network usage on these > > machines without having to worry about manually correcting these > > spikes. One way I thought would be simple would be to have some sort > > of utility/daemon that counts packets on interfaces that can reset > > the count when queried (ie when the rrd update script is run). This > > way I could use a GAUGE/ABSOLUTE instead of a COUNTER. I believe I > > could still get packets/sec and bytes/sec (averaged over 5 minutes, > > of course) from this, but please correct me if I'm wrong. [snip] > > Are there any simple ways of doing what I'm trying to? Or should I > > just use a COUNTER and live with the overflows? Graphing data such > > as temperature seems to be easy, I just can't figure out this.
> Hi there, > iptables -L -v -x -n | grep eth0 | awk .... > eth0.log > iptables -Z > > You have to activate accounting on the interface: > iptables -A INPUT -i eth0 > iptables -A OUTPUT -o eth0 > You could also set up counters for various combinations ip/interface, > srcip/dstip etc. This is a good idea, thank you. I'm just figuring out the nicest way to do it as I don't want to loose all packet counters. To get around this issue, I've created a chain called COUNTER which I can reset with -Z when I've finished with the numbers. As you say, this will also mean I can graph statistics for specific ports (for example, HTTP). Again, this is a good example of iptables/rrdtool interaction and could be very useful for me. David david [at] edeca [dot] net -- Unsubscribe mailto:[EMAIL PROTECTED] Help mailto:[EMAIL PROTECTED] Archive http://www.ee.ethz.ch/~slist/rrd-users WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
