top: reduce minimum terminal width with 2 abreast mode

For the original implementation of the '4' toggle, the
minimum width was set at 165 columns. This was done to
avoid truncations when detailed cpu statistics (versus
graphs) were being displayed. Those can not be scaled.

Upon reflection, it seems more appropriate to give the
user the choice of whether or not to truncate. And, by
reducing that minimum width requirement to 80 columns,
we'll vastly expand potential use of two abreast mode.

[ we'll keep that original as '#define TOG4_NOTRUNC' ]

The patch also updates the man document appropriately.
Along the way, we will trade the potentially confusing
word 'adjacent' for the more natural 'additional' when
detailing the '!' toggle in 4b. Summary-Area-Commands.

Reference(s):
https://gitlab.com/procps-ng/procps/-/issues/172
https://www.freelists.org/post/procps/two-major-changes-to-top

Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
Jim Warner
2020-05-28 00:00:00 -05:00
committed by Craig Small
parent e5ddd7ff55
commit 6db0d5eab6
3 changed files with 18 additions and 9 deletions

View File

@@ -1460,28 +1460,32 @@ This \*(CI is only available if a system has the requisite NUMA support.
\ \ \ \fB4\fR\ \ :\fIDisplay-Cpus-Two-Abreast \fR
This command turns the `1' toggle \*F for individual \*(Pu display
but prints the results two abreast.
It requires a terminal with a minimum width of 165 columns.
It requires a terminal with a minimum width of 80 columns.
If a terminal's width is decreased below the minimum while \*(We
is running, \*(We reverts to the normal `1' toggle \*F state.
To avoid truncation when displaying detailed \*(Pu statistcs,
as opposed to the graphic representations, a minimum width
of 165 columns would be required.
.TP 7
\ \ \ \fB!\fR\ \ :\fICombine-Cpus-Mode \fR
This \*(CT is intended for massively parallel SMP environments where,
even with the `4' \*(CT, not all processors can be displayed.
With each press of `!' the number of adjacent \*(Pu's combined is
With each press of `!' the number of additional \*(Pu's combined is
doubled thus reducing the total number of \*(Pu lines displayed.
For example, with the first press of `!' one adjacent \*(Pu will be
For example, with the first press of `!' one additional \*(Pu will be
combined and displayed as `0-1, 2-3, ...' instead of the normal
`%Cpu0, %Cpu1, %Cpu2, %Cpu3, ...'.
With a second `!' \*(CT two adjacent \*(Pus are combined and shown
With a second `!' \*(CT two additional \*(Pus are combined and shown
as `0-2, 3-5, ...'.
Then the third '!' press, combining four adjacent \*(Pus, shows
as `0-4, 5-7, ...', etc.
Then the third '!' press, combining four additional \*(Pus, shows
as `0-4, 5-9, ...', etc.
Such progression continues until individual \*(Pus are again displayed
and impacts both the `1' and `4' toggles (one or two columns).
Use the `=' \*(CT to exit \fBCombine Cpus\fR mode.
Use the `=' command to exit \fBCombine Cpus\fR mode.
.PP
\*(NT If the entire \*(SA has been toggled \*F for any window, you would