RRDtool 图:空图
通过以下 rrdtool
调用,我得到的只是一个空图,但为什么呢?数据库中没有数据?
rrdtool create connecteclients.rrd --step 300
DS:ConnectedClients:GAUGE:600:0:U
RRA:AVERAGE:0.5:1:432
RRA:AVERAGE:0.5:1:2016
RRA:AVERAGE:0.5:3:2880
RRA:AVERAGE:0.5:12:8640
rrdtool update connectedclients.rrd N:39
-- .. After 5 min again and again.. --
rrdtool graph picture.png \
--imgformat=PNG \
--start=-86400 \
--end=now \
--title="Clients" \
--rigid \
--base=1000 \
--height=96 \
--width=400 \
--upper-limit=2000000 \
--lower-limit=0 \
--slope-mode \
--color "BACK#4095FF" \
DEF:a=connectedclients.rrd:ConnectedClients:AVERAGE \
AREA:a#00CF00:"Clients" \
And all I get with the below call of rrdtool
is an empty graph, but why? No data in database?
rrdtool create connecteclients.rrd --step 300
DS:ConnectedClients:GAUGE:600:0:U
RRA:AVERAGE:0.5:1:432
RRA:AVERAGE:0.5:1:2016
RRA:AVERAGE:0.5:3:2880
RRA:AVERAGE:0.5:12:8640
rrdtool update connectedclients.rrd N:39
-- .. After 5 min again and again.. --
rrdtool graph picture.png \
--imgformat=PNG \
--start=-86400 \
--end=now \
--title="Clients" \
--rigid \
--base=1000 \
--height=96 \
--width=400 \
--upper-limit=2000000 \
--lower-limit=0 \
--slope-mode \
--color "BACK#4095FF" \
DEF:a=connectedclients.rrd:ConnectedClients:AVERAGE \
AREA:a#00CF00:"Clients" \
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我还注意到,您为一步间隔设置了两个 RRA 文件,这应该不是问题,但充其量只是浪费空间,而且会造成混乱。
通过将上限设置为 200 万并指定
--rigid
,您的数据将紧紧地拥抱 0 线,以至于您可能看不到它。尝试教程中的一些示例RRDtutorial请参阅 RRDtool 的工作原理。
I notice as well that you setup two RRA files for a one step interval, this should not be a problem, but it is a waste of space and a source of confusion at best.
By setting the upper limit to 2 million and specifying
--rigid
, your data will be hugging the 0 line so tightly that you might not see it.Try some examples from the tutorial RRDtutorial to see RRDtool at work.