From: Florian Forster Date: Sat, 11 Sep 2010 09:04:04 +0000 (+0200) Subject: lpar plugin: Move / add comments. X-Git-Tag: collectd-5.0.0-beta0~27^2~9 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=75efef3359f6565c8833563414367b89fbeacc46;p=collectd.git lpar plugin: Move / add comments. --- diff --git a/src/lpar.c b/src/lpar.c index 4f7f444a..7a842e07 100644 --- a/src/lpar.c +++ b/src/lpar.c @@ -201,14 +201,6 @@ static int lpar_read (void) return (-1); } - /* - * On a shared partition, we're "entitled" to a certain amount of - * processing power, for example 250/100 of a physical CPU. Processing - * capacity not used by the partition may be assigned to a different - * partition by the hypervisor, so "idle" is hopefully a very small - * number. - */ - /* Number of ticks since we last run. */ ticks = lparstats.timebase_last - time_old; if (ticks == 0) @@ -217,6 +209,14 @@ static int lpar_read (void) return (0); } + /* + * On a shared partition, we're "entitled" to a certain amount of + * processing power, for example 250/100 of a physical CPU. Processing + * capacity not used by the partition may be assigned to a different + * partition by the hypervisor, so "idle" is hopefully a very small + * number. + */ + /* entitled_proc_capacity is in 1/100th of a CPU */ entitled_proc_capacity = 0.01 * ((double) lparstats.entitled_proc_capacity); lpar_submit ("entitled", entitled_proc_capacity); @@ -245,6 +245,8 @@ static int lpar_read (void) /* FYI: PURR == Processor Utilization of Resources Register * SPURR == Scaled PURR */ + /* donated => ticks given to another partition + * stolen => ticks received from another partition */ lpar_submit ("idle_donated", (double) idle_donated_ticks / (double) ticks); lpar_submit ("busy_donated", (double) busy_donated_ticks / (double) ticks); lpar_submit ("idle_stolen", (double) idle_stolen_ticks / (double) ticks);