【发布时间】:2015-11-20 04:36:42
【问题描述】:
我有这个代码来创建图形文件
#!/bin/sh
rrdtool graph /var/www/temp_graph.png \
-w 1024 -h 400 -a PNG --slope-mode \
--start -1d --end now \
--vertical-label "temperature (C)" \
DEF:out=/opt/templog/data/templog.rrd:internal:AVERAGE \
DEF:in=/opt/templog/data/templog.rrd:external:AVERAGE \
LINE2:in#00ff00:"inside" \
LINE2:out#000ff:"outside"
和这个文件一起创建rrd文件:
#!/bin/sh
rrdtool create /opt/templog/data/templog.rrd --step 300 \
DS:internal:GAUGE:600:-55:125 \
DS:external:GAUGE:600:-55:125 \
RRA:AVERAGE:0.5:1:576 \
RRA:AVERAGE:0.5:3:1344 \
RRA:AVERAGE:0.5:12:1488 \
RRA:AVERAGE:0.5:72:1984 \
RRA:MIN:0.5:72:1984 \
RRA:MAX:0.5:72:1984
但是当我创建图表时,温度曲线只显示正温度而不显示负温度。
当温度低于 0 摄氏度时,曲线为空白,当温度为正时,曲线变为可见。
我该如何解决这个问题?
【问题讨论】:
标签: rrdtool