我有3个独立的rrd文件,每个都有cpu平均数据。 我可以单独绘制每个单独的问题。 cpu平均线和趋势线(使用LSLSLOPE)
我被要求把所有三个结合成一个图。 所以我拿了我的DEF,CEF和VDEF,用a,b和c做成了。 我一定犯了错误,因为我得到以下错误
./graph3avg.sh: line 42: VDEF:avg_a=a,AVERAGE: command not found ./graph3avg.sh: line 59: LINE2:avg_a#f0610f:App CPU Avg:dashes=5: command not found
我不确定它是一个命令与rrdtool订购的东西,或者如果我正在做一些根本性的错误。
谢谢你的时间!
这里是shell脚本的rrd命令
graphname="Server $1 trending" rrdtool graph $ofile \ --imgformat=PNG \ --alt-autoscale-max \ --start=$starttime \ --end=$endtime \ --title="$graphname" \ --font TITLE:12: \ --units-exponent=2 \ --color CANVAS#ececec \ --vertical-label="CPU %" \ --height=400 \ --width=1000 \ DEF:a="$ifile":cpu:AVERAGE:step=3600 \ DEF:b="$ifile2":cpu:AVERAGE:step=3600 \ DEF:c="$ifile3":cpu:AVERAGE:step=3600 \ VDEF:avg_a=a,AVERAGE \ VDEF:avg_b=b,AVERAGE \ VDEF:avg_c=c,AVERAGE \ VDEF:slope_a=a,LSLSLOPE \ VDEF:slope_b=b,LSLSLOPE \ VDEF:slope_c=c,LSLSLOPE \ VDEF:cons_a=a,LSLINT \ VDEF:cons_b=b,LSLINT \ VDEF:cons_c=c,LSLINT \ CDEF:lsl2_a=a,POP,slope_a,COUNT,*,cons_a,+ \ CDEF:lsl2_b=b,POP,slope_b,COUNT,*,cons_b,+ \ CDEF:lsl2_c=c,POP,slope_c,COUNT,*,cons_c,+ \ LINE2:avg_a#f0610f:"App CPU Avg":dashes=5 \ LINE3:lsl2_a#bd8a6c:"App CPU Trend\n" \ LINE2:avg_b#0ff061:"Web CPU Avg":dashes=5 \ LINE3:lsl2_b#48a068:"Web CPU Trend\n" \ LINE2:avg_c#1fbcd8:"DB CPU Avg":dashes=5 \ LINE3:lsl2_c#619da7:"App CPU Trend\n" \ COMMENT:"\s" \ COMMENT:"Start Date $startdate " \ COMMENT:"End Date $enddate " \ COMMENT:"\n" \ COMMENT:"\n" \ COMMENT:"Graph created on $today"