top: introduced new focus toggle ('F'), program source
Sometimes, it might be useful to isolate a parent task and its forked children from other system activity. As an example, a user might want to examine workload in a specific lxc container. Or maybe there is some need to question what's happening under the same tmux session. Since forest view mode tends to be a relatively stable display, it will sometimes satisfy the above need. But that mode can't currently guarantee the target process always remains as the topmost task or even is visible. So, this patch will enable focusing on any parent task and keeping it as the topmost process while displaying it and its forked children only. It then appears as if there is no other activity in that system by virtue of the blank lines which follow that final child process. To implement this new feature, top's redundant 'F' key has been repurposed. It made little sense devoting two keys to the Fields Management screen (especially since the key we've taken required two separate keystrokes). [ and while we're at it, i also added punctuation to ] [ the prologue for that renamed 'forest_display' guy ] [ since all other forest functions used punctuation. ] Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
@@ -594,7 +594,7 @@ static void build_uniq_nlstab (void) {
|
||||
" Z~5,~1B~5,E,e Global: '~1Z~2' colors; '~1B~2' bold; '~1E~2'/'~1e~2' summary/task memory scale\n"
|
||||
" l,t,m,I Toggle: '~1l~2' load avg; '~1t~2' task/cpu; '~1m~2' memory; '~1I~2' Irix mode\n"
|
||||
" 0,1,2,3,4 Toggle: '~10~2' zeros; '~11~2/~12~2/~13~2' cpu/numa views; '~14~2' cpus two abreast\n"
|
||||
" f,F,X Fields: '~1f~2'/'~1F~2' add/remove/order/sort; '~1X~2' increase fixed-width\n"
|
||||
" f,X Fields: '~1f~2' add/remove/order/sort; '~1X~2' increase fixed-width fields\n"
|
||||
"\n"
|
||||
" L,&,<,> . Locate: '~1L~2'/'~1&~2' find/again; Move sort column: '~1<~2'/'~1>~2' left/right\n"
|
||||
" R,H,J,C . Toggle: '~1R~2' Sort; '~1H~2' Threads; '~1J~2' Num justify; '~1C~2' Coordinates\n"
|
||||
@@ -603,7 +603,7 @@ static void build_uniq_nlstab (void) {
|
||||
" z~5,~1b~5 . Toggle: '~1z~2' color/mono; '~1b~2' bold/reverse (only if 'x' or 'y')\n"
|
||||
" u,U,o,O . Filter by: '~1u~2'/'~1U~2' effective/any user; '~1o~2'/'~1O~2' other criteria\n"
|
||||
" n,#,^O . Set: '~1n~2'/'~1#~2' max tasks displayed; Show: ~1Ctrl~2+'~1O~2' other filter(s)\n"
|
||||
" V,v . Toggle: '~1V~2' forest view; '~1v~2' hide/show forest view children\n"
|
||||
" V,v,F . Toggle: '~1V~2' forest view; '~1v~2' hide/show children; '~1F~2' keep focused\n"
|
||||
"\n"
|
||||
"%s"
|
||||
" W,Y,! Write config file '~1W~2'; Inspect other output '~1Y~2'; Combine Cpus '~1!~2'\n"
|
||||
|
||||
Reference in New Issue
Block a user