projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8341769
)
lpar plugin: Account "idle" pool time rather than "max".
author
Florian Forster
<octo@huhu.verplant.org>
Sun, 12 Sep 2010 06:07:38 +0000
(08:07 +0200)
committer
Florian Forster
<octo@huhu.verplant.org>
Sun, 12 Sep 2010 06:07:38 +0000
(08:07 +0200)
src/lpar.c
patch
|
blob
|
history
diff --git
a/src/lpar.c
b/src/lpar.c
index
9c2cd45
..
844440a
100644
(file)
--- a/
src/lpar.c
+++ b/
src/lpar.c
@@
-267,17
+267,21
@@
static int lpar_read (void)
if (pool_stats)
{
char typinst[DATA_MAX_NAME_LEN];
if (pool_stats)
{
char typinst[DATA_MAX_NAME_LEN];
- u_longlong_t pool_busy_ns, pool_max_ns;
+ u_longlong_t pool_busy_ns;
+ u_longlong_t pool_max_ns;
+ u_longlong_t pool_idle_ns = 0;
pool_busy_ns = lparstats.pool_busy_time - pool_busy_time_old;
pool_max_ns = lparstats.pool_max_time - pool_max_time_old;
pool_busy_ns = lparstats.pool_busy_time - pool_busy_time_old;
pool_max_ns = lparstats.pool_max_time - pool_max_time_old;
+ if (pool_max_ns > pool_busy_ns)
+ pool_idle_ns = pool_max_ns - pool_busy_ns;
/* Pool stats are in CPU x ns */
ssnprintf (typinst, sizeof (typinst), "pool-%X-busy", lparstats.pool_id);
lpar_submit (typinst, NS_TO_TICKS ((double) pool_busy_ns) / (double) ticks);
/* Pool stats are in CPU x ns */
ssnprintf (typinst, sizeof (typinst), "pool-%X-busy", lparstats.pool_id);
lpar_submit (typinst, NS_TO_TICKS ((double) pool_busy_ns) / (double) ticks);
- ssnprintf (typinst, sizeof (typinst), "pool-%X-
total
", lparstats.pool_id);
- lpar_submit (typinst, NS_TO_TICKS ((double) pool_
max
_ns) / (double) ticks);
+ ssnprintf (typinst, sizeof (typinst), "pool-%X-
idle
", lparstats.pool_id);
+ lpar_submit (typinst, NS_TO_TICKS ((double) pool_
idle
_ns) / (double) ticks);
}
save_last_values (&lparstats);
}
save_last_values (&lparstats);