FreeBSD Bugzilla – Attachment 212992 Details for
Bug 245296
ruptime: Leaves spurious extra spaces for the load average of machines that are down
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Fix maxloadav calculation
ruptime-maxloadav.patch (text/plain), 778 bytes, created by
martin
on 2020-04-02 20:48:34 UTC
(
hide
)
Description:
Fix maxloadav calculation
Filename:
MIME Type:
Creator:
martin
Created:
2020-04-02 20:48:34 UTC
Size:
778 bytes
patch
obsolete
>--- /usr/src/usr.bin/ruptime/ruptime.c 2019-07-05 01:02:11.000000000 +0100 >+++ ruptime.c 2020-04-02 20:53:20.872760000 +0100 >@@ -214,14 +214,16 @@ > if (LEFTEARTH(wd->wd_recvtime)) > continue; > >- for (i = 0; i < 2; i++) >- if (wd->wd_loadav[i] > maxloadav) >- maxloadav = wd->wd_loadav[i]; >- >- for (hsp->hs_nusers = 0, we = &wd->wd_we[0]; >- (char *)(we + 1) <= (char *)wd + cc; we++) >- if (aflg || we->we_idle < 3600) >- ++hsp->hs_nusers; >+ if (!ISDOWN(hsp)) { >+ for (i = 0; i < 2; i++) >+ if (wd->wd_loadav[i] > maxloadav) >+ maxloadav = wd->wd_loadav[i]; >+ >+ for (hsp->hs_nusers = 0, we = &wd->wd_we[0]; >+ (char *)(we + 1) <= (char *)wd + cc; we++) >+ if (aflg || we->we_idle < 3600) >+ ++hsp->hs_nusers; >+ } > ++hsp; > ++nhosts; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 245296
: 212992