Date: Tue, 12 Oct 2004 18:56:07 +0200 (CEST) From: Xander Jansen <x+freebsd-gnats@surfnet.nl> To: FreeBSD-gnats-submit@FreeBSD.org Subject: bin/72588: iostat tty stats field concatenation Message-ID: <200410121656.i9CGu7nO006466@triplex.phaze-III.sec.nl> Resent-Message-ID: <200410121700.i9CH0mEU036653@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 72588 >Category: bin >Synopsis: iostat tty stats field concatenation >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Oct 12 17:00:47 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Xander >Release: FreeBSD 4.x and 5.x (6.x also I guess) >Organization: Not really >Environment: Noticed on 4.9_REL, 4.10_REL, 5.2.1_REL, problem exists in rev 1.28 and older of iostat.c >Description: With a lot of tty-activity the tty in/out fields in iostat output are printed without separating space. Besides making the output unreadable it also breaks parsing of the output based on whitespace separated fields. The problem is similar to the one in bin/41674 (which contains a fix for the CPU stats). For example: iostat -C -n 0 -c 4 -w 10 tty cpu tin tout us ni sy in id 1 551 1 0 0 0 99 1206250 47 0 3 0 50 <---- 6256600 59 0 4 0 37 <---- 0 227 0 0 0 0 100 >How-To-Repeat: Start a proces sending lots of output to a terminal and have a look at the output of: iostat -C -n 0 -c 10 -w 10 >Fix: Similar to the one in bin/41674. I'm aware that this fix only fixes this particular case and that there might be other printf's to be changed. --- iostat.c.1.28 Sun Mar 16 17:39:52 2003 +++ iostat.c Tue Oct 12 17:48:07 2004 @@ -548,7 +548,7 @@ main(int argc, char **argv) } if (Tflag > 0) - printf("%4.0Lf%5.0Lf", cur.tk_nin / etime, + printf(" %3.0Lf %4.0Lf", cur.tk_nin / etime, cur.tk_nout/etime); devstats(hflag, etime, havelast); >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200410121656.i9CGu7nO006466>