View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 7 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Fri Sep 21, 2007 4:35 pm 
Offline
Joined: Wed Dec 10, 2003 8:31 pm
Posts: 1996
Location: /dev/null
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!

_________________
Retired KM user (R4 - R6.04); friend to LH users.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Sep 23, 2007 6:06 am 
Offline
Joined: Wed Dec 10, 2003 8:31 pm
Posts: 1996
Location: /dev/null
No replies in a few days means this must not be trivial...

_________________
Retired KM user (R4 - R6.04); friend to LH users.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Sep 23, 2007 2:52 pm 
Offline
Site Admin
Joined: Fri Oct 31, 2003 11:40 pm
Posts: 357
Location: Irvine, Ca
Well, those of us who have looked at the rrd scripts don't really remember what it takes, sorry. :oops:

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.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Sep 23, 2007 3:19 pm 
Offline
Joined: Wed Dec 10, 2003 8:31 pm
Posts: 1996
Location: /dev/null
Thanks for the reply, Dale. Maybe someone out there has a better understanding of this than I :)

_________________
Retired KM user (R4 - R6.04); friend to LH users.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 24, 2007 9:20 am 
Offline
Joined: Fri Apr 21, 2006 2:06 pm
Posts: 32
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.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 24, 2007 1:24 pm 
Offline
Joined: Wed Dec 10, 2003 8:31 pm
Posts: 1996
Location: /dev/null
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!

_________________
Retired KM user (R4 - R6.04); friend to LH users.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 24, 2007 1:42 pm 
Offline
Joined: Fri Apr 21, 2006 2:06 pm
Posts: 32
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.


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 26 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu