[rrd-users] Re: RRDTool Fetch - Convert to Decimal

David Gabler dgabler at TRUELINK.com
Fri Feb 21 01:10:38 MET 2003


given that format.

one way:
while (<>) {
  chomp $_;
  @a = split/\s+/, $_;
  print $a[0], ' ', $a[1] *1, ' ', $a[2] *1, "\n";
}

as you know there is more than one way to skin a cat.

Try to see what happens when you do different operations with that data.
Experiment and see what happens when you put things in a scaler, hash, array
..........

Oh BTW one name for that format is scientific notation.

David

> -----Original Message-----
> From: Ingrassia, Rickey T 
> Sent: Thursday, February 20, 2003 1:36 PM
> Subject: [rrd-users] RRDTool Fetch - Convert to Decimal
> 
> 
> 
> When using the rrdtool fetch command I am getting the 
> following output:
> 
>            nvlassf03r01_s0_0_1nvlasww03r01_s0_0_1
> 
> 1045769400: 5.2400000000e+00 5.5200000000e+00
> 
> The numbers that are collect are decimal, but they are stored 
> as shown above.  How can I convert this numbers back to 
> decimals?  If anyone has a perl solution, that would be much 
> appreciated.
> 
> --rickey

--
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