From d8025b239ff2dd1e69934313ada8a84cadb5e9fe Mon Sep 17 00:00:00 2001 From: bde Date: Sun, 18 Aug 2002 17:51:14 +0000 Subject: 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(-) (limited to 'usr.sbin/iostat') diff --git a/usr.sbin/iostat/iostat.c b/usr.sbin/iostat/iostat.c index f0d3123..22d19a7 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))); } -- cgit v1.1