LinHES Forums http://forum.linhes.org/ |
|
changing rrd's update interval and scale on the graphs http://forum.linhes.org/viewtopic.php?f=6&t=16670 |
Page 1 of 1 |
Author: | graysky [ Fri Sep 21, 2007 4:35 pm ] |
Post subject: | changing rrd's update interval and scale on the graphs |
OK... I think I found where one can change the update interval rrd uses: Code: # nano /etc/cron.d/sysstat
# Activity reports every 10 minutes everyday 5-55/10 * * * * root [ -x /usr/lib/sysstat/sa1 ] && { [ -r "$DEFAULT" ] && . "$D$ You can change the default 10 min to whatever you'd like by change the 55/10 to 55/x where x how frequently in minutes it should update. What is less clear to me is how I can change the x-axis scale on the graphs rrd displays. For example, the default view is 24 hours... is it trivial to change it to say 12 or 6? Thanks! |
Author: | graysky [ Sun Sep 23, 2007 6:06 am ] |
Post subject: | |
No replies in a few days means this must not be trivial... |
Author: | Dale [ Sun Sep 23, 2007 2:52 pm ] |
Post subject: | |
Well, those of us who have looked at the rrd scripts don't really remember what it takes, sorry. ![]() Its been quite awhile since I did that set and I am currently pretty busy with stuff for R6. Perhaps someone else can get to this for you. |
Author: | graysky [ Sun Sep 23, 2007 3:19 pm ] |
Post subject: | |
Thanks for the reply, Dale. Maybe someone out there has a better understanding of this than I ![]() |
Author: | Heem [ Mon Sep 24, 2007 9:20 am ] |
Post subject: | |
it is very trivial. some of us just have better things to do. edit the /usr/local/bin/rrd_XXX.pl file that you want hourly reports from. at the bottom you see this: ######################################################################## create "$dbf"; gather; update "$dbf"; graph 'day', 'Daily'; graph 'week', 'Weekly'; graph 'month', 'Monthly'; graph 'year', 'Yearly'; ######################################################################## add : graph 'hour', 'hourly'; you'll get an hourly graph. look in the directoy where the PNG graphs are stored and you'll see it was created. add it to the HTML however you like. |
Author: | graysky [ Mon Sep 24, 2007 1:24 pm ] |
Post subject: | |
Cool Heem, thanks for that. Are you aware of a set of commands one can use for fractions of a day (i.e. 1/4 day [6 hours])? Thanks again! |
Author: | Heem [ Mon Sep 24, 2007 1:42 pm ] |
Post subject: | |
you could do it with so more intensive changes to the file. note the syntax and how it works: RRDs::graph( "$png/$dbf-$_[1].png", "-s -1$_[0]", "-aPNG", see the part -1$_[0] thats where its putting the word "hour" "day" "week" etc.. it means "start -1 day from now" or "start -1 week from now" you could get a 12 hour period by adding a graph line graph '2hour', '12hourly'; because that would trick it into thinking you want to "start -12 hours from now" 6 hours you'd probably have to make deeper changes to the script, of which are surely possibly by adding the 1 into the graph statements at the bottom of the file and removing it from all the places that it needs it in the regular file. It might be more complex than it sounds though. |
Page 1 of 1 | All times are UTC - 6 hours |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |