From owner-freebsd-bugs@freebsd.org Sun Jan 3 16:31:24 2021 Return-Path: Delivered-To: freebsd-bugs@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E0DB14D665F for ; Sun, 3 Jan 2021 16:31:24 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 4D845S5s4Gz3NJ7 for ; Sun, 3 Jan 2021 16:31:24 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id C6BD74D6545; Sun, 3 Jan 2021 16:31:24 +0000 (UTC) Delivered-To: bugs@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C68334D6714 for ; Sun, 3 Jan 2021 16:31:24 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D845S542Gz3NL0 for ; Sun, 3 Jan 2021 16:31:24 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 965F328DE for ; Sun, 3 Jan 2021 16:31:24 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 103GVOwH078185 for ; Sun, 3 Jan 2021 16:31:24 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from bugzilla@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 103GVOxH078184 for bugs@FreeBSD.org; Sun, 3 Jan 2021 16:31:24 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: bugzilla set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 219829] "systat -if 1" Peak has wrong display Date: Sun, 03 Jan 2021 16:31:23 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 11.0-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: commit-hook@FreeBSD.org X-Bugzilla-Status: In Progress X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jan 2021 16:31:24 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D219829 --- Comment #11 from commit-hook@FreeBSD.org --- A commit in branch stable/11 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=3D72b42d209ff5b37c615048fb251d7bf9e= b276381 commit 72b42d209ff5b37c615048fb251d7bf9eb276381 Author: Michael Tuexen AuthorDate: 2018-11-15 17:25:32 +0000 Commit: Michael Reifenberger CommitDate: 2021-01-03 16:29:50 +0000 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 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 numb= ers 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 variabl= e. 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 usr.bin/systat/Makefile | 4 +- usr.bin/systat/devs.c | 126 ++++++++++++++++++++++-- usr.bin/systat/devs.h | 16 ++- usr.bin/systat/extern.h | 7 +- usr.bin/systat/fetch.c | 9 +- usr.bin/systat/icmp6.c | 9 +- usr.bin/systat/ifcmds.c | 2 + usr.bin/systat/ifstat.c | 118 +++++++++++++--------- usr.bin/systat/iostat.c | 46 ++++----- usr.bin/systat/ip.c | 7 +- usr.bin/systat/ip6.c | 7 +- usr.bin/systat/main.c | 13 +-- usr.bin/systat/swap.c | 17 +++- usr.bin/systat/sysput.c (new) | 118 ++++++++++++++++++++++ usr.bin/systat/systat.1 | 1 + usr.bin/systat/systat.h | 4 + usr.bin/systat/tcp.c | 3 +- usr.bin/systat/vmstat.c | 221 +++++++++++++++-----------------------= ---- usr.bin/systat/zarc.c | 124 +++++++++++++++--------- 19 files changed, 548 insertions(+), 304 deletions(-) --=20 You are receiving this mail because: You are the assignee for the bug.=