summaryrefslogtreecommitdiffstats
path: root/contrib/top/top.c
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2008-01-18 01:43:14 +0000
committerpeter <peter@FreeBSD.org>2008-01-18 01:43:14 +0000
commit368d76456bba0368457c8068937a2ba4ea81033e (patch)
tree75cd88d63d25954bc6c8db1fe30b1e7fa9322f7e /contrib/top/top.c
parentf99e03f7fe903970489c85fbae5965ef79f8d6c5 (diff)
downloadFreeBSD-src-368d76456bba0368457c8068937a2ba4ea81033e.zip
FreeBSD-src-368d76456bba0368457c8068937a2ba4ea81033e.tar.gz
Add a -P flag to display per-cpu cpu usage stats.
Diffstat (limited to 'contrib/top/top.c')
-rw-r--r--contrib/top/top.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/contrib/top/top.c b/contrib/top/top.c
index b38300f..3fbd3a2 100644
--- a/contrib/top/top.c
+++ b/contrib/top/top.c
@@ -66,6 +66,7 @@ extern char *optarg;
extern int overstrike;
static int fmt_flags = 0;
+int pcpu_stats = No;
/* signal handling routines */
sigret_t leave();
@@ -282,7 +283,7 @@ char *argv[];
optind = 1;
}
- while ((i = getopt(ac, av, "CSIHabijnquvs:d:U:m:o:t")) != EOF)
+ while ((i = getopt(ac, av, "CSIHPabijnpquvs:d:U:m:o:t")) != EOF)
{
switch(i)
{
@@ -407,6 +408,14 @@ char *argv[];
ps.jail = !ps.jail;
break;
+ case 'P':
+ pcpu_stats = Yes;
+ break;
+
+ case 'p':
+ pcpu_stats = No;
+ break;
+
default:
fprintf(stderr,
"Top version %s\n"
OpenPOWER on IntegriCloud