This source patch addresses the following:
Conceivable Buglets Avoided
. added sanity checks for previous assumptions re: pid size, num cpus
. changed response for rcfile errors to fatal, vs. silent default
Enhancements
. reorganized WIN_t struct for reduced padding and better readability
. generalized code for multiple var-width cols (divorced from pflags)
. absorbed jan gorig's cgroup patch, with attribution
Cosmetic
. reduced numerous #ifdef directives, especially in calibrate_fields
The documentation portion of the patch addresses the following:
README.top
. corrected a minor typo
. updated to reflect current patch level
top.1
. fixed potentially misinterpreted Me/ME strings
. added '.Bd -literal' directives for indented fixed-width font
. some comments changed from \# to .\" to avoid man2html problems
The source portion of the patch addresses the following:
Buglets
. header/task output length now consistent
. fixed 2 obscure horizontal scrolling bugs
. fixed potential bug regarding 'help' and 'current' window
. messages and prompts are now also sensitive to terminal width
. normalized buffer names/sizes now accommodate any SCREENMAX changes
Features
. made %CPU and 'i' mode handling more efficient
. for input the Up/Dn arrows keys act as alternatives to Ins/Del keys
. an optional USE_X_COLHDR define eliminates ALL 'x' toggle overhead
. an optional ZAP_SUSEONLY define was added for Werner's modifications
Cosmetic
. defines and format for optional end-of-job reports standardized
Merged changes from Debian and RHEL. Some minor fixes added.
Authors: Craig Small <csmall@debian.org>, Jari Aalto <jari.aalto@cante.net>,
David Prévot <david@tilapin.org>, Daniel Novotny
Having one constructor depend on another means if the order
is reversed you get a different result.
Patched based on idea by Tom Evans.
Added new code to old_Hertz_hack by Werner Fink <werner@suse.de>
Bug-Debian: http://bugs.debian.org/460331
Bug-Redhat: https://bugzilla.redhat.com/show_bug.cgi?id=632236
Reviewed-by: Jan Görig <jgorig@redhat.com>
Read the time of system boot from /proc/stat (entry: btime) instead
of computing it as the difference between the current time and the
uptime. This is the only way to get a consistent result which won't
possibly change from one run to the next.
The problems with the original code were:
* Both the current time and the uptime are rounded down to the second,
but the system doesn't boot on an integer second value so they do not
tick at the same moment. Thus, the rounding errors can cause a one
second difference from one run to the next.
* We can't read the uptime and the current time at the exact same moment
anyway, so the time difference we compute is bound to be inaccurate.
Bug-Redhat: https://bugzilla.redhat.com/show_bug.cgi?id=222251
Author: Jean Delvare <jdelvare@suse.de>
Reviewed-by: Craig Small <csmall@debian.org>