From: Aurelien Reynaud Date: Thu, 14 Oct 2010 20:09:27 +0000 (+0200) Subject: lpar plugin: check for donation support in libperfstat X-Git-Tag: collectd-5.0.0-beta0~27^2~2 X-Git-Url: https://git.octo.it/?p=collectd.git;a=commitdiff_plain;h=74dbb25f6756bceced459c3fefbdbc678739004a lpar plugin: check for donation support in libperfstat Signed-off-by: Aurelien Reynaud Signed-off-by: Florian Forster --- diff --git a/configure.in b/configure.in index fcbd57c0..5abca73a 100644 --- a/configure.in +++ b/configure.in @@ -1193,6 +1193,12 @@ fi if test "x$with_perfstat" = "xyes" then AC_DEFINE(HAVE_PERFSTAT, 1, [Define to 1 if you have the 'perfstat' library (-lperfstat)]) + # struct members pertaining to donation have been added to libperfstat somewhere between AIX5.3ML5 and AIX5.3ML9 + AC_CHECK_MEMBER([perfstat_partition_type_t.b.donate_enabled], [], [], [[#include ticks given to another partition @@ -224,6 +229,7 @@ static int lpar_read (void) /* Donated ticks will be accounted for as stolen ticks in other LPARs */ consumed_ticks += idle_stolen_ticks + busy_stolen_ticks; } +#endif lpar_submit ("consumed", (double) consumed_ticks / (double) ticks);