mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-29 21:26:51 +00:00
usr.bin/top: fix displaying load average for loads of at least 100
After top registers load average of at least 100 which then gets reduced to below 100, there are left stray digits. Supporting load over 100 requires increasing the width only to 6, but since we support over 1000 CPU's now, let's increase it to 7. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D45284
This commit is contained in:
parent
eaab8e4166
commit
b7f62c6042
|
@ -252,7 +252,7 @@ i_loadave(int mpid, double avenrun[])
|
|||
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
printf("%c %5.2f",
|
||||
printf("%c %7.2f",
|
||||
i == 0 ? ':' : ',',
|
||||
avenrun[i]);
|
||||
}
|
||||
|
@ -289,7 +289,7 @@ u_loadave(int mpid, double *avenrun)
|
|||
/* we should optimize this and only display changes */
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
printf("%s%5.2f",
|
||||
printf("%s%7.2f",
|
||||
i == 0 ? "" : ", ",
|
||||
avenrun[i]);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue