Hi, Thanks for the responses with the problem outlined below. I think I've found what the problem is & posting this in case anyone else comes across something similar. I have been running MRTG on a Windows NT server, everything worked fine except for the GPRINT part of it. Anyways, I suspected that perhaps it was something to do with the pointer to the value that is part of the GPRINT function (or I could just be way out there!) & so set up RRDTool on a Linux (Red Hat 6.0) box. I tried compiling & installing RRDTool, but didn't work, so installed the RPM that is available, ran the same command set against one of the RRDs & this has had the desired effect (printing the CDEF value onto the graph).
Cheers Mike -----Original Message----- From: Cliff Savage [mailto:[EMAIL PROTECTED] Sent: 07 August 2001 21:46 To: Michael Munn Subject: Re: [rrd-users] GPRINT Problem At 06:18 PM 8/7/01 +0100, you wrote: >Hi, > >Fairly new to MRTG & recently converted over to RRDTool & am using the >databases generated from there. The files converted fine & have managed to >get the graphs redrawn, however, without the figures/numbers at the bottom >of the graph. I have tried using the GPRINT function for this, however I >don't seem to be getting anywhere. I've read the manuals, the syntax on the >c printf function & the previous items in this list pertaining to this. From >what I can see the basic syntax is: > >GPRINT:vname:CF:format where vname is the value created with a CDEF & is >pointed to by vname, CF is MAX, MIN etc & format is formatting the output of >the numbers. I have put something together along the lines of: > >rrdtool graph rtr_ser0.gif --start 993967200 --end 996645600 >--vertical-label Kb/s --title "Network Stats for RTR - Serial0" >DEF:inavg=rtr_ser0.rrd:ds0:AVERAGE \ DEF:outavg=rtr_ser0.rrd:ds1:AVERAGE >CDEF:inavgb=inavg,8,* CDEF:outavgb=outavg,8,* CDEF:inav=inavgb,64000,/ >CDEF:outav=outavgb,64000,/ LINE1:inavgb# 009900:"Incoming Traffic" >LINE1:outavgb#0000FF:"Outgoing Traffic\l" GPRINT:inav:AVERAGE:"%6.2lf" >GPRINT:outav:AVERAGE:"%6.2lf" > >Can anyone see if there's anything wrong with the formatting that would >perhaps cause it not to print onto the graph, or anything else for that >matter? This example puts just a plain old comment on the bottom of the graph: (The COMMENT statement) - may not be useful and not exactly what you were asking. <P><RRD::GRAPH /web/homenet/bigdipper/sensors/pix/temp1d.png --imginfo '<IMG SRC=pix/%s WIDTH=%lu HEIGHT=%lu >' -a PNG -h 130 -w 800 -s -1days -v "Temperature (degrees C)" -t "Motherboard Temperature" -x HOUR:1:HOUR:3:HOUR:3:0:'%b %d %H:00' -y .25:6 -l 44 DEF:temp=/web/homenet/bigdipper/sensors/sensors.rrd:temp1:AVERAGE COMMENT:"Ye olde comment" COMMENT:\s COMMENT:"Ye olde comment number 2" COMMENT:\s COMMENT:"Ye olde comment number 3" COMMENT:\s COMMENT:\s COMMENT:"Ye olde comment number 4 which can extend quite a distance across the bottom of the graph" LINE1:temp#FF0033> </P> This example puts a horizontal blue line at 3.443Vdc and puts a graph legend at the bottom of the graph. (The HRULE thingy - the last part #0600FF:3.443v is the legend.) <P><RRD::GRAPH /web/homenet/bigdipper/sensors/pix/in2d.png --imginfo '<IMG SRC=pix/%s WIDTH=%lu HEIGHT=%lu >' -a PNG -h 130 -w 775 -s -1days -v "Volts" -t "+3.3 Volt Supply" -l 3.4 -u 3.47 --rigid -x HOUR:1:HOUR:3:HOUR:3:0:'%b %d %H:00' -y .01:5 DEF:temp=/web/homenet/bigdipper/sensors/sensors.rrd:in2:AVERAGE HRULE:3.443#0600FF:3.443v LINE1:temp#008800> </P> Apologies if this ain't zactly what you're looking for - perhaps someone else will have a better example. I'm new at this too. -- Unsubscribe mailto:[EMAIL PROTECTED] Help mailto:[EMAIL PROTECTED] Archive http://www.ee.ethz.ch/~slist/rrd-users WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
