diff options
author | alfred <alfred@FreeBSD.org> | 2004-07-12 03:00:50 +0000 |
---|---|---|
committer | alfred <alfred@FreeBSD.org> | 2004-07-12 03:00:50 +0000 |
commit | 943cc11b6dbcd232ed99db08db26b6924caecacc (patch) | |
tree | 93b50c8e01089d040194e0482cc64b40245e1824 /contrib/top | |
parent | 5b15fb7d429ff16fbdd06c6c113f97f32ae62748 (diff) | |
download | FreeBSD-src-943cc11b6dbcd232ed99db08db26b6924caecacc.zip FreeBSD-src-943cc11b6dbcd232ed99db08db26b6924caecacc.tar.gz |
Make 'S' in interactive mode toggle display of system processes.
Diffstat (limited to 'contrib/top')
-rw-r--r-- | contrib/top/commands.c | 1 | ||||
-rw-r--r-- | contrib/top/top.X | 3 | ||||
-rw-r--r-- | contrib/top/top.c | 10 |
3 files changed, 11 insertions, 3 deletions
diff --git a/contrib/top/commands.c b/contrib/top/commands.c index acb8577..4df6046 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 fb71060..97ec76a 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 9508e47..7c5d09c 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, |