Code

lpar plugin update
authorAurélien Reynaud <aurelien@wattapower.net>
Thu, 9 Sep 2010 20:43:16 +0000 (22:43 +0200)
committerFlorian Forster <octo@huhu.verplant.org>
Sat, 11 Sep 2010 08:47:14 +0000 (10:47 +0200)
commit3451d2486faf938b9e78dafcdf8c30ed375af19f
tree1a209c45120ecc1c241b176032616232fdf4b1e6
parentfc562e3e9264474183b430f71972cca6434691b3
lpar plugin update

Hello,

here is a new patch against ar/lpar with the following features :

- get back to the original implementation with gauges only. A new type
"vcpu" is created (it was "lpar_pcpu" in the original)

- I tried to keep as much as possible of your changes, but some have
been reverted (the init function is back) because it was simpler for me
to port my previous code rather than adapt it to the current form. Feel
free to change them again

- the "consumed" metric might seem superfluous at first sight as it
could be calculated in the frontend in the general case. But I thought
it might come in handy when dealing with dedicated partitions, where
donated and stolen values are no easy concepts. Not everyone wants to
dig into the code and the APIs to find out what they mean and whether
they should be added to or substracted from other values...

As a side note, one  of the changes you introduced was better checking
of the return status from perfstat_partition_total() using errno. This
reminded me that under AIX errno is by default unsafe to use in a
multithreaded environment (which collectd is). I posted a fix ("Fix
errno thread-safety under AIX") on Sat, 19 Jun 2010, which if I am not
mistaken has not been merged yet.

Best regards,

Aurélien Reynaud

Signed-off-by: Florian Forster <octo@huhu.verplant.org>
src/lpar.c
src/types.db