[rrd-users] Graph of rails requests average hour by hour, as a "typical day"
linux at thehobsons.co.uk
Fri Nov 26 11:55:17 CET 2010
Jérémy Frere wrote:
>I have a production.log file, containing the
>requests details with date/hour of the request.
>I easily parsed the lines to get the timestamp
>of the request, and managed to of generate
>graphs of the average requests per hour on one
>day, week, month or year. But I couldn't manage
>to get the average requests for one "typical
>day", summarizing the yearly average of requests
>in one single day.
I'm unclear what you are asking. Are you wanting
a single number that says "average usage is X
requests/day over the last year" ?
To do that, you simply want to generate an
"empty" graph and do no more than PRINT (not
GPRINT) a VDEF which is the average rate times
86400 and with start/end times covering a year.
If you get a VDEF which is the average value of
the year, then that will be the rate/second. To
get rate/day you just need to multiply by 86400
(seconds in a day) to get the rate/day.
I'd also suggest you stufy Alex's tutorials at
In particular, the ones on "Computing amount of
data transfered when you want the TOTAL amount",
and "Rates, normalizing and consolidating".
Also note that your primary data points start/end
on well defined step boundaries. These are ALWAYS
a multiple of the step period from unix epoch
(midnight, 1st Jan 1970 UTC). Rrdtool always
works in UTC internally.
Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
author Gladys Hobson. Novels - poetry - short stories - ideal as
Christmas stocking fillers. Some available as e-books.
More information about the rrd-users