summaryrefslogtreecommitdiff
path: root/ctdb/utils
diff options
context:
space:
mode:
authorDavid Disseldorp <ddiss@samba.org>2013-05-24 16:11:12 +0200
committerMichael Adam <obnox@samba.org>2013-05-26 23:54:47 +0200
commit50bae99ac69e3461213ff41f8b08ac0f5741a5c5 (patch)
treec10d7a37491a38a91c3fcfa05722526434e4fbce /ctdb/utils
parent2b971a2797b1d468414fc43c63a1bc9fa1e06201 (diff)
downloadsamba-50bae99ac69e3461213ff41f8b08ac0f5741a5c5.tar.gz
pmda: handle new ctdb_statistics format
The ctdb_statistics structure was recently changed. Update the PMDA to dereference the new structure member names. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> (This used to be ctdb commit e5a5ab53173d9aa4190ddf68c4ae316d4473eb56)
Diffstat (limited to 'ctdb/utils')
-rw-r--r--ctdb/utils/pmda/pmda_ctdb.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/ctdb/utils/pmda/pmda_ctdb.c b/ctdb/utils/pmda/pmda_ctdb.c
index c8983ef2b87..e8033bea25e 100644
--- a/ctdb/utils/pmda/pmda_ctdb.c
+++ b/ctdb/utils/pmda/pmda_ctdb.c
@@ -121,10 +121,10 @@ static pmdaMetric metrictab[] = {
/* pending_calls */
{ NULL, { PMDA_PMID(14,25), PM_TYPE_U32, PM_INDOM_NULL, PM_SEM_INSTANT,
PMDA_PMUNITS(0,0,0,0,0,0) }, },
- /* lockwait_calls */
+ /* locks.num_calls */
{ NULL, { PMDA_PMID(15,27), PM_TYPE_U32, PM_INDOM_NULL, PM_SEM_COUNTER,
PMDA_PMUNITS(0,0,1,0,0,PM_COUNT_ONE) }, },
- /* pending_lockwait_calls */
+ /* locks.pending_calls */
{ NULL, { PMDA_PMID(16,27), PM_TYPE_U32, PM_INDOM_NULL, PM_SEM_INSTANT,
PMDA_PMUNITS(0,0,0,0,0,0) }, },
/* childwrite_calls */
@@ -148,10 +148,10 @@ static pmdaMetric metrictab[] = {
/* max_call_latency */
{ NULL, { PMDA_PMID(23,34), PM_TYPE_DOUBLE, PM_INDOM_NULL, PM_SEM_INSTANT,
PMDA_PMUNITS(0,1,0,0,PM_TIME_SEC,0) }, },
- /* max_lockwait_latency */
+ /* locks.latency.max */
{ NULL, { PMDA_PMID(24,35), PM_TYPE_DOUBLE, PM_INDOM_NULL, PM_SEM_INSTANT,
PMDA_PMUNITS(0,1,0,0,PM_TIME_SEC,0) }, },
- /* max_childwrite_latency */
+ /* childwrite_latency.max */
{ NULL, { PMDA_PMID(25,36), PM_TYPE_DOUBLE, PM_INDOM_NULL, PM_SEM_INSTANT,
PMDA_PMUNITS(0,1,0,0,PM_TIME_SEC,0) }, },
/* num_recoveries */
@@ -423,10 +423,10 @@ pmda_ctdb_fetch_cb(pmdaMetric *mdesc, unsigned int inst, pmAtomValue *atom)
atom->ul = stats->pending_calls;
break;
case 15:
- atom->ul = stats->lockwait_calls;
+ atom->ul = stats->locks.num_calls;
break;
case 16:
- atom->ul = stats->pending_lockwait_calls;
+ atom->ul = stats->locks.num_pending;
break;
case 17:
atom->ul = stats->childwrite_calls;
@@ -450,7 +450,7 @@ pmda_ctdb_fetch_cb(pmdaMetric *mdesc, unsigned int inst, pmAtomValue *atom)
atom->d = stats->call_latency.max;
break;
case 24:
- atom->d = stats->lockwait_latency.max;
+ atom->d = stats->locks.latency.max;
break;
case 25:
atom->d = stats->childwrite_latency.max;