Erik Hensema wrote:

>We're using mrtg to collect interface stats of our switch and store
>the data using rrdtool.
>
>Since we're charging our customers on a monthly basis on the total
>data transferred, I'd like to create graphs per month.
>I guess this won't be possible with the graph function of rrdtool,
>since a month has no fixed length, so no interval can be given.

Yes it can. rrdtool simply graphs the period you tell it to - if you 
tell it to graph a period covering one calendar month then it will do 
so. All you need to do is work out what start and end times you need 
for each month which isn't all that hard :

start = "00:00 01-mm-yyyy"
end = "00:00 01-MM-YYYY" - $interval

where mm-yyyy is the month required, MM-YYYY is the result of adding 
one to the month and dealing with crossing a year end, and $interval 
is your graphing resolution. The results should be expressed as 
seconds since epoch.

Actually, I'm not entirely sure if you need to subtract the interval.

_______________________________________________
rrd-users mailing list
rrd-users@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users

Reply via email to