bin/91034: minor fix to iostat so that columns line up with
128KB xfers
Giorgos Keramidas
keramida at freebsd.org
Tue Jan 3 00:30:16 PST 2006
The following reply was made to PR bin/91034; it has been noted by GNATS.
From: Giorgos Keramidas <keramida at freebsd.org>
To: Robert Cousins <rec at RCousins.com>
Cc: bug-followup at freebsd.org
Subject: Re: bin/91034: minor fix to iostat so that columns line up with 128KB xfers
Date: Tue, 3 Jan 2006 10:28:23 +0200
On 2005-12-28 21:16, Robert Cousins <rec at RCousins.com> wrote:
> Iostat's output can be kind of ugly under USF2 with 128KB
> transfers. Here is an example:
>
> tty ad0 ad1 cpu
> tin tout KB/t tps MB/s KB/t tps MB/s us ni sy in id
> 0 60 0.00 0 0.00 0.00 0 0.00 50 0 0 0 50
> 0 180 0.00 0 0.00 128.00 8 1.00 48 0 0 0 51
> 0 61 0.00 0 0.00 0.00 0 0.00 50 0 0 0 50
> 0 60 0.00 0 0.00 0.00 0 0.00 49 0 0 0 51
>
> The problem comes from the KB/t column which goes one character too wide.
>
> The patch I'm submitting notices when this value is >= 100 and
> drops from 2 decimals to 1 in this case. The result is an output
> like this:
>
> tty ad0 ad1 cpu
> tin tout KB/t tps MB/s KB/t tps MB/s us ni sy in id
> 0 60 0.00 0 0.00 0.00 0 0.00 50 0 0 0 50
> 0 180 0.00 0 0.00 128.0 8 1.00 48 0 0 0 51
> 0 61 0.00 0 0.00 0.00 0 0.00 50 0 0 0 50
> 0 60 0.00 0 0.00 0.00 0 0.00 49 0 0 0 51
The misaligned dots seem a bit ugly. Is it ok to use %6.2Lf as
the format specifier, widening the KB columns a bit to fit the
new length of the text?
More information about the freebsd-bugs
mailing list