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@
This commit is contained in:
parent
076ec7d41f
commit
e02c5b57f9
2
external/bsd/top/dist/commands.c
vendored
2
external/bsd/top/dist/commands.c
vendored
@ -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 },
|
||||
|
4
external/bsd/top/dist/top.c
vendored
4
external/bsd/top/dist/top.c
vendored
@ -345,8 +345,6 @@ do_arguments(globalstate *gstate, int ac, char **av)
|
||||
{
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user