【发布时间】:2016-07-14 14:17:53
【问题描述】:
RRD 未正确更新第二个数据源,请参阅:
首先,我使用两个数据源(c1 和 c2)创建 RRD 文件:
rdtool create test.rrd --start N --step 60 DS:c1:GAUGE:120:0:100 DS:c2:GAUGE:120:0:100 RRA:AVERAGE:0.5:1:1440
然后我在两个命令中更新两个数据源:
rrdtool update test.rrd -t c1 N:10 && rrdtool update test.rrd -t c2 N:10
等待 60 秒.... 再做一次更新:
rdtool update test.rrd -t c1 N:20 && rrdtool update test.rrd -t c2 N:20
然后让我们看看我们有什么:
rrdtool fetch test.rrd AVERAGE | tail -5
1468409580: -nan -nan
1468409640: -nan -nan
1468409700: -nan -nan
1468409760: 1,5988575517e+01 1,9266620475e-01
1468409820: -nan -nan
第一个数据源 c1 按预期工作,但第二个 c2 显示的值低于 1,我预计该值也接近 15。
是的,我知道我也可以在一个更新命令中更新两个数据源,但在我的情况下,一个 rrd 文件中有很多数据源,并且更好地读取和跟踪大量值。
使用的 rrd 版本:1.6.0
【问题讨论】:
标签: rrdtool