summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-12-02 12:54:29 +0100
committerStefan Metzmacher <metze@samba.org>2009-12-16 08:08:32 +0100
commit927dd3d9e5a2d9e43ae6ebf2ef9f3c382b8637ea (patch)
tree08ff0ca5d376b8d5b92b9305a2a9a39bcb485e7a
parent0e436b46c6051fed5a4d854f993bb635919700f1 (diff)
downloadsamba-927dd3d9e5a2d9e43ae6ebf2ef9f3c382b8637ea.tar.gz
samba-927dd3d9e5a2d9e43ae6ebf2ef9f3c382b8637ea.tar.xz
samba-927dd3d9e5a2d9e43ae6ebf2ef9f3c382b8637ea.zip
tools/ctdb: display db health in "ctdb getdbmap"
metze (This used to be ctdb commit c34535ff4dc6a44909283641596e0ed7c2316fbd)
-rw-r--r--ctdb/tools/ctdb.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/ctdb/tools/ctdb.c b/ctdb/tools/ctdb.c
index 204db1415b..4b67db03c2 100644
--- a/ctdb/tools/ctdb.c
+++ b/ctdb/tools/ctdb.c
@@ -2559,13 +2559,17 @@ static int control_getdbmap(struct ctdb_context *ctdb, int argc, const char **ar
for(i=0;i<dbmap->num;i++){
const char *path;
const char *name;
+ const char *health;
bool persistent;
ctdb_ctrl_getdbpath(ctdb, TIMELIMIT(), options.pnn, dbmap->dbs[i].dbid, ctdb, &path);
ctdb_ctrl_getdbname(ctdb, TIMELIMIT(), options.pnn, dbmap->dbs[i].dbid, ctdb, &name);
+ ctdb_ctrl_getdbhealth(ctdb, TIMELIMIT(), options.pnn, dbmap->dbs[i].dbid, ctdb, &health);
persistent = dbmap->dbs[i].persistent;
- printf("dbid:0x%08x name:%s path:%s %s\n", dbmap->dbs[i].dbid, name,
- path, persistent?"PERSISTENT":"");
+ printf("dbid:0x%08x name:%s path:%s%s%s\n",
+ dbmap->dbs[i].dbid, name, path,
+ persistent?" PERSISTENT":"",
+ health?" UNHEALTHY":"");
}
return 0;