[rrd-users] Re: numerical formatting within XML dump

Ingimar Robertsson iar at skyrr.is
Wed Jan 15 16:52:48 MET 2003


Hi there.

You can try using this perl stub as a base for converting the numbers.  You
problably have to do a lot more, like extract the dates etc.

=======================================================================
#!/usr/bin/perl
while(<>) {
  if( /(\d\.\d\d\d\d\d\d\d\d\d\d)e([-+])(\d\d)/ ) {
    if( $2 eq "-" ) {
      $gildi = ( $1 / ( 10**$3 ) );
    } elsif ( $2 eq "+" ) {
      $gildi = ( $1 * ( 10**$3 ) );
    }
    s/\d\.\d\d\d\d\d\d\d\d\d\de[-+]\d\d/$gildi/;
  }
  print $_;
}
=======================================================================

I've only done minimal tests on this but it seems to work, crude but works,
although no guarantees or support!  ;-)


On Wed, Jan 15, 2003 at 09:21:02AM -0600, Jason Signalness wrote:
> 
> Hello,
> 
> I'm hoping to use the "dump" or "xport" feature of RRDTool to import RRD 
> data into another application.
> 
> The trouble is that the application (Macromedia Flash) doesn't seem to 
> like the exponent in the values.  (example: "1.0481040000e+06")
> 
> Is it possible to modify my call to dump or change my XPORT call to 
> format without the exponent notation?  (example: 1048104)
> 
> Thanks,
> 
> -- 
> Jason Signalness, Systems Administrator
> Basin Telecommunications, Inc.
> --
> 
> --
> Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
> Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
> Archive     http://www.ee.ethz.ch/~slist/rrd-users
> WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi

--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the rrd-users mailing list