I can't see graphs...

aero_climb

13-03-2004 11:48:12

I have still problems... oops
First, my server runs with safe_mode ON. I changed safe_mode to OFF and netmrg ran. But when I want to see graphs, I can't see them...
I follow however the INSTALL file.
Must I compile PHP with the SNMP support ? with RRDTOOL support ?
Do Netmrg run with the safe_mode to On ? Which functions uses netMRG ?

balleman

13-03-2004 12:53:41

NetMRG does not require SNMP or RRDTOOL support to be built into your PHP, but it will not run in safe mode.

To debug a graph display problem, get the URL for a broken graph (it should contain 'get_graph.php'). Open the URL directly, appending "&debug=1" to the end. This should give you a text page with any problems with creating the graph. Please post the results.

Other people have had similar problems in the forum. Did any other posts help?

aero_climb

15-03-2004 11:44:30

I'm going to test your solution this evening ;)

aero_climb

15-03-2004 15:30:27

I have this error with debug=1.

[code1b7c6816f97]
/usr/bin/rrdtool graph - -s -108000 -e -360 -a PNG -g -w 275 -h 25 DEF:data1=/usr/local/var/lib/netmrg/rrd/mon_15.rrd:mon_15:AVERAGE AREA:data1#151590

Script execution debug information:Marker Time Diff
Start 1079382421.06301700 -
before headers 1079382421.06326400
Fatal error: Call to undefined function: bcsub() in /usr/local/var/www/netmrg/lib/phptimer.php on line 81

[/code1b7c6816f97]

Can you help me please ? oops

silfreed

15-03-2004 18:38:15

I posted a new version of the phptimer script that doesn't use bcsub(). If you'd like to try it, it might make debugging this problem a bit easier.

You can download it here
phptimer.php

-Doug

aero_climb

16-03-2004 04:09:13

I had installed the new phptimer.php.
Now I have this with debug=1 when I want to see a graph
[code1c8b0e78d68]
/usr/bin/rrdtool graph - -s -108000 -e -360 --title "%dev_name% - Load Average" -w 575 -h 100 -b 1000 -v "run queue size" --imgformat PNG DEF:zero=/usr/local/var/lib/netmrg/rrd/zero.rrd:mon_25:AVERAGE DEF:data1=/usr/local/var/lib/netmrg/rrd/mon_5.rrd:mon_5:AVERAGE DEF:data1l=/usr/local/var/lib/netmrg/rrd/mon_5.rrd:mon_5:LAST DEF:data1m=/usr/local/var/lib/netmrg/rrd/mon_5.rrd:mon_5:MAX LINE2:data1#330066:"5 Minute " GPRINT:data1l:LAST:"Current\:%8.2lf %s" GPRINT:data1:AVERAGE:"Average\:%8.2lf %s" GPRINT:data1m:MAX:"Maximum\:%8.2lf %s" COMMENT:"\n" VRULE:1079391600#F00000

Script execution debug information:
Marker Time Diff
Start 1079427743.56455100 -
before headers 1079427743.56476800 0.000217
before auth 1079427743.56509800 0.00033
after auth 1079427743.57166100 0.006563
before get command 1079427743.57186800 0.000207
after get command 1079427743.57763300 0.005765
before exec command 1079427743.57782800 0.000195
after exec command 1079427743.59344500 0.015617
Stop 1079427743.59369600 0.000251
Start to Stop 0.029145
[/code1c8b0e78d68]

But I discovered a problem with the netmrg_cron.sh program. I have in the netmrg user mailbox messages from Cron. The message is
[code1c8b0e78d68]
/sur/local/bin/netmrg_cron.sh: 1079427601 - : syntax error: operand expected (error token is " ")
[/code1c8b0e78d68]
I have this message every 5 minutes when Cron run netmrg_cron.sh...

silfreed

16-03-2004 07:25:24

Try just running netmrg-gatherer from cron instead of netmrg_cron.sh. All the shell script does is some cleanup if the gatherer dies for some reason, so running the gatherer directly is fine. You will probably want to redirect stdout, though ([i718dcccef2]netmrg-cron > /dev/null[/i718dcccef2]).

BTW, what language is your Linux installed with? ([i718dcccef2]echo $LANG[/i718dcccef2])

-Doug

t101

18-03-2004 11:28:41

details...
Debian 2.4.x
the netmrg cron is running as "netmrg" with no errors.


/usr/local/var/lib/netmrg/rrd# ls
mon_17.rrd mon_20.rrd mon_23.rrd mon_26.rrd mon_29.rrd mon_32.rrd mon_35.rrd mon_38.rrd
mon_18.rrd mon_21.rrd mon_24.rrd mon_27.rrd mon_30.rrd mon_33.rrd mon_36.rrd mon_39.rrd
mon_19.rrd mon_22.rrd mon_25.rrd mon_28.rrd mon_31.rrd mon_34.rrd mon_37.rrd zero.rrd

all the files are owned by netmrg

http//10.66.1.112/netmrg//get_graph.php?type=mon&id=1&debug=1

/usr/bin/rrdtool graph - -s -108000 -e -360 --title="Template Linux Box - System (UCD - CPU Percent User) (#1)" --imgformat PNG -g -w 575 -h 100 DEFdata1=/usr/local/var/lib/netmrg/rrd/mon_1.rrdmon_1AVERAGE AREAdata1#151590

Script execution debug informationMarker Time Diff
Start 1079627013.94881300 -
before headers 1079627013.94992300 0.001110
before auth 1079627013.95148100 0.001558
after auth 1079627013.96564900 0.014168
before get command 1079627013.96661500 0.000966
after get command 1079627013.98401800 0.017403
before exec command 1079627013.98495400 0.000936
after exec command 1079627014.04308500 0.058131
Stop 1079627014.04407800 0.000993
0.095265

anything I can try.

I have noticed that when I select "groups"

I get the folling error

Warning Wrong parameter count for srand() in /usr/local/var/www/netmrg/lib/format.php on line 213

Warning Wrong datatype for first argument in call to in_array in /usr/local/var/www/netmrg/lib/format.php on line 258

silfreed

18-03-2004 13:17:11

When you run this command from the command line, what do you get?

[code1240f8acde6]/usr/bin/rrdtool graph - -s -108000 -e -360 --title="Template Linux Box - System (UCD - CPU Percent User) (#1)" --imgformat PNG -g -w 575 -h 100 DEF:data1=/usr/local/var/lib/netmrg/rrd/mon_1.rrd:mon_1:AVERAGE AREA:data1#151590[/code1240f8acde6]

[quote240f8acde6="t101"]Warning Wrong parameter count for srand() in /usr/local/var/www/netmrg/lib/format.php on line 213

Warning Wrong datatype for first argument in call to in_array in /usr/local/var/www/netmrg/lib/format.php on line 258[/quote240f8acde6]

These errors shouldn't cause any problems with viewing graphs, just the nav history will be broken. I develop with the latest PHP, so I don't get them. I'll get them fixed for the next version soon.

-Doug