top: provide -E command line switch for memory scaling
In their 3.2.7 version of top, Redhat introduced an -M switch to automatically scale Summary Area memory data to avoid truncation (and the resulting '+' indicator). The procps-ng top does not employ suffixes with memory data nor does it allow for different scaling with each separate value. Rather, scaling appears at line start. If built without ./configure --disable-modern-top, the Summary Area memory will be scaled at GiB which should lessen chance of truncation. Otherwise KiB was used to reflect such memory, increasing the truncation chance. And while 'W' can be used to preserve some appropriate scaling value, there are arguments against such rcfile approaches as cited in the issue and bug report below. So this commit will bump the Summary Area memory scale factor from KiB to MiB when using --disable-modern-top as a concession to that Redhat bug report noted below. And it also introduces a new command line switch which can force any desired scaling regardless of the rcfile or which ./configure option might have been specified. [ for top's help text we'll show 'E' as if it were a ] [ switch without arguments in order to keep the help ] [ text displayable without wrap in an 80x24 terminal ] [ the man page, however, will show all k-e arguments ] Reference(s): https://gitlab.com/procps-ng/procps/issues/53 https://bugzilla.redhat.com/show_bug.cgi?id=1034466 [ this patch has been adapted from the master branch ] Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
18
top/top.1
18
top/top.1
@@ -32,7 +32,7 @@
|
||||
.ds CI interactive command
|
||||
\# - Note: our 'Command Line' used in 2 places
|
||||
\# ( and managed to fit in an 80x24 terminal )
|
||||
.ds CL \-\fBhv\fR|\-\fBbcHiOSs\fR \-\fBd\fR secs \-\fBn\fR max \
|
||||
.ds CL \-\fBhv\fR|\-\fBbcEHiOSs\fR \-\fBd\fR secs \-\fBn\fR max \
|
||||
\-\fBu\fR|\fBU\fR user \-\fBp\fR pid \-\fBo\fR fld \-\fBw\fR [cols] \fR
|
||||
.ds CO command\-line option
|
||||
.ds CT command toggle
|
||||
@@ -69,7 +69,7 @@
|
||||
.
|
||||
.\" Document /////////////////////////////////////////////////////////////
|
||||
.\" ----------------------------------------------------------------------
|
||||
.TH TOP 1 "January 2017" "procps-ng" "User Commands"
|
||||
.TH TOP 1 "March 2017" "procps-ng" "User Commands"
|
||||
.\" ----------------------------------------------------------------------
|
||||
|
||||
.\" ----------------------------------------------------------------------
|
||||
@@ -392,6 +392,20 @@ last update will not be displayed.
|
||||
For additional information regarding this toggle
|
||||
\*(Xt 4c. TASK AREA Commands, SIZE.
|
||||
|
||||
.TP 5
|
||||
\-\fBE\fR\ \ :\fIExtend-Memory-Scaling\fR as:\ \ \fB-E k\fR | \fBm\fR | \fBg\fR | \fBt\fR | \fBp\fR | \fBe\fR
|
||||
Instructs \*(We to force \*(SA memory to be scaled as:
|
||||
.nf
|
||||
k \- kibibytes
|
||||
m \- mebibytes
|
||||
g \- gibibytes
|
||||
t \- tebibytes
|
||||
p \- pebibytes
|
||||
e \- exbibytes
|
||||
.fi
|
||||
|
||||
Later this can be changed with the `E' \*(CT.
|
||||
|
||||
.TP 5
|
||||
\-\fBn\fR\ \ :\fINumber-of-iterations\fR limit as:\fB\ \ \-n number \fR
|
||||
Specifies the maximum number of iterations, or frames, \*(We should
|
||||
|
||||
Reference in New Issue
Block a user