POSTS
rrdtool 實作6台主機 LOADING 繪圖
rrdtool graph test.png \
–start=-86400 \
–end=-300 \
–base=1000 \
–title “大安 UBR CPU負載” \
–height=120 \
–alt-autoscale-max \
–lower-limit=0 \
–slope-mode \
-n TITLE:12:/usr/share/fonts/truetype/bsmi00lp.ttf \
–font DEFAULT:0:/usr/share/fonts/truetype/bsmi00lp.ttf \
DEF:c1=$rrd_data:c1:AVERAGE \
DEF:c2=$rrd_data:c2:AVERAGE \
DEF:c3=$rrd_data:c3:AVERAGE \
DEF:c4=$rrd_data:c4:AVERAGE \
DEF:c5=$rrd_data:c5:AVERAGE \
DEF:c6=$rrd_data:c6:AVERAGE \
COMMENT:”主機 ===最大值=== ===平均值=== ===最小值=== ===目前=== \n” \
LINE1:c1#000080:”01負載” \
GPRINT:c1:MAX:” %5.0lf ” \
GPRINT:c1:AVERAGE:” %5.0lf ” \
GPRINT:c1:MIN:” %5.0lf ” \
GPRINT:c1:LAST:” %5.0lf” \
COMMENT:”\n” \
LINE1:c2#0000FF:”02負載”:STACK \
GPRINT:c2:MAX:” %5.0lf ” \
GPRINT:c2:AVERAGE:” %5.0lf ” \
GPRINT:c2:MIN:” %5.0lf ” \
GPRINT:c2:LAST:” %5.0lf” \
COMMENT:”\n” \
LINE1:c3#008000:”03負載”:STACK \
GPRINT:c3:MAX:” %5.0lf ” \
GPRINT:c3:AVERAGE:” %5.0lf ” \
GPRINT:c3:MIN:” %5.0lf ” \
GPRINT:c3:LAST:” %5.0lf” \
COMMENT:”\n” \
LINE1:c4#00ff00:”04負載”:STACK \
GPRINT:c4:MAX:” %5.0lf ” \
GPRINT:c4:AVERAGE:” %5.0lf ” \
GPRINT:c4:MIN:” %5.0lf ” \
GPRINT:c4:LAST:” %5.0lf” \
COMMENT:”\n” \
LINE1:c5#800000:”05負載”:STACK \
GPRINT:c5:MAX:” %5.0lf ” \
GPRINT:c5:AVERAGE:” %5.0lf ” \
GPRINT:c5:MIN:” %5.0lf ” \
GPRINT:c5:LAST:” %5.0lf” \
COMMENT:”\n” \
LINE1:c6#ff0000:”06負載”:STACK \
GPRINT:c6:MAX:” %5.0lf ” \
GPRINT:c6:AVERAGE:” %5.0lf ” \
GPRINT:c6:MIN:” %5.0lf ” \
GPRINT:c6:LAST:” %5.0lf” \
-h 120 -w 500 -v “百分比 %” –no-minor