[rrd-users] Problem with different architectures

Fredrik Wänglund fredrik at n-mental.com
Thu Aug 23 15:10:37 CEST 2007


Andreas Maus skrev:
> On Thu, Aug 23, 2007 at 01:24:24PM +0200, Fredrik W?nglund wrote:
> Hi.
>
>   
>> I have a setup where i run RRDTool on remote devices that measures and 
>> collects various data. The rrd-files are then rsync'ed regulary to a 
>> central server whith a web-interface for presentation.
>>     
> O.K.
>
>   
>> Now i am testing a new remote device, an ASUS WL-500gp with OpenWRT 
>> KAMIKAZE (7.06) and RRTTool 1.2.11-1.
>> the problem is that I can't use the rrd-files on the central server 
>> because they '.. was created on other architecture'.
>>     
> Thats right. AFAIK the ASUS WL-500gP has an MIPS based architecture.
> And I guess your "central server" is an "ordinary" x86 or x86_64 based
> system.
>
>   
>> I know I can dum the rrd's on the remote machine to XML and den restore 
>> them on the central machine, but the ASUS-device has limited CPU-power 
>> and I dont want to put any more load on it. Is there any way to convert 
>> the rrd's on the central machine?
>>     
> AFAIK you can't. I don't know how much CPU power a dump needs but it
> shouldn't bee too much. Instead dumping and rsyncing the xml file to
> the central server you can setup a listener via netcat on the central
> server that reads the data and restores them. On the Asus you only
> have to call rrdtool dump on the asus and pipe the XML through netcat
> to the server.
>
> Alternatively you may write a program that runs on the server that
> receives the data and writes directly to a rrd file.
>
> (I monitor my WRT54GL in such a way. I wrote a server that listens
> for connections and on the WRT I build the datasets and send
> them to the server which updates the rrd file on the server.
> I can share the code if you are interested.)
>
> HTH,
>
> Andreas Maus.
>
>   
there is actually two problems, CPU and amount of data;

I have rrd-files with 1 to ~8 ds and two rra's. It takes about 50 
seconds to dump a file with one ds and 70 seconds for a file with 3 
ds'es. I plan to have about 30 rrd-files, so it would take about 30 
minutes just to convert then.
Another problem is that the ASUS is located in Singapore, and the 
central server in Sweden. The communication between them is via an quite 
slow VPN-link.
An rrd-file with one ds is 730kB and the corresponding xml-file is 
6.6MB, so its almost ten times more data to transfer between the hosts!

What is the difference between the rrd-files?
The ASUS is MIPS-based and the central server is an PC. Both platforms 
are 32-bit, but the PC is little-endian and MIPS is big.
If this is the only difference, it should not be so hard for an 
C-programmer to write routine that converts the rrd-files between 
different architectures...



More information about the rrd-users mailing list