The CDEF is the following:
Code: Select all
CDEF Items
Item Item Value
Item #1 Special Data Source: CURRENT_DATA_SOURCE
Item #2 Custom String: 100
Item #3 Operator: *
Item #4 Special Data Source: ALL_DATA_SOURCES_NODUPS
Item #5 Operator: /
Code: Select all
RRDTool Command:
/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="dkv71u95 - CPU Usage" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="cpu ticks" \
--slope-mode \
--font TITLE:9: \
--font AXIS:7: \
--font LEGEND:8: \
--font UNIT:7: \
DEF:a="/data/unixweb/cacti-0.8.7c/rra/dkv71u95_ucd_sscpurawkernel_2247.rrd":ucd_ssCpuRawKernel:AVERAGE \
DEF:b="/data/unixweb/cacti-0.8.7c/rra/dkv71u95_ucd_sscpurawwait_2249.rrd":ucd_ssCpuRawWait:AVERAGE \
DEF:c="/data/unixweb/cacti-0.8.7c/rra/dkv71u95_ucd_sscpurawsystem_2293.rrd":ucd_ssCpuRawSystem:AVERAGE \
DEF:d="/data/unixweb/cacti-0.8.7c/rra/dkv71u95_ucd_sscpurawuser_2248.rrd":ucd_ssCpuRawUser:AVERAGE \
DEF:e="/data/unixweb/cacti-0.8.7c/rra/dkv71u95_ucd_sscpurawnice_2292.rrd":ucd_ssCpuRawNice:AVERAGE \
DEF:f="/data/unixweb/cacti-0.8.7c/rra/dkv71u95_ucd_sscpurawidle_2246.rrd":ucd_ssCpuRawIdle:AVERAGE \
CDEF:cdefa=a,100,*,,/ \
CDEF:cdeff=b,100,*,,/ \
CDEF:cdefba=c,100,*,,/ \
CDEF:cdefbf=d,100,*,,/ \
CDEF:cdefca=e,100,*,,/ \
CDEF:cdefcf=f,100,*,,/ \
AREA:cdefa#FF0000FF:"Kernel" \
GPRINT:cdefa:LAST:"Current\:%8.2lf %s" \
GPRINT:cdefa:AVERAGE:"Avg\:%8.2lf %s" \
GPRINT:cdefa:MIN:"Min\:%8.2lf %s" \
GPRINT:cdefa:MAX:"Max\:%8.2lf %s\n" \
AREA:cdeff#FFF200FF:"Wait":STACK \
GPRINT:cdeff:LAST:" Current\:%8.2lf %s" \
GPRINT:cdeff:AVERAGE:"Avg\:%8.2lf %s" \
GPRINT:cdeff:MIN:"Min\:%8.2lf %s" \
GPRINT:cdeff:MAX:"Max\:%8.2lf %s\n" \
AREA:cdefba#7EE600FF:"System":STACK \
GPRINT:cdefba:LAST:"Current\:%8.2lf %s" \
GPRINT:cdefba:AVERAGE:"Avg\:%8.2lf %s" \
GPRINT:cdefba:MIN:"Min\:%8.2lf %s" \
GPRINT:cdefba:MAX:"Max\:%8.2lf %s\n" \
AREA:cdefbf#0000FFFF:"User":STACK \
GPRINT:cdefbf:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefbf:AVERAGE:"Avg\:%8.2lf %s" \
GPRINT:cdefbf:MIN:"Min\:%8.2lf %s" \
GPRINT:cdefbf:MAX:"Max\:%8.2lf %s\n" \
AREA:cdefca#EA8F00FF:"Nice":STACK \
GPRINT:cdefca:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefca:AVERAGE:"Avg\:%8.2lf %s" \
GPRINT:cdefca:MIN:"Min\:%8.2lf %s" \
GPRINT:cdefca:MAX:"Max\:%8.2lf %s\n" \
AREA:cdefcf#C0C0C0FF:"Idle":STACK \
GPRINT:cdefcf:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefcf:AVERAGE:"Avg\:%8.2lf %s" \
GPRINT:cdefcf:MIN:"Min\:%8.2lf %s" \
GPRINT:cdefcf:MAX:"Max\:%8.2lf %s"
RRDTool Says:
ERROR: invalid rpn expression in: a,100,*,,/
Code: Select all
/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="dkv71u95 - CPU Usage" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="cpu ticks" \
--slope-mode \
--font TITLE:9: \
--font AXIS:7: \
--font LEGEND:8: \
--font UNIT:7: \
DEF:a="/data/unixweb/cacti-0.8.7b/rra/dkv71u95_ucd_sscpurawkernel_2247.rrd":ucd_ssCpuRawKernel:AVERAGE \
DEF:b="/data/unixweb/cacti-0.8.7b/rra/dkv71u95_ucd_sscpurawkernel_2247.rrd":ucd_ssCpuRawKernel:MAX \
DEF:c="/data/unixweb/cacti-0.8.7b/rra/dkv71u95_ucd_sscpurawwait_2249.rrd":ucd_ssCpuRawWait:AVERAGE \
DEF:d="/data/unixweb/cacti-0.8.7b/rra/dkv71u95_ucd_sscpurawwait_2249.rrd":ucd_ssCpuRawWait:MAX \
DEF:e="/data/unixweb/cacti-0.8.7b/rra/dkv71u95_ucd_sscpurawsystem_2293.rrd":ucd_ssCpuRawSystem:AVERAGE \
DEF:f="/data/unixweb/cacti-0.8.7b/rra/dkv71u95_ucd_sscpurawsystem_2293.rrd":ucd_ssCpuRawSystem:MAX \
DEF:g="/data/unixweb/cacti-0.8.7b/rra/dkv71u95_ucd_sscpurawuser_2248.rrd":ucd_ssCpuRawUser:AVERAGE \
DEF:h="/data/unixweb/cacti-0.8.7b/rra/dkv71u95_ucd_sscpurawuser_2248.rrd":ucd_ssCpuRawUser:MAX \
DEF:i="/data/unixweb/cacti-0.8.7b/rra/dkv71u95_ucd_sscpurawnice_2292.rrd":ucd_ssCpuRawNice:AVERAGE \
DEF:j="/data/unixweb/cacti-0.8.7b/rra/dkv71u95_ucd_sscpurawnice_2292.rrd":ucd_ssCpuRawNice:MAX \
DEF:ba="/data/unixweb/cacti-0.8.7b/rra/dkv71u95_ucd_sscpurawidle_2246.rrd":ucd_ssCpuRawIdle:AVERAGE \
DEF:bb="/data/unixweb/cacti-0.8.7b/rra/dkv71u95_ucd_sscpurawidle_2246.rrd":ucd_ssCpuRawIdle:MAX \
CDEF:cdefa=a,100,*,TIME,1233130581,GT,a,a,UN,0,a,IF,IF,TIME,1233130581,GT,c,c,UN,0,c,IF,IF,TIME,1233130581,GT,e,e,UN,0,e,IF,IF,TIME,1233130581,GT,g,g,UN,0,g,IF,IF,TIME,1233130581,GT,i,i,UN,0,i,IF,IF,TIME,1233130581,GT,ba,ba,UN,0,ba,IF,IF,+,+,+,+,+,/ \
CDEF:cdefe=b,100,*,TIME,1233130581,GT,b,b,UN,0,b,IF,IF,TIME,1233130581,GT,d,d,UN,0,d,IF,IF,TIME,1233130581,GT,f,f,UN,0,f,IF,IF,TIME,1233130581,GT,h,h,UN,0,h,IF,IF,TIME,1233130581,GT,j,j,UN,0,j,IF,IF,TIME,1233130581,GT,bb,bb,UN,0,bb,IF,IF,+,+,+,+,+,/ \
CDEF:cdeff=c,100,*,TIME,1233130581,GT,a,a,UN,0,a,IF,IF,TIME,1233130581,GT,c,c,UN,0,c,IF,IF,TIME,1233130581,GT,e,e,UN,0,e,IF,IF,TIME,1233130581,GT,g,g,UN,0,g,IF,IF,TIME,1233130581,GT,i,i,UN,0,i,IF,IF,TIME,1233130581,GT,ba,ba,UN,0,ba,IF,IF,+,+,+,+,+,/ \
CDEF:cdefj=d,100,*,TIME,1233130581,GT,b,b,UN,0,b,IF,IF,TIME,1233130581,GT,d,d,UN,0,d,IF,IF,TIME,1233130581,GT,f,f,UN,0,f,IF,IF,TIME,1233130581,GT,h,h,UN,0,h,IF,IF,TIME,1233130581,GT,j,j,UN,0,j,IF,IF,TIME,1233130581,GT,bb,bb,UN,0,bb,IF,IF,+,+,+,+,+,/ \
CDEF:cdefba=e,100,*,TIME,1233130581,GT,a,a,UN,0,a,IF,IF,TIME,1233130581,GT,c,c,UN,0,c,IF,IF,TIME,1233130581,GT,e,e,UN,0,e,IF,IF,TIME,1233130581,GT,g,g,UN,0,g,IF,IF,TIME,1233130581,GT,i,i,UN,0,i,IF,IF,TIME,1233130581,GT,ba,ba,UN,0,ba,IF,IF,+,+,+,+,+,/ \
CDEF:cdefbe=f,100,*,TIME,1233130581,GT,b,b,UN,0,b,IF,IF,TIME,1233130581,GT,d,d,UN,0,d,IF,IF,TIME,1233130581,GT,f,f,UN,0,f,IF,IF,TIME,1233130581,GT,h,h,UN,0,h,IF,IF,TIME,1233130581,GT,j,j,UN,0,j,IF,IF,TIME,1233130581,GT,bb,bb,UN,0,bb,IF,IF,+,+,+,+,+,/ \
CDEF:cdefbf=g,100,*,TIME,1233130581,GT,a,a,UN,0,a,IF,IF,TIME,1233130581,GT,c,c,UN,0,c,IF,IF,TIME,1233130581,GT,e,e,UN,0,e,IF,IF,TIME,1233130581,GT,g,g,UN,0,g,IF,IF,TIME,1233130581,GT,i,i,UN,0,i,IF,IF,TIME,1233130581,GT,ba,ba,UN,0,ba,IF,IF,+,+,+,+,+,/ \
CDEF:cdefbj=h,100,*,TIME,1233130581,GT,b,b,UN,0,b,IF,IF,TIME,1233130581,GT,d,d,UN,0,d,IF,IF,TIME,1233130581,GT,f,f,UN,0,f,IF,IF,TIME,1233130581,GT,h,h,UN,0,h,IF,IF,TIME,1233130581,GT,j,j,UN,0,j,IF,IF,TIME,1233130581,GT,bb,bb,UN,0,bb,IF,IF,+,+,+,+,+,/ \
CDEF:cdefca=i,100,*,TIME,1233130581,GT,a,a,UN,0,a,IF,IF,TIME,1233130581,GT,c,c,UN,0,c,IF,IF,TIME,1233130581,GT,e,e,UN,0,e,IF,IF,TIME,1233130581,GT,g,g,UN,0,g,IF,IF,TIME,1233130581,GT,i,i,UN,0,i,IF,IF,TIME,1233130581,GT,ba,ba,UN,0,ba,IF,IF,+,+,+,+,+,/ \
CDEF:cdefce=j,100,*,TIME,1233130581,GT,b,b,UN,0,b,IF,IF,TIME,1233130581,GT,d,d,UN,0,d,IF,IF,TIME,1233130581,GT,f,f,UN,0,f,IF,IF,TIME,1233130581,GT,h,h,UN,0,h,IF,IF,TIME,1233130581,GT,j,j,UN,0,j,IF,IF,TIME,1233130581,GT,bb,bb,UN,0,bb,IF,IF,+,+,+,+,+,/ \
CDEF:cdefcf=ba,100,*,TIME,1233130581,GT,a,a,UN,0,a,IF,IF,TIME,1233130581,GT,c,c,UN,0,c,IF,IF,TIME,1233130581,GT,e,e,UN,0,e,IF,IF,TIME,1233130581,GT,g,g,UN,0,g,IF,IF,TIME,1233130581,GT,i,i,UN,0,i,IF,IF,TIME,1233130581,GT,ba,ba,UN,0,ba,IF,IF,+,+,+,+,+,/ \
CDEF:cdefcj=bb,100,*,TIME,1233130581,GT,b,b,UN,0,b,IF,IF,TIME,1233130581,GT,d,d,UN,0,d,IF,IF,TIME,1233130581,GT,f,f,UN,0,f,IF,IF,TIME,1233130581,GT,h,h,UN,0,h,IF,IF,TIME,1233130581,GT,j,j,UN,0,j,IF,IF,TIME,1233130581,GT,bb,bb,UN,0,bb,IF,IF,+,+,+,+,+,/ \
AREA:cdefa#FF0000FF:"Kernel" \
GPRINT:cdefa:LAST:"Current\:%8.2lf %s" \
GPRINT:cdefa:AVERAGE:"Avg\:%8.2lf %s" \
GPRINT:cdefa:MIN:"Min\:%8.2lf %s" \
GPRINT:cdefe:MAX:"Max\:%8.2lf %s\n" \
AREA:cdeff#FFF200FF:"Wait":STACK \
GPRINT:cdeff:LAST:" Current\:%8.2lf %s" \
GPRINT:cdeff:AVERAGE:"Avg\:%8.2lf %s" \
GPRINT:cdeff:MIN:"Min\:%8.2lf %s" \
GPRINT:cdefj:MAX:"Max\:%8.2lf %s\n" \
AREA:cdefba#7EE600FF:"System":STACK \
GPRINT:cdefba:LAST:"Current\:%8.2lf %s" \
GPRINT:cdefba:AVERAGE:"Avg\:%8.2lf %s" \
GPRINT:cdefba:MIN:"Min\:%8.2lf %s" \
GPRINT:cdefbe:MAX:"Max\:%8.2lf %s\n" \
AREA:cdefbf#0000FFFF:"User":STACK \
GPRINT:cdefbf:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefbf:AVERAGE:"Avg\:%8.2lf %s" \
GPRINT:cdefbf:MIN:"Min\:%8.2lf %s" \
GPRINT:cdefbj:MAX:"Max\:%8.2lf %s\n" \
AREA:cdefca#EA8F00FF:"Nice":STACK \
GPRINT:cdefca:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefca:AVERAGE:"Avg\:%8.2lf %s" \
GPRINT:cdefca:MIN:"Min\:%8.2lf %s" \
GPRINT:cdefce:MAX:"Max\:%8.2lf %s\n" \
AREA:cdefcf#C0C0C0FF:"Idle":STACK \
GPRINT:cdefcf:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefcf:AVERAGE:"Avg\:%8.2lf %s" \
GPRINT:cdefcf:MIN:"Min\:%8.2lf %s" \
GPRINT:cdefcj:MAX:"Max\:%8.2lf %s"
RRDTool Says:
OK