-1

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

Shehan
  • 417
  • 2
  • 11

1 Answers1

0

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.

larsks
  • 277,717
  • 41
  • 399
  • 399
  • Server A dont have rrdtool as mentioned in question. Kindly check at the very first begining of the question – Shehan May 18 '22 at 13:17
  • In https://stackoverflow.com/questions/72277008/rrdtool-cannot-find-in-python/72277079 you clearly state that your remote server has the `rrdtool` binary installed in `/usr/local/rrdtool/bin`. – larsks May 18 '22 at 13:33
  • Yes. But I cannot execute the rrdtool command in that. Thats why I concluded here that server A has not installed rrdtool. – Shehan May 18 '22 at 13:36
  • 1
    I don't see where you have tried running the `rrdtool` command, either in this question or in the other question. Is there an `rrdtool` in `/usr/local/rrdtool/bin`? What happens if you run it as `/usr/local/rrdtool/bin/rrdtool`? – larsks May 18 '22 at 13:54
  • Wow.Thank you very much. /usr/local/rrdtool/bin/rrdtool dump worked... – Shehan May 18 '22 at 14:28