[rrd-users] Re: fech last value from an rrd

Joe Hoot Joe.Hoot at itec.suny.edu
Wed Dec 21 16:02:38 MET 2005


I got it.  I just echo'd that value to awk like this:
echo 1.1000000000e+01 | awk '{printf "%4.2f", $1}'


_____________________________
SUNY - ITEC
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
_____________________________

Joe Hoot <Joe.Hoot at itec.suny.edu> 
Sent by: rrd-users-bounce at list.ee.ethz.ch
12/21/2005 09:43 AM


To
rrd-users at list.ee.ethz.ch
cc

Subject
[rrd-users] fech last value from an rrd






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.

Thanks,
Joe
_____________________________
SUNY - ITEC
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


ForwardSourceID:NT0002372E 

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