This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Rrd::graph makes Segment violation

Old posts that have not been replied to for several years.
Locked
User avatar
CrazyCat
Revered One
Posts: 1279
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Rrd::graph makes Segment violation

Post by CrazyCat »

Well, I don't know if it's eggdrop or TCL but I've a trouble with Rrd package:
When trying to do a Rrd::graph, I've a wonderful SEGMENT VIOLATION.
Debug (eggdrop v1.6.15) written Wed Oct 1 12:06:24 2003
Full Patch List:
Tcl library: /usr/share/tcl8.3
Tcl version: 8.3.5 (header version 8.3.5)
Compile flags: gcc -pipe -g -O2 -Wall -I.. -I.. -DHAVE_CONFIG_H
Link flags: gcc -pipe
Strip flags: strip
tclhash.c/684 [Tcl proc: stats:test, param: $_dcc1 $_dcc2 $_dcc3]
stats:test is a simple procedure wich just launch my Rrd::graph.
When putting the Rrd::graph in a file and launching it by shell, no trouble, my graph is correctly created.
Anyone understand which kind of trouble it might be?
TCL call

Code: Select all

Rrd::graph $rrdfiles/servers-day.png -a PNG -s -1day -v \"servers\/ircops\" -t \"Servers and ircops on line (1 day)\" DEF:totalservers=$rrdfiles/$main_serv.rrd:totalservers:AVERAGE DEF:maxservers=$rrdfiles/$main_serv.rrd:totalservers:MAX DEF:totalircops=$rrdfiles/$main_serv.rrd:ircops:AVERAGE DEF:maxircops=$rrdfiles/$main_serv.rrd:ircops:MAX DEF:usersglobal=$rrdfiles/$main_serv.rrd:usersglobal:AVERAGE CDEF:copsperserver=totalircops,totalservers,\/ CDEF:percircops=totalircops,100,*,usersglobal,\/ AREA:totalservers\#FF0000:\"Servers on line\" LINE2:totalircops\#000000:\"Ircops on line\\l\" GPRINT:totalservers:AVERAGE:\"Servers -> Average\\: %lf\" GPRINT:maxservers:MAX:\"Max\\: %lf\" GPRINT:totalservers:LAST:\"Current\\: %lf\\l\" GPRINT:totalircops:AVERAGE:\"Ircops -> Average\\: %lf\" GPRINT:maxircops:MAX:\"Max\\: %lf\" GPRINT:totalircops:LAST:\"Current\\: %lf\\l\" GPRINT:copsperserver:LAST:\"Ircops per Server\\: %lf\\l\" GPRINT:percircops:LAST:\"Ircops\\: %lf%% of total users\\l\"
file output (replacing Rrd:graph by rrdtool graph)

Code: Select all

rrdtool graph /home/eggdrop/ircmrtg/servers-day.png -a PNG -s -1day -v "servers/ircops" -t "Servers and ircops on line (1 day)" DEF:totalservers=/home/eggdrop/ircmrtg/irc.passion-tchat.com.rrd:totalservers:AVERAGE DEF:maxservers=/home/eggdrop/ircmrtg/irc.passion-tchat.com.rrd:totalservers:MAX DEF:totalircops=/home/eggdrop/ircmrtg/irc.passion-tchat.com.rrd:ircops:AVERAGE DEF:maxircops=/home/eggdrop/ircmrtg/irc.passion-tchat.com.rrd:ircops:MAX DEF:usersglobal=/home/eggdrop/ircmrtg/irc.passion-tchat.com.rrd:usersglobal:AVERAGE CDEF:copsperserver=totalircops,totalservers,/ CDEF:percircops=totalircops,100,*,usersglobal,/ AREA:totalservers#FF0000:"Servers on line" LINE2:totalircops#000000:"Ircops on line\l" GPRINT:totalservers:AVERAGE:"Servers -> Average\: %lf" GPRINT:maxservers:MAX:"Max\: %lf" GPRINT:totalservers:LAST:"Current\: %lf\l" GPRINT:totalircops:AVERAGE:"Ircops -> Average\: %lf" GPRINT:maxircops:MAX:"Max\: %lf" GPRINT:totalircops:LAST:"Current\: %lf\l" GPRINT:copsperserver:LAST:"Ircops per Server\: %lf\l" GPRINT:percircops:LAST:"Ircops\: %lf%% of total users\l"
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

I have just come to report this on another thread here.

It looks like the number of arguements allowed is limited when using Rrd::graph.

After getting a rather odd Y axis, I can only apply one of the two definitions needed to cause the Y axis to return to normal.
User avatar
CrazyCat
Revered One
Posts: 1279
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Post by CrazyCat »

so it means we can't make graphs with multiples datas lines using the same Yaxis?
I hate this, but I think I'll have to generate shell scripts and then launch them, if no one had a better way :(
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

It is likely far better to use a cron job for generating the graphs.

Eggdrop can do any updates.
User avatar
CrazyCat
Revered One
Posts: 1279
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Post by CrazyCat »

yes... but no :)
I'm generating different png, and only the egg knows which file it have to generate.
So I think than creating a schell script and running it by the egg is better, and it allows me to have only one file.
Locked