Use essentially the same formatting of the CPU stats percentages as in

vmstat so that they never coalesce.  Both iostat and vmstat need larger
fixes to prevent wide fields from unnecessarily messing up the alignment
of all subsequent fields.

PR:		41674
MFC-after:	3 days
This commit is contained in:
bde 2002-08-18 17:51:14 +00:00
parent 971c6f16e0
commit d8025b239f

View File

@ -727,7 +727,7 @@ cpustats(void)
for (state = 0; state < CPUSTATES; ++state)
time += cur.cp_time[state];
for (state = 0; state < CPUSTATES; ++state)
printf("%3.0f",
printf(" %2.0f",
rint(100. * cur.cp_time[state] / (time ? time : 1)));
}