diff options
author | alfred <alfred@FreeBSD.org> | 2004-08-16 07:51:22 +0000 |
---|---|---|
committer | alfred <alfred@FreeBSD.org> | 2004-08-16 07:51:22 +0000 |
commit | 2e978add60ff6fefcd2fe53a0d4ac30152be4378 (patch) | |
tree | cbc9309044a7b5209118ee3cc432a8d8729f40e3 /contrib | |
parent | 6d0528abdfecb0a45eec1ee51b594803b1e11866 (diff) | |
download | FreeBSD-src-2e978add60ff6fefcd2fe53a0d4ac30152be4378.zip FreeBSD-src-2e978add60ff6fefcd2fe53a0d4ac30152be4378.tar.gz |
This patch merges the sort fields for both pages, so you can (for
example) view io stats while sorting by process size. Also adds
voluntary and involuntary context-switch stats to the io page because
there was lots of room.
Submitted by: Dan Nelson dnelson at allantgroup.com
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/top/commands.c | 2 | ||||
-rw-r--r-- | contrib/top/top.c | 8 |
2 files changed, 3 insertions, 7 deletions
diff --git a/contrib/top/commands.c b/contrib/top/commands.c index e594825..b79e19a 100644 --- a/contrib/top/commands.c +++ b/contrib/top/commands.c @@ -81,7 +81,7 @@ n or # - change number of processes to display\n", stdout); o - specify sort order (pri, size, res, cpu, time)\n", stdout); else fputs("\ -o - specify sort order (read, write, fault, total)\n", stdout); +o - specify sort order (vcsw, ivcsw, read, write, fault, total)\n", stdout); #endif fputs("\ r - renice a process\n\ diff --git a/contrib/top/top.c b/contrib/top/top.c index 7c5d09c..d3e1c56 100644 --- a/contrib/top/top.c +++ b/contrib/top/top.c @@ -95,8 +95,7 @@ char *kill_procs(); char *renice_procs(); #ifdef ORDER -extern int (*proc_compares[])(); -extern int (*io_compares[])(); +extern int (*compares[])(); #else extern int proc_compare(); extern int io_compare(); @@ -570,10 +569,7 @@ restart: get_system_info(&system_info); #ifdef ORDER - if (displaymode == DISP_CPU) - compare = proc_compares[order_index]; - else - compare = io_compares[order_index]; + compare = compares[order_index]; #else if (displaymode == DISP_CPU) compare = proc_compare; |