NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: bin/60440: systat vmstat SysCal field can overflow
The following reply was made to PR bin/60440; it has been noted by GNATS.
From: Robert Elz <kre%munnari.OZ.AU@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: he%netbsd.org@localhost
Subject: Re: bin/60440: systat vmstat SysCal field can overflow
Date: Sun, 12 Jul 2026 03:33:03 +0700
Date: Sat, 11 Jul 2026 13:30:01 +0000 (UTC)
From: "he%NetBSD.org@localhost via gnats" <gnats-admin%NetBSD.org@localhost>
Message-ID: <20260711133001.9EA061A9244%mollari.NetBSD.org@localhost>
| Why the "time-based" values are not scaled? Don't know,
| but it looks like the code was made this way conciously.
My guess would be that someone believed (and perhaps it is even true
in some cases) that TIME meant duration - absolutely no-one wants to
see durations in units of 16:40 (mm:ss), or even worse 17:04 if the
scaling is using binary K's (Ki's) rather than decimal for that.
That could be another reason, when I see your 3804K syscall/second,
I assume that would mean ~3804000 (decimal scaling), and not ~3895000.
If it doesn't (if systat is always using binary scaling for this) then
that could be another reason.
| Is this a reasonable change?
Looks like it to me (for HEAD, I doubt this is important enough to
pull up anywhere).
But I would also redo the layout of that section a little, the Traps
SysCal and Fault sections could all do with having 1 extra column, which
would also allow "SysCal" to turn into "SysCall" and prevent anyone
believing it is related to the system calendar...
The Proc:r d s could do with an xtra column for 's', which could just
be allocated, or perhaps better, rearranged to be "s d r" so the "s"
could slide under "Proc" for as many columns as it actually needs (if
we end up with 99999 processes in short term sleeps, we have bigger
problems than misalignment there - or add scaling if that happens, again,
decimal scaling).
I'd also like to see the long column of disks sorted, and by an algorithm
that places all dkN's after everything else .. even on the tallest window
I can make with a reasonable font size to read (140 lines) all my possible
disk units don't fit as they are. ":ignore dk*" helps, but that's not
always what is wanted.
If you'd like to just make the fix you suggested, I am willing to do
the rest of it, or if you'd prefer to have a go at moving this relic from
the 1980's to suit modern systems, have at it. (The "systat vm" page was
a merge into systat of a separate standalone prog I gave CSRG sometime in
that period - which is why that page looks so different from all the others,
it wasn't designed to be part of systat originally.)
kre
Home |
Main Index |
Thread Index |
Old Index