images don't show up

vfari

03-10-2003 08:30:34

Hi

I installed netmrg-0.10pre2, snmpd works and cron job is executed,
but whenever i view a graph, pictures don't seem to exist

and i can see this in apache error log (apache 2.0.44)
for each graph i try to look at
[ba1bb338bed]sh line 1 1/rrdtool no such file or directory[/ba1bb338bed]

i checked paths in netmrg.xml, they're ok.

can someone help me or may i just reinstall it ?

thanks in advance

balleman

04-10-2003 16:58:52

get_graph.php has a debugging mode which might help us out here.

Go to a page which displays a graph (or should) and find the URL in the IMG SRC tag. Paste this URL into your browser (it should contain get_graph.php and some GET parameters). Then append [ba451805ed3]&debug=1[/ba451805ed3] to the URL (this places get_graph.php into a debugging mode).

The URL will look something like this
[code1a451805ed3]http://oak/netmrg/get_graph.php?subdev_id=1&type=template&id=2&debug=1[/code1a451805ed3]

When you load the URL in your browser, you should get a page that looks like this
[code1a451805ed3]
/usr/bin/rrdtool graph - -s -108000 -e -360 --title "Oak - CPU Utilization" -w 575 -h 100 -b 1000 -v "% Usage" --imgformat PNG DEF:zero=/usr/local/var/lib/netmrg/rrd/zero.rrd:mon_25:AVERAGE
.
.
.
GPRINT:data5:AVERAGE:"Average\:%8.2lf %s" GPRINT:data5m:MAX:"Maximum\:%8.2lf %s" COMMENT:"\n" VRULE:1065240000#F00000

Script execution debug information:
Marker Time Diff
Start 1065300541.81295800 -
before headers 1065300541.81313600 0.000178
.
.
.
Stop 1065300541.97152300 0.000410
0.158565
[/code1a451805ed3]

The first block of text is the RRDTOOL command. You should be able to paste this to a prompt to see if RRDTOOL or your system has any issues with it.


Please let us know if this helps find the problem (and if so, what the problem is). If it doesn't help, reply and give us a copy of the output from that page, if possible.

Thanks, and good luck.

vfari

09-10-2003 04:16:56

Hi

thanks for the debug tip. The error is

[b210d54d008]call to undefined function bcsub () in lib/phptimer.php line 81[/b210d54d008]

Is this because pear or some other is missing ?
Anyway i'll try with 0.1 now]

silfreed

09-10-2003 18:28:27

Actually, that error is only caused when you enable debug. The lib/phptimer.php uses bc math to get the precision it needs (--enable-bcmath when you compile php). If you feel adventurous and would like to recompile PHP, it may aid us in tracking this down.
In the mean time, if you could copy/paste your line from your netmrg.xml file with the <rrdtool> tags, that let us know whether it's a path problem or not. '1/rrdtool' doesn't look to be a valid path to rrdtool.

-Doug

vfari

10-10-2003 10:12:17

Hello

i checked the <rrdtool> tag and the path is correct
(something like /usr/bin/rrdtool)
Sorry, i won't bother building php from source on this server i think.
And i still have to upgrade to 0.10.

to be continued ... ;-)

vfari

06-11-2003 11:53:36

Hi
i've updated to 0.10, but problem remains
here's the output of get_graph...&debug=1

/usr/bin/rrdtool graph - -s -108000 -e -360 --title "WWW - CPU Utilization" -w
575 -h 100 -b 1000 -v "% Usage" --imgformat PNG
DEFzero=/opt/netmrg/var/lib/netmrg/rrd/zero.rrdmon_25AVERAGE
DEFdata1=/opt/netmrg/var/lib/netmrg/rrd/mon_17.rrdmon_17AVERAGE
DEFdata1l=/opt/netmrg/var/lib/netmrg/rrd/mon_17.rrdmon_17LAST
DEFdata1m=/opt/netmrg/var/lib/netmrg/rrd/mon_17.rrdmon_17MAX
AREAdata1#FF6600"System" GPRINTdata1lLAST"Current\%8.2lf %s"
GPRINTdata1AVERAGE"Average\%8.2lf %s" GPRINTdata1mMAX"Maximum\%8.2lf %s"
COMMENT"\n" DEFdata2=/opt/netmrg/var/lib/netmrg/rrd/mon_18.rrdmon_18AVERAGE
DEFdata2l=/opt/netmrg/var/lib/netmrg/rrd/mon_18.rrdmon_18LAST
DEFdata2m=/opt/netmrg/var/lib/netmrg/rrd/mon_18.rrdmon_18MAX
STACKdata2#3366FF"User " GPRINTdata2lLAST"Current\%8.2lf %s"
GPRINTdata2AVERAGE"Average\%8.2lf %s" GPRINTdata2mMAX"Maximum\%8.2lf %s"
COMMENT"\n" DEFdata3=/opt/netmrg/var/lib/netmrg/rrd/mon_19.rrdmon_19AVERAGE
DEFdata3l=/opt/netmrg/var/lib/netmrg/rrd/mon_19.rrdmon_19LAST
DEFdata3m=/opt/netmrg/var/lib/netmrg/rrd/mon_19.rrdmon_19MAX
STACKdata3#00CC66"Nice " GPRINTdata3lLAST"Current\%8.2lf %s"
GPRINTdata3AVERAGE"Average\%8.2lf %s" GPRINTdata3mMAX"Maximum\%8.2lf %s"
COMMENT"\n"
CDEFdata4=zero,UN,0,0,IF,data1,UN,0,data1,IF,+,data2,UN,0,data2,IF,+,data3,UN,0,data3,IF,+,1,*
CDEFdata4l=zero,UN,0,0,IF,data1l,UN,0,data1,IF,+,data2l,UN,0,data2,IF,+,data3l,UN,0,data3,IF,+,1,*
CDEFdata4m=zero,UN,0,0,IF,data1m,UN,0,data1,IF,+,data2m,UN,0,data2,IF,+,data3m,UN,0,data3,IF,+,1,*
LINE1data4#000000"Total " GPRINTdata4lLAST"Current\%8.2lf %s"
GPRINTdata4AVERAGE"Average\%8.2lf %s" GPRINTdata4mMAX"Maximum\%8.2lf %s"
COMMENT"\n" VRULE1068073200#F00000

Script execution debug informationMarkerTimeDiff
Start1068114888.25229300-
before headers1068114888.25247400
Fatal error Call to undefined function bcsub() in
/opt/netmrg/var/www/netmrg/lib/phptimer.php on line 81

balleman

08-11-2003 08:53:39

Try pasting the entire RRDtool command to a shell (running as netmrg user) on your machine with the following change replace the '-' between 'graph' and '-s' with something like 'test.png'.

Let us know if you get any RRDtool errors, and if not, what the produced test.png looks like.

vfari

21-11-2003 10:42:37

The message i get is something like "No content"...