summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9829021)
raw | patch | inline | side by side (parent: 9829021)
author | Aurelien Reynaud <collectd@wattapower.net> | |
Thu, 14 Oct 2010 20:09:29 +0000 (22:09 +0200) | ||
committer | Florian Forster <octo@huhu.verplant.org> | |
Sat, 6 Nov 2010 08:39:33 +0000 (09:39 +0100) |
Signed-off-by: Aurelien Reynaud <collectd@wattapower.net>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
src/lpar.c | patch | blob | history |
diff --git a/src/lpar.c b/src/lpar.c
index d25715e850441ec8728e9680f5ea22855cf83030..4d534476f62c76754433b2c73d313967595e5843 100644 (file)
--- a/src/lpar.c
+++ b/src/lpar.c
(double)(_system_configuration.Xfrac))
#endif
-#define NS_TO_TICKS(ns) ((ns) / XINTFRAC)
+#define CLOCKTICKS_TO_TICKS(cticks) ((cticks) / XINTFRAC)
static const char *config_keys[] =
{
if (pool_stats)
{
char typinst[DATA_MAX_NAME_LEN];
- u_longlong_t pool_idle_ns;
+ u_longlong_t pool_idle_cticks;
double pool_idle_cpus;
double pool_busy_cpus;
/* We're calculating "busy" from "idle" and the total number of
* CPUs, because the "busy" member didn't exist in early versions
* of libperfstat. It was added somewhere between AIX 5.3 ML5 and ML9. */
- pool_idle_ns = lparstats.pool_idle_time - lparstats_old.pool_idle_time;
- pool_idle_cpus = NS_TO_TICKS ((double) pool_idle_ns) / (double) ticks;
+ pool_idle_cticks = lparstats.pool_idle_time - lparstats_old.pool_idle_time;
+ pool_idle_cpus = CLOCKTICKS_TO_TICKS ((double) pool_idle_cticks) / (double) ticks;
pool_busy_cpus = ((double) lparstats.phys_cpus_pool) - pool_idle_cpus;
if (pool_busy_cpus < 0.0)
pool_busy_cpus = 0.0;