summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.bin/top/display.c6
-rw-r--r--usr.bin/top/top.118
-rw-r--r--usr.bin/top/top.c10
3 files changed, 17 insertions, 17 deletions
diff --git a/usr.bin/top/display.c b/usr.bin/top/display.c
index 200de0b9a95..30b358dd659 100644
--- a/usr.bin/top/display.c
+++ b/usr.bin/top/display.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: display.c,v 1.40 2010/04/23 09:26:13 otto Exp $ */
+/* $OpenBSD: display.c,v 1.41 2011/12/16 14:50:24 jsing Exp $ */
/*
* Top users/processes display for Unix
@@ -769,8 +769,9 @@ show_help(void)
"C - toggle the display of command line arguments\n"
"d count - show `count' displays, then exit\n"
"e - list errors generated by last \"kill\" or \"renice\" command\n"
- "h | ? - help; show this text\n"
"g string - filter on command name (g+ selects all commands)\n"
+ "h | ? - help; show this text\n"
+ "H - toggle the display of threads\n"
"I | i - toggle the display of idle processes\n"
"k [-sig] pid - send signal `-sig' to process `pid'\n"
"n|# count - show `count' processes\n"
@@ -781,7 +782,6 @@ show_help(void)
"r count pid - renice process `pid' to nice value `count'\n"
"S - toggle the display of system processes\n"
"s time - change delay between displays to `time' seconds\n"
- "T - toggle the display of threads\n"
"u user - display processes for `user' (u+ selects all users)\n"
"\n");
diff --git a/usr.bin/top/top.1 b/usr.bin/top/top.1
index 781b31861ea..96cd7e704e4 100644
--- a/usr.bin/top/top.1
+++ b/usr.bin/top/top.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: top.1,v 1.58 2011/03/25 12:53:09 jmc Exp $
+.\" $OpenBSD: top.1,v 1.59 2011/12/16 14:50:24 jsing Exp $
.\"
.\" Copyright (c) 1997, Jason Downs. All rights reserved.
.\"
@@ -23,7 +23,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd $Mdocdate: March 25 2011 $
+.Dd $Mdocdate: December 16 2011 $
.Dt TOP 1
.Os
.Sh NAME
@@ -32,7 +32,7 @@
.Sh SYNOPSIS
.Nm top
.Bk -words
-.Op Fl 1bCIinqSTu
+.Op Fl 1bCHIinqSu
.Op Fl d Ar count
.Op Fl g Ar string
.Op Fl o Ar field
@@ -106,6 +106,10 @@ The default is 1 for dumb terminals.
Display only processes that contain
.Ar string
in their command name.
+.It Fl H
+Show process threads in the display.
+Normally, only the main process is shown.
+This option makes all threads visible.
.It Fl I
Do not display idle processes.
By default,
@@ -169,10 +173,6 @@ Set the delay between screen updates to
seconds.
The value may be fractional, to permit delays of less than 1 second.
The default delay between updates is 5 seconds.
-.It Fl T
-Show process threads in the display.
-Normally, only the main process is shown.
-This option makes all threads visible.
.It Fl U Ar user
Show only those processes owned by
.Ar user .
@@ -303,6 +303,8 @@ Display only processes that contain
in their command name.
.Sq g+
shows all processes.
+.It H
+Toggle the display of process threads.
.It I \*(Ba i
Toggle the display of idle processes.
.It Xo k
@@ -352,8 +354,6 @@ Toggle the display of system processes.
Set the delay between screen updates to
.Ar time
seconds.
-.It T
-Toggle the display of process threads.
.It u Ar user
Show only those processes owned by
.Ar user .
diff --git a/usr.bin/top/top.c b/usr.bin/top/top.c
index 727239dc139..97f965b6d19 100644
--- a/usr.bin/top/top.c
+++ b/usr.bin/top/top.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: top.c,v 1.75 2010/04/24 22:02:14 deraadt Exp $ */
+/* $OpenBSD: top.c,v 1.76 2011/12/16 14:50:24 jsing Exp $ */
/*
* Top users/processes display for Unix
@@ -125,7 +125,7 @@ usage(void)
extern char *__progname;
fprintf(stderr,
- "usage: %s [-1bCIinqSTu] [-d count] [-g string] [-o field] "
+ "usage: %s [-1bCHIinqSu] [-d count] [-g string] [-o field] "
"[-p pid] [-s time]\n\t[-U user] [number]\n",
__progname);
}
@@ -136,7 +136,7 @@ parseargs(int ac, char **av)
char *endp;
int i;
- while ((i = getopt(ac, av, "1STICbinqus:d:p:U:o:g:")) != -1) {
+ while ((i = getopt(ac, av, "1SHICbinqus:d:p:U:o:g:")) != -1) {
switch (i) {
case '1':
combine_cpus = 1;
@@ -173,7 +173,7 @@ parseargs(int ac, char **av)
old_system = !old_system;
break;
- case 'T': /* show threads */
+ case 'H': /* show threads */
ps.threads = Yes;
old_threads = Yes;
break;
@@ -540,7 +540,7 @@ rundisplay(void)
int change, i;
struct pollfd pfd[1];
uid_t uid;
- static char command_chars[] = "\f qh?en#sdkriIuSopCTg+P1";
+ static char command_chars[] = "\f qh?en#sdkriIuSopCHg+P1";
/*
* assume valid command unless told