Date: Fri, 5 Jul 2013 18:44:41 +0000 (UTC) From: Mikolaj Golub <trociny@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r252819 - in stable/8/sbin: hastctl hastd Message-ID: <201307051844.r65IifFK035905@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: trociny Date: Fri Jul 5 18:44:41 2013 New Revision: 252819 URL: http://svnweb.freebsd.org/changeset/base/252819 Log: MFC r252472: Make hastctl(1) ('list' command) output a worker pid. Reviewed by: pjd Modified: stable/8/sbin/hastctl/hastctl.c stable/8/sbin/hastd/control.c Directory Properties: stable/8/sbin/hastctl/ (props changed) stable/8/sbin/hastd/ (props changed) Modified: stable/8/sbin/hastctl/hastctl.c ============================================================================== --- stable/8/sbin/hastctl/hastctl.c Fri Jul 5 18:44:10 2013 (r252818) +++ stable/8/sbin/hastctl/hastctl.c Fri Jul 5 18:44:41 2013 (r252819) @@ -293,6 +293,7 @@ control_set_role(struct nv *nv, const ch 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)); Modified: stable/8/sbin/hastd/control.c ============================================================================== --- stable/8/sbin/hastd/control.c Fri Jul 5 18:44:10 2013 (r252818) +++ stable/8/sbin/hastd/control.c Fri Jul 5 18:44:41 2013 (r252819) @@ -271,6 +271,7 @@ control_status(struct hastd_config *cfg, nv_add_string(nvout, compression_name(res->hr_compression), "compression%u", no); nv_add_string(nvout, role2str(res->hr_role), "role%u", no); + nv_add_int32(nvout, res->hr_workerpid, "workerpid%u", no); switch (res->hr_role) { case HAST_ROLE_PRIMARY:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201307051844.r65IifFK035905>