Date: Tue, 3 Jan 2006 08:30:15 GMT From: Giorgos Keramidas <keramida@freebsd.org> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/91034: minor fix to iostat so that columns line up with 128KB xfers Message-ID: <200601030830.k038UFXk014941@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/91034; it has been noted by GNATS. From: Giorgos Keramidas <keramida@freebsd.org> To: Robert Cousins <rec@RCousins.com> Cc: bug-followup@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@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?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200601030830.k038UFXk014941>