如何使用RRDtool更新数据? [英] How can I update data with RRDtool?

查看:393
本文介绍了如何使用RRDtool更新数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用RRDtool来存储用于显示图形的数据.我通过RRDs :: update更新RRD,并且在尝试重写信息时失败,这意味着过去一段时间已更新数据(例如,有人将系统计时器移回了).我得到的错误是:

I am using RRDtool for storing data for displaying graphs. I update the RRD by RRDs::update and this fails when trying to rewrite the information, means update data for a time in the past (e.g. someone moved the system timer back). The error I get is:

ERROR: Cannot update /opt/dashboard/rrd/Disk/192.168.120.168_disk_1.rrd with 
'1228032301:24:24' illegal attempt to update using time 1228032301 when last 
update time is 1228050001 (minimum one second step)

我想一直允许重写,我该怎么做?

I want to always allow the rewrite, how can I do this?

推荐答案

rrdtool不会将您的输入写入rrd文件.而是对您输入的内容进行采样,然后存储生成的数据点.因此,为rrdtool更新提供旧数据"将无法以相同的方式工作,因为您无法轻易地跳回录音中以修复"一些不良记录.

rrdtool does not write your input into the rrd file. It rather samples what you enter and then stores the resulting datapoints. So providing 'old data' to rrdtool update will not work in the same way, as you can not easily skip back in a sound recording to 'fix' a few bad notes.

很显然,有多种方法可以更改旧数据,在rrdtool中进行此操作的方法是将rrd文件转储"到xml,修改内容并恢复".不想定期做某事.

Obviously there are ways to alter old data, the way todo this in rrdtool, is to 'dump' the rrd file to xml, modify the content and 'restore' it. Not something one would like todo on a regular basis.

这篇关于如何使用RRDtool更新数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆