[collectd] swap plugin improvements

Florian Forster octo at collectd.org
Mon Dec 6 11:27:35 CET 2010


Hi Aurélien,

I've just tinkered with the Swap plugin so swapctl(2) and kstat(3KSTAT)
can both be used on Solaris. The result is a mess of preprocessor #if
blocks and weird defaults, but I think all in all the default behavior
is intuitive:

  * If swapctl(2) is available, it is the default facility. You can set
    the "ReportPhysical" option to "separate" to get per-device
    statistics.
  * If kstat(3KSTAT) is available, too, you can set "ReportVirtual" to
    "true" to enable virtual swap statistics. You can also set
    "ReportPhysical" to "false" to disable physical swap information and
    get the collectd 4 behavior.
  * If kstat(3KSTAT) is available and swapctl(2) isn't, the plugin will
    behave like it did under collectd 4.

> Sounds reasonable to be, as long as "combined" is the default. The
> total values are what IT execs and developers are interested in. The
> exact physical layout of swap is for admins fine-tuning their
> systems...

I totally agree ;)

On Thu, Oct 07, 2010 at 11:24:24PM +0200, Aurélien Reynaud wrote:
> In my original posting, I suggested moving the "-s" (virtual memory)
> to the vmem plugin which is currently linux-only. Don't you think this
> would make sense?

I guess it'd make sense. I don't have the experience with Solaris to
implement useful vmem statistics, though.

It might make sense to remove the kstat code from the swap plugin
altogether, even if this means that the functionality won't be available
at first. It can then be added to the vmem plugin whenever someone with
enough knowledge of Solaris virtual memory steps up and implements it.
What do you think?

Best regards,
—octo
-- 
Florian octo Forster
Hacker in training
GnuPG: 0x0C705A15
http://octo.it/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: Digital signature
URL: <http://mailman.verplant.org/pipermail/collectd/attachments/20101206/f39956d3/attachment.pgp>


More information about the collectd mailing list