[rrd-users] fech last value from an rrd

Joe Hoot Joe.Hoot at itec.suny.edu
Wed Dec 21 15:43:40 MET 2005

Hi all,
I've been using rrdtool for awhile now through apps like MRTG, Cacti, 
Nagiosgraph, and the like.  I have a situation right now where my company 
has an IBM p570 that we are trying to plot some data points as to see how 
much of the 570 is really being allocated to LPARs and actually being 
used.  When I used `rrdtool fetch` to get the information needed, I see 
that its there, but in scientific notation.

[hootjr at netmon nagiosgraph]$ /usr/local/rrdtool/bin/rrdtool fetch 
rrd/tsm02_LPARSTAT_lparstat.rrd AVERAGE -r 300 -s -5min
timestamp    physc             ent               entc

1135175400:  1.0000000000e+00  1.1000000000e+01  3.4600000000e+01
1135175700:  1.0000000000e+00  1.1000000000e+01  7.7400000000e+01
1135176000:  nan  nan  nan
[hootjr at netmon nagiosgraph]$ 

I have the value that I want to plot by awking and grepping to get the 
value of my "ent" DS = "1.1000000000e+01"

Does anyone know of a way to convert 1.1000000000e+01 into the number that 
I want, which is 11? 

I do realize that I could use awk and sed to get, for example, everything 
before the "e"  and then do the same to get the +01 and then do 
calculations on those.  But if there is already a tool out there to do 
this in the unix world, I'd love to use it.

Information Technology Exchange Center
Systems Programmer/Analyst
E-mail: Joe.Hoot at itec.suny.edu
Office: (716)878-4644
Cell: (716)908-6292
Fax: (716)878-3485

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://lists.ee.ethz.ch/rrd-users
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi

More information about the rrd-users mailing list