HomeFreeBSD

Description

MFC r340361:

Fix printing of 64-bit counters on 32-bit ppc platforms.

Several statistic counters are uint64_t values and are printed by systat
using %lu. This results in displaying wrong numbers. Use PRIu64 instead.
While there, print variables of size_t using %zd.

Approved by: re (gjb@)
Differential Revision: https://reviews.freebsd.org/D17838

(cherry picked from commit 45e9405ea4b05926b22a743237cbfe918206db50)

systat: use and correctly display 64bit counters.

Following struct vmtotal changes, make systat use and correctly
display 64-bit counters. Switch to humanize_number(3) to overcome
homegrown arithmetics limits in pretty printing large numbers. Use
1024 as a divisor for memory fields to make it consistent with other
tools and users expectations.

Submitted by: Pawel Biernacki <pawel.biernacki@gmail.com>
Sponsored by: Mysterious Code Ltd.
PR: 2137
Differential revision: https://reviews.freebsd.org/D13105

(cherry picked from commit 90dd3e79cc4d721b17c473fdaf3ba3d6d912b138)

Order declarations alphabetically.
Match signess of the format and the value.

Noted by: bde
Sponsored by: The FreeBSD Foundation

(cherry picked from commit 1b7a3d1f5ffe700203f12654cd01a08a84551b4a)

MFC r340361, r345804: catch up on systat in head/

[Neither of these originally mine, but the latter commit referenced
fixes an -fno-common issue and the former is a bugfix]

r340361:
Fix printing of 64-bit counters on 32-bit ppc platforms.

Several statistic counters are uint64_t values and are printed by systat
using %lu. This results in displaying wrong numbers. Use PRIu64 instead.
While there, print variables of size_t using %zd.

r345804:
systat -zarc to display disk activities like -vm

PR: 213310
(cherry picked from commit a70af2507f720c2d7f56f51a18d358123b4770a5)

MFC r360919,r360929,r361084:

Patch systat -zarc to display cumulative rate and round down large numbers by SI units

Introduce sysputpage() to display large page size with human readable format.

Using UI units allows to fit larger numbers in columns.
Stop calling v_page_size - this is a value that doesn't change at runtime.
Renamed WINDOW *wnd to *wd to avoid conflict with global *wnd variable.
Use bit-shift to convert page size to byte.

PR: 237664, 246458
Submitted by: ota@j.email.ne.jp

(cherry picked from commit 65d1fd13ac2182f7ca0c223bb723fba6d780740f)

MFC r363095:
Handle device removal and removal+add cases to fix infinity rate.

PR: 219829
Submitted by: ota@j.email.ne.jp
Reported by: rezo@live.cn
Differential Revision: https://reviews.freebsd.org/D25226

(cherry picked from commit 7a446028cedb13a0d2004cf6f584291a976392da)

PR: 219829, 237664, 246458, 213310, 2137

Details

Provenance
tuexenAuthored on Nov 15 2018, 5:25 PM
mrCommitted on Jan 3 2021, 4:29 PM
Differential Revision
D17838: Fix printing of 64-bit counters in systat on 32-bit ppc
Parents
R10:72492c6d5385: Update leap-seconds to leap-seconds.3676924800.
Branches
Unknown
Tags
Unknown