如何使用不同的体系结构读取RRD

发布于 2025-01-30 01:24:44 字数 962 浏览 2 评论 0原文

我在服务器A中有一组RRD文件,我需要读取这些数据。我尚未在服务器A中安装rrrdtool。我尝试了几种方法,但找不到在服务器A中安装rrdtool的任何可能方法/rrdtool-cannot-find-in-python/72277079?noreDirect = 1#comment127705137_7227707079“> rrdtool在python in python 在此问题中找不到有关服务器的相关数据

Server A Details

    OS Version:
    Red Hat Enterprise Linux Server release 5 (Tikanga)

    Python Version:
    Python 2.4.3

A。文件并将其上传到服务器B,并试图读取它们。但是我最终如下。

file_path=r'rrd/rrdfile.rrd'
rrdfilename = file_path
rrd = rrdtool.lastupdate(rrdfilename)

---------------------------------------------------------------------------
OperationalError                          Traceback (most recent call last)
<ipython-input-62-8e31bdc49f04> in <module>
      1 file_path=r'rrd/rrdfile.rrd'
      2 rrdfilename = file_path
----> 3 rrd = rrdtool.lastupdate(rrdfilename)

OperationalError: This RRD was created on another architecture

有人可以帮助我从服务器B读取这些RRD文件吗?由于我无法从服务器读取它们

I have a set of RRD files in server A and I need to read those data. I have not installed rrrdtool in server A. I tried several ways but I could not find any possible way to install rrdtool in server A. I have already raised about this RRDtool cannot find in python in this question with relevant data about server A.

Server A Details

    OS Version:
    Red Hat Enterprise Linux Server release 5 (Tikanga)

    Python Version:
    Python 2.4.3

Now I need to read those rrddata, so I downloaded files and uploaded them it to server B and tried to read them. But I am ended up as below.

file_path=r'rrd/rrdfile.rrd'
rrdfilename = file_path
rrd = rrdtool.lastupdate(rrdfilename)

---------------------------------------------------------------------------
OperationalError                          Traceback (most recent call last)
<ipython-input-62-8e31bdc49f04> in <module>
      1 file_path=r'rrd/rrdfile.rrd'
      2 rrdfilename = file_path
----> 3 rrd = rrdtool.lastupdate(rrdfilename)

OperationalError: This RRD was created on another architecture

Can someone help me to read those rrd files from server B? since I could not read them from server A

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

偏爱自由 2025-02-06 01:24:44

由于您在服务器A上安装了rrdtool,因此您使用rrdtool dump命令将数据导出您的数据以架构 - indepdenent格式,然后rrdtool restore在服务器B上生成正确的RRD二进制文件。

在服务器A上:

rrdtool dump rrd/rrdfile.rrd rrdfile.xml

rrdfile.xml复制到服务器B,然后在服务器B上:

rrdtool restore rrdfile.xml rrdfile.rrd

现在您有一个.rrd文件,可以使用Python模块阅读。

Since you have rrdtool installed on Server A, you use the rrdtool dump command to export your data in an architecture-indepdenent format, and then rrdtool restore on server B to generate the correct RRD binary file.

On server A:

rrdtool dump rrd/rrdfile.rrd rrdfile.xml

Copy that rrdfile.xml to server B, and then on server B:

rrdtool restore rrdfile.xml rrdfile.rrd

Now you have a .rrd file that you can read using the Python module.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文