summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOtto Moerbeek <otto@cvs.openbsd.org>2006-12-27 07:24:53 +0000
committerOtto Moerbeek <otto@cvs.openbsd.org>2006-12-27 07:24:53 +0000
commit1ff4c5613638d7cd3ce5e1b3946d5ec6c75da7cd (patch)
tree3f325caeb3df9ad053898ffcfb9cf1184952feda
parenta35217ef46c022b2311f7b08d03480f3ef4b4978 (diff)
Also provide 'C' as a command line arg. From Mark Lumsden <mark at cyodesigns
dot com>.
-rw-r--r--usr.bin/top/top.18
-rw-r--r--usr.bin/top/top.c10
2 files changed, 13 insertions, 5 deletions
diff --git a/usr.bin/top/top.1 b/usr.bin/top/top.1
index 173d4b40485..e76b5ad0d6e 100644
--- a/usr.bin/top/top.1
+++ b/usr.bin/top/top.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: top.1,v 1.33 2005/12/05 12:20:27 jmc Exp $
+.\" $OpenBSD: top.1,v 1.34 2006/12/27 07:24:52 otto Exp $
.\"
.\" Copyright (c) 1997, Jason Downs. All rights reserved.
.\"
@@ -31,7 +31,7 @@
.Nd display and update information about the top CPU processes
.Sh SYNOPSIS
.Nm top
-.Op Fl bIinqSTu
+.Op Fl bCIinqSTu
.Op Fl d Ar count
.Op Fl o Ar field
.Op Fl p Ar pid
@@ -82,6 +82,10 @@ and
.Ql ^\e )
still have an effect.
This is the default on a dumb terminal, or when the output is not a terminal.
+.It Fl C
+Show process
+.Em command
+line arguments.
.It Fl d Ar count
Show only
.Ar count
diff --git a/usr.bin/top/top.c b/usr.bin/top/top.c
index 7bd0c49cbe3..e072259799d 100644
--- a/usr.bin/top/top.c
+++ b/usr.bin/top/top.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: top.c,v 1.43 2006/03/04 06:58:12 otto Exp $ */
+/* $OpenBSD: top.c,v 1.44 2006/12/27 07:24:52 otto Exp $ */
/*
* Top users/processes display for Unix
@@ -135,7 +135,7 @@ usage(void)
extern char *__progname;
fprintf(stderr,
- "usage: %s [-bIinqSTu] [-d count] [-o field] [-p pid] [-s time] [-U username] [number]\n",
+ "usage: %s [-bCIinqSTu] [-d count] [-o field] [-p pid] [-s time] [-U username] [number]\n",
__progname);
}
@@ -145,8 +145,12 @@ parseargs(int ac, char **av)
char *endp;
int i;
- while ((i = getopt(ac, av, "STIbinqus:d:p:U:o:")) != -1) {
+ while ((i = getopt(ac, av, "STICbinqus:d:p:U:o:")) != -1) {
switch (i) {
+ case 'C':
+ show_args = Yes;
+ break;
+
case 'u': /* toggle uid/username display */
do_unames = !do_unames;
break;