diff options
author | trociny <trociny@FreeBSD.org> | 2013-07-01 18:41:07 +0000 |
---|---|---|
committer | trociny <trociny@FreeBSD.org> | 2013-07-01 18:41:07 +0000 |
commit | 5092fcd6407b7957943a19df1a41c997dce8a9cf (patch) | |
tree | a6efa54fbdfc5a522fc71ccce8c8225d8e3f8854 /sbin/hastctl | |
parent | cab3cc571031cfdb601898df1b6e7c531d5f87ce (diff) | |
download | FreeBSD-src-5092fcd6407b7957943a19df1a41c997dce8a9cf.zip FreeBSD-src-5092fcd6407b7957943a19df1a41c997dce8a9cf.tar.gz |
Make hastctl(1) ('list' command) output a worker pid.
Reviewed by: pjd
MFC after: 3 days
Diffstat (limited to 'sbin/hastctl')
-rw-r--r-- | sbin/hastctl/hastctl.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sbin/hastctl/hastctl.c b/sbin/hastctl/hastctl.c index 6fe55fa..11b5b8d 100644 --- a/sbin/hastctl/hastctl.c +++ b/sbin/hastctl/hastctl.c @@ -293,6 +293,7 @@ control_set_role(struct nv *nv, const char *newrole) static int control_list(struct nv *nv) { + pid_t pid; unsigned int ii; const char *str; int error, ret; @@ -331,6 +332,9 @@ control_list(struct nv *nv) str = nv_get_string(nv, "status%u", ii); if (str != NULL) printf(" status: %s\n", str); + pid = nv_get_int32(nv, "workerpid%u", ii); + if (pid != 0) + printf(" workerpid: %d\n", pid); printf(" dirty: %ju (%NB)\n", (uintmax_t)nv_get_uint64(nv, "dirty%u", ii), (intmax_t)nv_get_uint64(nv, "dirty%u", ii)); |