<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:10pt"><div style="font-family: times new roman,new york,times,serif; font-size: 10pt;">Hello,<br><br>I searched for this functionnality few weeks ago.<br>This is an extract from my perl script:<br><br>my ($averages,$xsize,$ysize) = <font face="Courier" size="2">RRDs::graph($rrdargs);<br>$CPU = $$averages[0];<br></font><br>I hope this will help you<br><br>Claire DEVERNAY<br><br><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">----- Message d'origine ----<br>De : "Ruttenberg, Tanya" &lt;Tanya.Ruttenberg@ssa.gov&gt;<br>À : rrd-users@lists.oetiker.ch<br>Envoyé le : Lundi, 16 Juin 2008, 19h25mn 04s<br>Objet&nbsp;: [rrd-users] Printing a single simple average value<br><br><title>Printing a single simple average value</title> 

 
 




<p><font face="Courier" size="2">Hi RRD Users,</font> </p><p><font face="Courier" size="2">I have an rrdfile router1.rrd that collects utilization data every 15 minutes.&nbsp; I want to print a single value which represents an AVERAGE rate over a 6 week period.</font></p><p><font face="Courier" size="2">I have read documentation and played around with this for several days and I haven't been able to figure it out.</font> </p><p><font face="Courier" size="2">The closest I came was this:</font> </p><p><font face="Courier" size="2">rrdtool graph - -s "midnight-6w" -e "midnight" \</font> 
<br><font face="Courier" size="2">DEF:ds0=router1.rrd:ifInOctets:AVERAGE \</font> 
<br><font face="Courier" size="2">VDEF:ds1=ds0,AVERAGE \</font> 
<br><font face="Courier" size="2">PRINT:ds1:%20.2lf%s</font> </p><p><font face="Courier" size="2">At least this doesn't give me any errors, but it doesn't give me any output whatsoever.</font> </p><p><font face="Courier" size="2">Ideally I want to put this into a perl script like:</font> </p><p><font face="Courier" size="2">$average = RRDs::graph($rrdargs);</font> </p><p><font face="Courier" size="2">What am I doing wrong?</font> </p><br><p><font face="Courier" size="2">Tanya Ruttenberg</font> 
<br><font face="Courier" size="2">SMC/OND Administrator for DNE</font> 
<br><font face="Courier" size="2">410-965-9605</font> 
<br><font color="#0000ff" face="Courier" size="2">SMC Email &amp; Home Page: #SMC Admin</font> <a rel="nofollow" target="_blank" href="http://smc.ba.ssa.gov"><u></u><u><font color="#0000ff" face="Courier" size="2">http://smc.ba.ssa.gov</font></u></a><font color="#0000ff" face="Courier" size="2"></font> 
<br><font color="#0000ff" face="Courier" size="2">OND Email &amp; Home Page: #OND Admin</font> <a rel="nofollow" target="_blank" href="http://ssahost.ba.ssa.gov/ONDwebinterface"><u></u><u><font color="#0000ff" face="Courier" size="2">http://ssahost.ba.ssa.gov/ONDwebinterface</font></u></a><font color="#0000ff" face="Courier" size="2"></font> </p><br></div></div></div><br>



      <hr size="1"> 
Envoyé avec <a href="http://us.rd.yahoo.com/mailuk/taglines/isp/control/*http://us.rd.yahoo.com/evt=52423/*http://fr.docs.yahoo.com/mail/overview/index.html">Yahoo! Mail</a>.<br>Une boite mail plus intelligente. </a></body></html>