Re: Packet counting/auditing per IP

Simon Hobson
Mon, 22 Jan 2007 08:06:52 -0000

>I actually implemented Simon''s scripts and they seem to have worked
>fine. Although I couldn''t figure out how to get the rrd graphs out
>so I download and installed cacti.
>
>It''s quite an impressive piece of software, all installed and
>working but I''m struggling to understand how to get cumulative
>bandwidth usage graphs out of it.
>
>I use Simon''s method for creating the ip-stats.rrd file and
updating
>it every minute from cron (I realise this can be done by cacti but
>I''m still too new to it to figure out how), and I get cacti to read
>the file and generate graphs from it (although they can''t seem to
>show bandwidth usage graphs).
>
>Basically what I am after is the ability to pull out the bandwidth
>usage per IP so I know which servers are consuming the most
>bandwidth resources.

This seems to be the most common faq on the rrd mailing list !

RRD stores rates (<somethings> per second). It does not store
accumulated totals or anything else, only rates. To get the
cumulative total over a period, take the rate and multiply by time -
and make sure you use the average consolidation function in the rrd.

Eg, if you graph showed an average of 1kbyte/s over 24 hours, that
would work out to 86400 kB total (1kBps time 86400 seconds/24hr).

The RRD tool pages are at http://oss.oetiker.ch/rrdtool/

I''ll see if I can find time to extract some of the less embarassing
bits of my script for generating graphs and post them :-)