[mrtg] Re: Using perhour option
alex at 8-p.ca
Thu Jun 15 18:39:32 MEST 2006
Quoting Steve Shipway <s.shipway at auckland.ac.nz>:
>> So I attempted to use "perhour" option. However, after
>> printing couple of pages on the printer, the graphs have
>> strange peaks, showing something like couple of hundred pages
>> printed per hour (which is wrong). The data is polled from
>> the printer every 5 minutes (with some other data, like
>> network traffic, memory usage and toner levels).
> You'll probably want to suppress the daily graph.
> This is because a 'perhour' graph is just a 'perminute' graph multiplied by
> 60, which is a persecond graph multiplied by 60.
> Since the normal interval is 5mins, a perminute graph will be 'accurate' as
> the per-x is less than the graph interval.
> However, for a perhour graph, what should it show over a 5min interval that
> has a count of 10 pages? This would sort of indicate a per-hour of 120
> pages, so it shows that. You get weird peaks. After all, one print in a
> 5-min period *is* 12/hour, over that period. It just doesnt make sense to
> look at a graph with granularity smaller than your per- interval.
Yes, it makes perfect sense. And for some things, when speed is
actually measured it is the correct thing to do. However, I simply
wanted to count how many pages were being printed each hour, and than
plot that data. So it is not really how fast the pages were being
printed, it is the amount of pages that were printed during one hour
interval. The "daily" graph would than have steps. Or explaining it
differently, what I wanted to display is the value of counter as if it
was a gauge showing how many pages were printed during previous
finished one hour interval.
At the end I achived this by making separate cron job that runs every
hour, and telling mrtg that interval is 60 minutes. I got the graph
exactly the way I wanted it, showing how many pages were printed in
each one hour interval. The only minor thing is that the newest
column of data in graph is shaded, and that last hour mark is mocked.
Looks kinda strage, but the plotted data is correct. And of course I
need to wait for one hour before I get current data collected and
It gives me more accurate graph, and I don't need to supress the daily graph.
It would be nice if there was an option telling mrtg to agregate
collected data for some period of time (for examply one hour), and
than simply store/plot this agregated value.
See Ya' later, alligator!
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
FAQ http://faq.mrtg.org Homepage http://www.mrtg.org
More information about the mrtg