Date: Mon, 22 Apr 2024 19:15:15 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 278532] vmstat percentages wrong on 32 bit systems Message-ID: <bug-278532-227@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D278532 Bug ID: 278532 Summary: vmstat percentages wrong on 32 bit systems Product: Base System Version: 14.0-STABLE Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: jfc@mit.edu Created attachment 250161 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D250161&action= =3Dedit Fix xo_emit format string for percentages When (long) and (long long) are different sizes vmstat reports garbage for = the CPU percentage columns. From arm.armv7 running FreeBSD 14: # vmstat procs memory page disks faults cpu r b w avm fre flt re pi po fr sr mmc0 da0 in sy cs us s= y id 4 0 0 494M 1.2G 278 0 1 0 351 22 0 0 1.7k 603 279 3499= 288 538751558161 538751558161 The call to xo_emit in usr.bin/vmstat/vmstat.c function percent() passes " {:user/%2lld/%lld}" as the format string but (long) as the argument type.=20 Changing "lld" to "ld" fixes the bug. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-278532-227>