[collectd] Reserved swap and Linux (was: 2 Small problems with
collectd)
Florian Forster
octo at verplant.org
Mon Jul 10 20:08:20 CEST 2006
Hi,
On Mon, Jul 10, 2006 at 06:29:54PM +0200, Jan Huijsmans wrote:
> Isn't it possible to just log 0 instead of nan? When there is no
> reserved swapspace, a value of 0 seems to be a valid work around.
yes, it's possible. In fact, getting NaNs in there is harder, especially
with counters.
To answer the question you actually meant though: Loggind `unknown' or
`nonexistent' as NaN is a feature, not a bug. If you prefer seeing zeros
in your graph you can use a CDEF along these lines:
DEF:resv_raw=swap.rrd:resv:AVERAGE
CDEF:resv=resv_raw,UN,0,resv_raw,IF
The file `contrib/collection.cgi' does this for drawing the `AREA's, so
you might take a peek there.
The other way around (logging zeros, finding out where the value wasn't
available) is impossible, so doing this would destroy information.
> BTW this only went wrong with new collectd setups (or ones with the
> swap file erased) With older setups I just have the value 0.
That's weird.. To get a NaN into the RRD file an invalid value (-1) is
logged. I can't imagine that was ever legal and if it was, then there
should be a negative one, not a zero in there. Just out of curiosity,
could you provide the output of `rrdtool info' for such a file?
Regards,
-octo
--
Florian octo Forster
Hacker in training
GnuPG: 0x91523C3D
http://verplant.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20060710/badc4434/attachment.pgp
More information about the collectd
mailing list