[Bug 245296] [patch] ruptime leaves spurious extra spaces for the load average of machines that are down
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Thu Apr 2 20:48:55 UTC 2020
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=245296
Bug ID: 245296
Summary: [patch] ruptime leaves spurious extra spaces for the
load average of machines that are down
Product: Base System
Version: 11.3-RELEASE
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: bin
Assignee: bugs at FreeBSD.org
Reporter: martin at lispworks.com
Created attachment 212992
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=212992&action=edit
Fix maxloadav calculation
The calculation for maxloadav in usr.bin/ruptime/ruptime.c includes machines
that are down, even though the load averages for those machines are not
printed. This can leave spurious extra spaces when printing the load averages
if a machine is down with a load >= 10.
For example, I see output like this with two spaces before the 0.00 for
methane:
methane up 6+10:55, 0 users, load 0.00, 0.00,
0.00
odroid down 20:10
because the load average for odroid was 28 before it stopped responding.
It should be like this:
methane up 6+10:55, 0 users, load 0.00, 0.00, 0.00
odroid down 20:10
This is fixed by the attached patch.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list