Module Name: src
Committed By: sborrill
Date: Fri Mar 23 14:46:05 UTC 2012
Modified Files:
src/external/bsd/top/dist: commands.c top.c
Log Message:
Switch off per-cpu states by default (i.e. display a single CPU line with a
mean average). Program behaviour now tallies with the man page, but more
importantly, the default behaviour is now sensible for modern multi-core
machines.
If you want the previous behaviour, please set TOP="-1" in your environment.
Fix multiple "1" options not toggling and thus allow settings in TOP
environmental variable to be reversed by a command line option.
Tweak description of "1" command in interactive mode.
OK christos@
To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/top/dist/commands.c
cvs rdiff -u -r1.8 -r1.9 src/external/bsd/top/dist/top.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/bsd/top/dist/commands.c
diff -u src/external/bsd/top/dist/commands.c:1.6 src/external/bsd/top/dist/commands.c:1.7
--- src/external/bsd/top/dist/commands.c:1.6 Tue May 5 18:51:21 2009
+++ src/external/bsd/top/dist/commands.c Fri Mar 23 14:46:05 2012
@@ -943,7 +943,7 @@ command command_table[] = {
{ ' ', cmd_update, "update screen" },
{ '?', cmd_help, "help; show this text" },
{ 'h', cmd_help, NULL },
- { '1', cmd_percpustates, "toggle the detail per cpu of cpustates" },
+ { '1', cmd_percpustates, "toggle the display of cpu states per cpu" },
{ 'C', cmd_color, "toggle the use of color" },
{ 'H', cmd_threads, "toggle the display of individual threads" },
{ 't', cmd_threads, NULL },
Index: src/external/bsd/top/dist/top.c
diff -u src/external/bsd/top/dist/top.c:1.8 src/external/bsd/top/dist/top.c:1.9
--- src/external/bsd/top/dist/top.c:1.8 Tue May 5 18:51:22 2009
+++ src/external/bsd/top/dist/top.c Fri Mar 23 14:46:05 2012
@@ -345,8 +345,6 @@ do_arguments(globalstate *gstate, int ac
{
case '1':
gstate->percpustates = !gstate->percpustates;
- gstate->fulldraw = Yes;
- gstate->max_topn += display_setmulti(gstate->percpustates);
break;
#ifdef ENABLE_COLOR
case 'C':
@@ -771,7 +769,7 @@ main(int argc, char *argv[])
gstate->fulldraw = Yes;
gstate->use_color = Yes;
gstate->interactive = Maybe;
- gstate->percpustates = Yes;
+ gstate->percpustates = No;
/* preset defaults for process selection */
gstate->pselect.idle = Yes;