[collectd] swap plugin improvements

collectd at wattapower.net collectd at wattapower.net
Tue May 4 15:05:11 CEST 2010


Hi,


following is a series of three patches aimed at improving the swap plugin.

The first patch adds checks to configure.in in order to detect the different
versions of swapctl(). As noted in the original plugin, there are two of them.
One taking three arguments and already implemented, the other taking only two
arguments and present on Solaris, HP-UX and possibly other OSes.

The second patch adds support for the two-args version of swapctl() in the
actual swap plugin code.

These two patches only add features and should not modify the current behavior
in any situation.

The third patch may be more controversial. It removes the (Solaris-only)
libkstat code from the swap plugin. The Solaris case is taken care of by the
newly implemented version of swapctl().

As a consequence the returned metrics are quite different.
"reserved" is no more, and "used" + "free" reflects the total
amount of on-disk swap space. This is in contrast to the libkstat
implementation where "used" + "free" + "reserved" added up to
more than on-disk swap, as it comprised a variable amount of RAM.

In my opinion the previous metrics have their interest and should be preserved.
But as they reflect the behavior of the Solaris virtual memory subsystem rather
than strictly speaking swap devices, maybe they should be moved to another plugin
like vmem ?


Regards,

Aurélien Reynaud




More information about the collectd mailing list