From 8fa6b8a8b60ad5e445f79a6ed918ceb36134fd31 Mon Sep 17 00:00:00 2001 From: Bruce Evans Date: Sun, 18 Aug 2002 17:51:14 +0000 Subject: [PATCH] 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 --- usr.sbin/iostat/iostat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/iostat/iostat.c b/usr.sbin/iostat/iostat.c index f0d31234c1f..22d19a72558 100644 --- a/usr.sbin/iostat/iostat.c +++ b/usr.sbin/iostat/iostat.c @@ -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))); }