diff options
| author | John Sonnenschein <johns@joyent.com> | 2012-05-07 05:39:48 +0000 |
|---|---|---|
| committer | John Sonnenschein <johns@joyent.com> | 2012-05-07 05:39:48 +0000 |
| commit | f9b92b874c7e2b0a97203e8b3e370a82027fee42 (patch) | |
| tree | 5b0afcf9f17c210b1248494d7039b477f403793f /usr/src/cmd/rcap/rcapstat/rcapstat.c | |
| parent | 99ab767f0b40b10adde1dc9ceaf6bb39d2be5d69 (diff) | |
| parent | 435bba8aa5d73ccd0b9ec7c79e28bec795904992 (diff) | |
| download | illumos-joyent-f9b92b874c7e2b0a97203e8b3e370a82027fee42.tar.gz | |
illumos sync
Diffstat (limited to 'usr/src/cmd/rcap/rcapstat/rcapstat.c')
| -rw-r--r-- | usr/src/cmd/rcap/rcapstat/rcapstat.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr/src/cmd/rcap/rcapstat/rcapstat.c b/usr/src/cmd/rcap/rcapstat/rcapstat.c index fb83f861ae..c97b6a14f7 100644 --- a/usr/src/cmd/rcap/rcapstat/rcapstat.c +++ b/usr/src/cmd/rcap/rcapstat/rcapstat.c @@ -21,6 +21,7 @@ /* * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, Joyent, Inc. All rights reserved. */ #include <sys/types.h> @@ -72,6 +73,8 @@ typedef struct col { static col_t *col_head; static int ncol; +#define RCAPD_NA "rcapd is not active (try zonememstat)\n" + static col_t * col_find(rcid_t id) { @@ -152,7 +155,7 @@ read_stats(rcid_type_t stat_type) struct stat st; if ((fd = open(STAT_FILE_DEFAULT, O_RDONLY)) < 0) { - warn(gettext("rcapd is not active\n")); + warn(gettext(RCAPD_NA)); return (E_ERROR); } @@ -173,7 +176,7 @@ read_stats(rcid_type_t stat_type) pid = hdr.rs_pid; (void) snprintf(procfile, 20, "/proc/%lld/psinfo", pid); if ((proc_fd = open(procfile, O_RDONLY)) < 0) { - warn(gettext("rcapd is not active\n")); + warn(gettext(RCAPD_NA)); (void) close(fd); return (E_ERROR); } |
