aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorAlfred Perlstein <alfred@FreeBSD.org>2004-07-12 03:00:50 +0000
committerAlfred Perlstein <alfred@FreeBSD.org>2004-07-12 03:00:50 +0000
commit3911ee527b11c3fae2af8e36bb21a61a40bd8819 (patch)
tree93b50c8e01089d040194e0482cc64b40245e1824 /contrib
parent338b72d96e0b1677eddb4f89aec31d0a970f58d6 (diff)
downloadsrc-3911ee527b11c3fae2af8e36bb21a61a40bd8819.tar.gz
src-3911ee527b11c3fae2af8e36bb21a61a40bd8819.zip
Make 'S' in interactive mode toggle display of system processes.
Notes
Notes: svn path=/head/; revision=132005
Diffstat (limited to 'contrib')
-rw-r--r--contrib/top/commands.c1
-rw-r--r--contrib/top/top.X3
-rw-r--r--contrib/top/top.c10
3 files changed, 11 insertions, 3 deletions
diff --git a/contrib/top/commands.c b/contrib/top/commands.c
index acb85775c4ac..4df6046da162 100644
--- a/contrib/top/commands.c
+++ b/contrib/top/commands.c
@@ -86,6 +86,7 @@ o - specify sort order (read, write, fault, total)\n", stdout);
fputs("\
r - renice a process\n\
s - change number of seconds to delay between updates\n\
+S - toggle the displaying of system processes\n\
u - display processes for only one user (+ selects all users)\n\
\n\
\n", stdout);
diff --git a/contrib/top/top.X b/contrib/top/top.X
index fb710609663b..97ec76a8b440 100644
--- a/contrib/top/top.X
+++ b/contrib/top/top.X
@@ -229,6 +229,9 @@ Change the number of processes to display (prompt for new number).
Change the number of seconds to delay between displays
(prompt for new number).
.TP
+.B S
+Toggle the display of system processes.
+.TP
.B k
Send a signal (\*(lqkill\*(rq by default) to a list of processes. This
acts similarly to the command
diff --git a/contrib/top/top.c b/contrib/top/top.c
index 9508e47af7df..7c5d09cd962c 100644
--- a/contrib/top/top.c
+++ b/contrib/top/top.c
@@ -194,9 +194,9 @@ char *argv[];
fd_set readfds;
#ifdef ORDER
- static char command_chars[] = "\f qh?en#sdkriIutHmo";
+ static char command_chars[] = "\f qh?en#sdkriIutHmSo";
#else
- static char command_chars[] = "\f qh?en#sdkriIutHm";
+ static char command_chars[] = "\f qh?en#sdkriIutHmS";
#endif
/* these defines enumerate the "strchr"s of the commands in command_chars */
#define CMD_redraw 0
@@ -218,8 +218,9 @@ char *argv[];
#define CMD_selftog 15
#define CMD_thrtog 16
#define CMD_viewtog 17
+#define CMD_viewsys 18
#ifdef ORDER
-#define CMD_order 18
+#define CMD_order 19
#endif
/* set the buffer for stdout */
@@ -1002,6 +1003,9 @@ restart:
d_header = i_header;
reset_display();
break;
+ case CMD_viewsys:
+ ps.system = !ps.system;
+ break;
#ifdef ORDER
case CMD_order:
new_message(MT_standout,