error when I change CDEF of graph

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
joecen
Posts: 15
Joined: Wed Mar 02, 2005 10:40 am

error when I change CDEF of graph

Post by joecen »

hi,all

I found an error when I changed the CDEF of a graph.

I created a "none host " and "none graph template" graph in graph management . I added many "graph items" and created a new "CDEF" item with this graph.

this is the code of my graph:

Code: Select all

/opt/rrdtool/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="1_IMGUV_SUM" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="bits per second" \
DEF:a="/opt/cacti/httpd/htdocs/cacti/rra/traffic_in_31.rrd":traffic_in:AVERAGE \
DEF:b="/opt/cacti/httpd/htdocs/cacti/rra/traffic_in_44.rrd":traffic_in:AVERAGE \
DEF:c="/opt/cacti/httpd/htdocs/cacti/rra/traffic_in_46.rrd":traffic_in:AVERAGE \
DEF:d="/opt/cacti/httpd/htdocs/cacti/rra/traffic_in_45.rrd":traffic_in:AVERAGE \
DEF:e="/opt/cacti/httpd/htdocs/cacti/rra/traffic_in_49.rrd":traffic_out:AVERAGE \
DEF:f="/opt/cacti/httpd/htdocs/cacti/rra/traffic_in_46.rrd":traffic_out:AVERAGE \
DEF:g="/opt/cacti/httpd/htdocs/cacti/rra/traffic_in_31.rrd":traffic_out:AVERAGE \
DEF:h="/opt/cacti/httpd/htdocs/cacti/rra/traffic_in_44.rrd":traffic_out:AVERAGE \
DEF:i="/opt/cacti/httpd/htdocs/cacti/rra/traffic_in_45.rrd":traffic_out:AVERAGE \
DEF:j="/opt/cacti/httpd/htdocs/cacti/rra/traffic_in_17.rrd":traffic_in:AVERAGE \
CDEF:cdefd=8,a,b,c,d,e,+,+,+,+,* \
CDEF:cdefbb=8,f,g,h,i,j,+,+,+,+,* \
AREA:a#:""  \
AREA:b#:""  \
AREA:c#:""  \
AREA:cdefd#7EE600:"IMGUV_SUM_INPUT"  \
GPRINT:cdefd:LAST:" Current\:%8.2lf %s"  \
GPRINT:cdefd:MAX:"Max\:%8.2lf %s"  \
GPRINT:cdefd:AVERAGE:"AVERAGE\:%8.2lf %s\n"  \
AREA:e#:""  \
AREA:f#:""  \
AREA:g#:""  \
AREA:h#:""  \
LINE1:cdefbb#3D168B:"imguv_SUM_OUTPUT"  \
GPRINT:cdefbb:LAST:"Current\:%8.2lf %s"  \
GPRINT:cdefbb:MAX:"MAX\:%8.2lf %s"  \
GPRINT:cdefbb:AVERAGE:"AVERAGE\:%8.2lf %s"  \
AREA:j#:"" 
I wanna delete a "DEF" in the graph.So I must choose another "CDEF" item with 4 data source.
but the graph couldn't display after I choose the new "CDEF" item.
I saw the code and found the old "CDEF" item still exist.

Code: Select all

/opt/rrdtool/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="1_IMGUV_SUM" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="bits per second" \
DEF:a="/opt/cacti/httpd/htdocs/cacti/rra/traffic_in_31.rrd":traffic_in:AVERAGE \
DEF:b="/opt/cacti/httpd/htdocs/cacti/rra/traffic_in_44.rrd":traffic_in:AVERAGE \
DEF:c="/opt/cacti/httpd/htdocs/cacti/rra/traffic_in_46.rrd":traffic_in:AVERAGE \
DEF:d="/opt/cacti/httpd/htdocs/cacti/rra/traffic_in_45.rrd":traffic_in:AVERAGE \
DEF:e="/opt/cacti/httpd/htdocs/cacti/rra/traffic_in_49.rrd":traffic_out:AVERAGE \
DEF:f="/opt/cacti/httpd/htdocs/cacti/rra/traffic_in_46.rrd":traffic_out:AVERAGE \
DEF:g="/opt/cacti/httpd/htdocs/cacti/rra/traffic_in_31.rrd":traffic_out:AVERAGE \
DEF:h="/opt/cacti/httpd/htdocs/cacti/rra/traffic_in_45.rrd":traffic_out:AVERAGE \
CDEF:cdefd=8,a,b,c,d,+,+,+,* \
CDEF:cdefe=8,a,b,c,d,e,+,+,+,+,* \
CDEF:cdefba=8,e,f,g,h,+,+,+,* \
CDEF:cdefbb=8,f,g,h,i,j,+,+,+,+,* \
AREA:a#:""  \
AREA:b#:""  \
AREA:c#:""  \
AREA:cdefd#7EE600:"IMGUV_SUM_INPUT"  \
GPRINT:cdefe:LAST:" Current\:%8.2lf %s"  \
GPRINT:cdefe:MAX:"Max\:%8.2lf %s"  \
GPRINT:cdefe:AVERAGE:"AVERAGE\:%8.2lf %s\n"  \
AREA:e#:""  \
AREA:f#:""  \
AREA:g#:""  \
LINE1:cdefba#3D168B:"imguv_SUM_OUTPUT"  \
GPRINT:cdefbb:LAST:"Current\:%8.2lf %s"  \
GPRINT:cdefbb:MAX:"MAX\:%8.2lf %s"  \
GPRINT:cdefbb:AVERAGE:"AVERAGE\:%8.2lf %s" 

my question is:
why the old "CDEF" item still exist?
how to delete the old "CDEF" code on my graph?
Attachments
CDEF.GIF
CDEF.GIF (5.04 KiB) Viewed 2919 times
GRAPH.GIF
GRAPH.GIF (11.38 KiB) Viewed 2923 times
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Um.... Pretty sure your RPN should not be

Code: Select all

8,a,b,c,d,+,+,+,*
but

Code: Select all

a,b,+,c,+,d,+,8,*
But I could be wrong.



Removing the CDEF, well, edit the graph items and set the CDEF to None, click save.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
joecen
Posts: 15
Joined: Wed Mar 02, 2005 10:40 am

Post by joecen »

rony wrote:Um.... Pretty sure your RPN should not be

Code: Select all

8,a,b,c,d,+,+,+,*
but

Code: Select all

a,b,+,c,+,d,+,8,*
But I could be wrong.



Removing the CDEF, well, edit the graph items and set the CDEF to None, click save.
Um..,I try to edit the graph items and set the CDEF to None.
but when I saw the code of graph ,I found the CDEF code still exist. :(
e'en I delete the item with the CDEF ,the CDEF code still exist .... :evil:

originally code:

Code: Select all

/opt/rrdtool/bin/rrdtool graph - \ 
--imgformat=PNG \ 
--start=-86400 \ 
--end=-300 \ 
--title="1_IMGUV_SUM" \ 
--base=1000 \ 
--height=120 \ 
--width=500 \ 
--alt-autoscale-max \ 
--lower-limit=0 \ 
--vertical-label="bits per second" \ 
DEF:a="/opt/cacti/httpd/htdocs/cacti/rra/traffic_in_31.rrd":traffic_in:AVERAGE \ 
DEF:b="/opt/cacti/httpd/htdocs/cacti/rra/traffic_in_44.rrd":traffic_in:AVERAGE \ 
DEF:c="/opt/cacti/httpd/htdocs/cacti/rra/traffic_in_46.rrd":traffic_in:AVERAGE \ 
DEF:d="/opt/cacti/httpd/htdocs/cacti/rra/traffic_in_45.rrd":traffic_in:AVERAGE \ 
DEF:e="/opt/cacti/httpd/htdocs/cacti/rra/traffic_in_49.rrd":traffic_out:AVERAGE \ 
DEF:f="/opt/cacti/httpd/htdocs/cacti/rra/traffic_in_46.rrd":traffic_out:AVERAGE \ 
DEF:g="/opt/cacti/httpd/htdocs/cacti/rra/traffic_in_31.rrd":traffic_out:AVERAGE \ 
DEF:h="/opt/cacti/httpd/htdocs/cacti/rra/traffic_in_44.rrd":traffic_out:AVERAGE \ 
DEF:i="/opt/cacti/httpd/htdocs/cacti/rra/traffic_in_45.rrd":traffic_out:AVERAGE \ 
DEF:j="/opt/cacti/httpd/htdocs/cacti/rra/traffic_in_17.rrd":traffic_in:AVERAGE \ 
CDEF:cdefd=8,a,b,c,d,e,+,+,+,+,* \ 
CDEF:cdefbb=8,f,g,h,i,j,+,+,+,+,* \ 
AREA:a#:""  \ 
AREA:b#:""  \ 
AREA:c#:""  \ 
AREA:cdefd#7EE600:"IMGUV_SUM_INPUT"  \ 
GPRINT:cdefd:LAST:" Current\:%8.2lf %s"  \ 
GPRINT:cdefd:MAX:"Max\:%8.2lf %s"  \ 
GPRINT:cdefd:AVERAGE:"AVERAGE\:%8.2lf %s\n"  \ 
AREA:e#:""  \ 
AREA:f#:""  \ 
AREA:g#:""  \ 
AREA:h#:""  \ 
LINE1:cdefbb#3D168B:"imguv_SUM_OUTPUT"  \ 
GPRINT:cdefbb:LAST:"Current\:%8.2lf %s"  \ 
GPRINT:cdefbb:MAX:"MAX\:%8.2lf %s"  \ 
GPRINT:cdefbb:AVERAGE:"AVERAGE\:%8.2lf %s"  \ 
AREA:j#:"" 

the code after I deleted the item with CDEF:

Code: Select all

/opt/rrdtool/bin/rrdtool graph - \ 
--imgformat=PNG \ 
--start=-86400 \ 
--end=-300 \ 
--title="1_IMGUV_SUM" \ 
--base=1000 \ 
--height=120 \ 
--width=500 \ 
--alt-autoscale-max \ 
--lower-limit=0 \ 
--vertical-label="bits per second" \ 
DEF:a="/opt/cacti/httpd/htdocs/cacti/rra/traffic_in_31.rrd":traffic_in:AVERAGE \ 
DEF:b="/opt/cacti/httpd/htdocs/cacti/rra/traffic_in_44.rrd":traffic_in:AVERAGE \ 
DEF:c="/opt/cacti/httpd/htdocs/cacti/rra/traffic_in_46.rrd":traffic_in:AVERAGE \ 
DEF:d="/opt/cacti/httpd/htdocs/cacti/rra/traffic_in_45.rrd":traffic_in:AVERAGE \ 
DEF:e="/opt/cacti/httpd/htdocs/cacti/rra/traffic_in_46.rrd":traffic_out:AVERAGE \ 
DEF:f="/opt/cacti/httpd/htdocs/cacti/rra/traffic_in_31.rrd":traffic_out:AVERAGE \ 
DEF:g="/opt/cacti/httpd/htdocs/cacti/rra/traffic_in_44.rrd":traffic_out:AVERAGE \ 
DEF:h="/opt/cacti/httpd/htdocs/cacti/rra/traffic_in_45.rrd":traffic_out:AVERAGE \ 
CDEF:cdefd=8,a,b,c,d,e,+,+,+,+,* \ 
CDEF:cdefbb=8,f,g,h,i,j,+,+,+,+,* \ 
AREA:a#:""  \ 
AREA:b#:""  \ 
AREA:c#:""  \ 
AREA:cdefd#7EE600:"IMGUV_SUM_INPUT"  \ 
GPRINT:cdefd:LAST:" Current\:%8.2lf %s"  \ 
GPRINT:cdefd:MAX:"Max\:%8.2lf %s"  \ 
GPRINT:cdefd:AVERAGE:"AVERAGE\:%8.2lf %s\n"  \ 
AREA:e#:""  \ 
AREA:f#:""  \ 
AREA:g#:""  \ 
AREA:h#:""  \ 
LINE1:cdefbb#3D168B:"imguv_SUM_OUTPUT"  \ 
GPRINT:cdefbb:LAST:"Current\:%8.2lf %s"  \ 
GPRINT:cdefbb:MAX:"MAX\:%8.2lf %s"  \ 
GPRINT:cdefbb:AVERAGE:"AVERAGE\:%8.2lf %s"  \ 
AREA:j#:"" 
I saw two "DEF" had been deleted,but two "CDEF" still exist .
joecen
Posts: 15
Joined: Wed Mar 02, 2005 10:40 am

Post by joecen »

up
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests