[rrd-users] Re : Printing a single simple average value

Etienney Claire etienney_claire at yahoo.fr
Tue Jun 17 09:31:16 CEST 2008


Hello,

I searched for this functionnality few weeks ago.
This is an extract from my perl script:

my ($averages,$xsize,$ysize) = RRDs::graph($rrdargs);
$CPU = $$averages[0];

I hope this will help you

Claire DEVERNAY



----- Message d'origine ----
De : "Ruttenberg, Tanya" <Tanya.Ruttenberg at ssa.gov>
À : rrd-users at lists.oetiker.ch
Envoyé le : Lundi, 16 Juin 2008, 19h25mn 04s
Objet : [rrd-users] Printing a single simple average value

Printing a single simple average value 
Hi RRD Users, 
I have an rrdfile router1.rrd that collects utilization data every 15 minutes.  I want to print a single value which represents an AVERAGE rate over a 6 week period.
I have read documentation and played around with this for several days and I haven't been able to figure it out. 
The closest I came was this: 
rrdtool graph - -s "midnight-6w" -e "midnight" \ 
DEF:ds0=router1.rrd:ifInOctets:AVERAGE \ 
VDEF:ds1=ds0,AVERAGE \ 
PRINT:ds1:%20.2lf%s 
At least this doesn't give me any errors, but it doesn't give me any output whatsoever. 
Ideally I want to put this into a perl script like: 
$average = RRDs::graph($rrdargs); 
What am I doing wrong? 

Tanya Ruttenberg 
SMC/OND Administrator for DNE 
410-965-9605 
SMC Email & Home Page: #SMC Admin http://smc.ba.ssa.gov 
OND Email & Home Page: #OND Admin http://ssahost.ba.ssa.gov/ONDwebinterface 



      _____________________________________________________________________________ 
Envoyez avec Yahoo! Mail. Une boite mail plus intelligente http://mail.yahoo.fr
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/rrd-users/attachments/20080617/51b9a920/attachment.html 


More information about the rrd-users mailing list