From c92662082cee56dfc1bb40903ce598638c53474c Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Mon, 19 Jul 2004 18:36:17 +0000 Subject: [PATCH] add loadavg calculation notes --- src/os/aix/aix_sigar.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/os/aix/aix_sigar.c b/src/os/aix/aix_sigar.c index 360451a4..1248409e 100644 --- a/src/os/aix/aix_sigar.c +++ b/src/os/aix/aix_sigar.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include @@ -33,7 +34,17 @@ #include -#define FIXED_TO_DOUBLE(x) (((double)x) / 65536.0) +/* not defined in aix 4.3 */ +#ifndef SBITS +#define SBITS 16 +#endif + +/* + * from libperfstat.h: + * "To calculate the load average, divide the numbers by (1<." + */ +#define FIXED_TO_DOUBLE(x) (((double)x) / (1<