[rrd-users] Re: can't use -B.-O flag

Milan Obuch milan.obuch at in.nextra.sk
Sat Dec 21 16:21:53 MET 2002


Hi, Herman,

On Saturday 21 December 2002 15:00, ^Herman^ wrote:
> rrdtool graph /home/herman/public_html/stats/misc_test.gd --start -1d \
> --title "Misc. \
> DEF:cs=vmstat.rrd:cs:AVERAGE \
> DEF:intr=vmstat.rrd:int:AVERAGE \
> CDEF:allusers=cs,intr,+ \
> CDEF:wrongdata=allusers,UN,INF,UNKN,IF \
> AREA:wrongdata#FF0000:"Wrong data" \
> AREA:cs#ff3377:"(Context switches/s)" \
> LINE2:intr#0000ff:"Intr/s"
>
> Executes cleanly and gives me a gd image.
>
> root at systemoperator:/home/herman/stats# sh test.sh
> 495x172
>
> Now i use this image as background since i do not know how to generate a
> .gd image from a jpg/bmp/gif
>

There is pngtogd utility in gd package somewhere. I did not remember exactly, 
however, I did use it and it works as its name implies - converts png images 
to gd. (Maybe it is spelled png2gd, I am not sure).

> rrdtool graph /home/herman/public_html/stats/misc_test.gd --start -1d \
> --title "Misc. $arg" \
> -B /home/herman/public_html/stats/misc_test.gd \
> DEF:cs=vmstat.rrd:cs:AVERAGE \
> DEF:intr=vmstat.rrd:int:AVERAGE \
> CDEF:allusers=cs,intr,+ \
> CDEF:wrongdata=allusers,UN,INF,UNKN,IF \
> AREA:wrongdata#FF0000:"Wrong data" \
> AREA:cs#ff3377:"(Context switches/s)" \
> LINE2:intr#0000ff:"Intr/s"
>

I see no reason for refusing to work correctly, anyway, using the same file 
name for both output image file and background source image file looks a bit 
strange to me, even if this is (maybe) not the problem itself.

>
> after 2 minutes the program segfaults.
>
> root at systemoperator:/home/herman/stats# sh test.sh
> test.sh: line 11:  7826 Segmentation fault      rrdtool graph
> /home/herman/public_html/stats/misc_test.gd --start -1d --title "Misc.
> $arg" -B /home/herman/public_html/stats/misc_test.gd
> DEF:cs=vmstat.rrd:cs:AVERAGE DEF:intr=vmstat.rrd:int:AVERAGE
> CDEF:allusers=cs,intr,+ CDEF:wrongdata=allusers,UN,INF,UNKN,IF
> AREA:wrongdata#FF0000:"Wrong data" AREA:cs#ff3377:"(Context switches/s)"
> LINE2:intr#0000ff:"Intr/s"
>

Could You try to look where rrdtool segfaults? Does it dump core? Using 'gdb 
rrdtool core' and then issuing command bt may give us an idea, where program 
crashes, if compiled with symbols. With so sparse information available we 
can only use crystal ball to try to find the problem :)

>
> I can't get the overlay and background pictures to work.
>
> so I have 2 questions.
>
> 1. How do i convert ANY image to gd format.
> 2. Why does it segfault over and over. and how can i fix this ?

I think both are partially answered above.
Anyway, it would be usefull to know rrdtool version, system used (version too 
maybe), try to do something more to make it easier for both you and us to 
find the problem and fix it.
Regards
Milan

--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the rrd-users mailing list