[rrd-users] Second opinion ...

Marc T. Kaplan m.kaplan79 at gmail.com
Tue Nov 20 20:20:10 CET 2007


Yes, this was a typo and I did mean 86400, I have gone through and
tested this script a bit more but still see values being returned of
"UNKN." When you stated to set the sample period as 600 to accelerate
the day you are referring to the DS heartbeat or the RRD heartbeat?
With the "N" time stamp for updates, what other methods would you
consider using to update the RRD? I am slowly learning the system and
grinding away at this scrip, thank you for the help.

          Marc

On Nov 17, 2007 3:25 AM, Simon Hobson <linux at thehobsons.co.uk> wrote:
> Marc T. Kaplan wrote:
>
> >      I am trying to understand a few things regarding RRD. I was
> >started on a project with RRD to average the users across our server
> >cluster to check (I guess) that we have balanced the load across the
> >system. I am running a RRD that is to update the DS's once a day with
> >the returned values of the user polling script.
> >
> >     Where I am lost is that I created a RRD that has a step of 36400
> >(1 day) and 12 DS's that are set at DS:one:GAUGE:36400:0:1000. The RRA
> >is set as AVERAGE:0.5:1:365. If this is correct for setting up the RRD
> >for once a day updates and is this normal? If it is then my problems
> >are, I guess in the update itself.
>
> Is that a typo - because one day is 86400
>
> >    When I run my script to update the DS's I get ds[one] . last_ds =
> >"UNKN" , yet I know there is data being polled, just not injected into
> >the RRD. The update is as follows:
> >
> >****************************************************************************************************************************************
> >     fileloc="/home/bin/usercount";
> >
> >one=$(grep one $fileloc | awk -F': ' '{print $2}'):\
> >two=$(grep two $fileloc | awk -F': ' '{print $2}'):\
> >three=$(grep three $fileloc | awk -F': ' '{print $2}'):\
> >four=$(grep four $fileloc | awk -F': ' '{print $2}'):\
> >five=$(grep five$fileloc | awk -F': ' '{print $2}'):\
> >six=$(grep six $fileloc | awk -F': ' '{print $2}'):\
> >seven=$(grep seven $fileloc | awk -F': ' '{print $2}'):\
> >eight=$(grep eight $fileloc | awk -F': ' '{print $2}'):\
> >nine=$(grep nine $fileloc | awk -F': ' '{print $2}'):\
> >ten=$(grep ten $fileloc | awk -F': ' '{print $2}'):\
> >eleven=$(grep eleven $fileloc | awk -F': ' '{print $2}'):\
> >twelve=$(grep twelve $fileloc | awk -F': ' '{print $2}'):
> >
> >rrdtool update data2.rrd
> >N:$one:$two:$three:$four:$five:$six:$seven:$eight:$nine:$ten:$eleven:$twelve
> >******************************************************************************************************************************************
> >
> >Will this even work .... I am not very educated in how RRD works yet
> >but I am trying to learn and any help would be appreciated.
>
> It's looks OK. One thing I would do is run this in debug mode (eg
> bash -x myscript) and check that the values are all there. One thing
> I notice is tha you are using 'now' as a time, this means your data
> will always be normalised unless you somehow manage to run the script
> exactly at midnight UTC.
>
> Under these conditions, I'm not sure how many updates you'll need to
> do to have 'known' data returned.
>
> You might find it easier to debug if you accellerate time a bit - eg
> build a test rrd file with (say) 10 minute 'days' (ie sample period
> of 600) so you can quickly feed in multiple updates and see what
> happens.
>
>
> _______________________________________________
> rrd-users mailing list
> rrd-users at lists.oetiker.ch
> https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
>



More information about the rrd-users mailing list