[rrd-users] Strange GAUGE values when parsing MySQL output
Simon Hobson
linux at thehobsons.co.uk
Tue Aug 11 22:37:06 CEST 2009
Arthur Meeks Meeks wrote:
>I started all over again, deleted the .rrd file and set the -s 30 to
>have a clear graph and see the results clearly.
>
>The values were all 0 so the graph was ok, all of a sudden I got:
><!-- 2009-08-11 22:10:00 CEST / 1250021400 --> <row><v>
>2.0000000000e-01 </v></row>
>Which I assume is a 2 seconds delay.
>
>Which in the graph is shown as: 200M
>So I'm again kinda lost, there's no way to have just a 2?
Yes, you CAN have "2" as an answer - but only if the input data,
after normalisation, comes to 2. Go read the tutorial I linked to in
my earlier email and you'll understand.
Now, the other thing is to be able to read the output correctly. I'll
lay odds that you did NOT get "200M", you'll have got "200m".
200m is 200 Million, or 200,000,000
2m is 200 milli, or 0.2
That is a very important distinction ! BTW - these are standard SI measures.
2.0000000000e-01 is scientific notation, it means 2.0000000000 time
10^-1 (that's ten to the power of -1). 10^-1 is 0.1, so 2 x 0.1 is 0.2
The value 2 would be written as 2.0000000000e-00
The easy way to convert is to simply move the decimal point right by
the number of places indicated in the exponent. Moving right by -1 is
the same as moving 1 left, so 2.00 becomes 0.200.
Hope this explains things.
--
Simon Hobson
Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
author Gladys Hobson. Novels - poetry - short stories - ideal as
Christmas stocking fillers. Some available as e-books.
More information about the rrd-users
mailing list