[rrd-users] problems moving from rrdcgi to php

Randy rrdtool at anr.net
Wed Nov 2 23:40:10 CET 2011


We are moving some cgi-bin scripts that we have that access rrds and  
integrating them with our web site which runs php

Sofar, I have been able to migrate the creation of graphs over without  
any problems, but there is one script that does not produce graphs. it  
simply produces values that we use in text form with the PRINT keyword  
in rrdgraph (rather than GPRINT).

So far, I have ben unable to find out how to access these values using  
the php rrd_graph function. any ideas?

The code in rrdcgi used is:

<RRD::GRAPH test.png
   --start 1314856800 --end now
   DEF:in=threshold.rrd:in:AVERAGE
   DEF:out=threshold.rrd:out:AVERAGE
   VDEF:intot=in,TOTAL
   VDEF:outtot=out,TOTAL
   CDEF:siset=in,0,*,1000000,+
   PRINT:siset:MAX:"%.lf %s"
   PRINT:intot:"%.lf %SBytes"
   PRINT:outtot:"%.lf %SBytes">
<p>Your Current Total Data Transfered during this Billing Period is:</p>
<p> Download: <RRD::PRINT 1><br />
Upload: <RRD::PRINT 2></p>

I have tried converting it to rrd_graph and accessing the values in  
the returned array, but they are not there.



More information about the rrd-users mailing list