Created attachment 212992 [details] 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.
A commit references this bug: Author: nyan Date: Sat Apr 4 12:07:36 UTC 2020 New revision: 359631 URL: https://svnweb.freebsd.org/changeset/base/359631 Log: Remove extra spaces for the load average of machines that are down. PR: 245296 Submitted by: martin _at_ lispworks.com MFC after: 1 week Changes: head/usr.bin/ruptime/ruptime.c
A commit references this bug: Author: nyan Date: Sat Apr 11 07:31:16 UTC 2020 New revision: 359796 URL: https://svnweb.freebsd.org/changeset/base/359796 Log: MFC: r359631 Remove extra spaces for the load average of machines that are down. PR: 245296 Submitted by: martin _at_ lispworks.com Changes: _U stable/12/ stable/12/usr.bin/ruptime/ruptime.c
A commit references this bug: Author: nyan Date: Sat Apr 11 07:46:39 UTC 2020 New revision: 359799 URL: https://svnweb.freebsd.org/changeset/base/359799 Log: MFC: r342965 > Fix indentation in ruptime command output for hosts in the "down" state. MFC: r359631 > Remove extra spaces for the load average of machines that are down. PR: 234239, 245296 Changes: _U stable/11/ stable/11/usr.bin/ruptime/ruptime.c