From owner-svn-src-head@FreeBSD.ORG Sun Dec 16 01:00:41 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4FCCF33E; Sun, 16 Dec 2012 01:00:41 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vb0-f54.google.com (mail-vb0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 827818FC13; Sun, 16 Dec 2012 01:00:40 +0000 (UTC) Received: by mail-vb0-f54.google.com with SMTP id l1so5845014vba.13 for ; Sat, 15 Dec 2012 17:00:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=VGxfAbtz5D3WwMIGSI6I7SP6cdQJ7K1Cx7GjdMqiL9M=; b=LMt2h+Em35GWU6FUmiZit4bDrDR7zTk3j5QhHNgg+avpCoB3X5lBJQ0k42phWnLa+T M5okyMXyY4gNHdistf4r26PdrUsHO/0tqcYYP+9TEK0bHdlh9Le9Dj5z/KjmfOwc+J0a 57uf2QbhT5m5rgEdQYmzedFO+jeW22MxusAzNa6cSGIk3SfAYQS9/DARQLADvql8a+Da WZbADSiSSrnqrRx0dXWEayno1cd32CtSctf/Chg+nxUhEVGVLfL7PbFy9V8QH7gieDa/ BMcICfaBW5JFoHJM9mbtNz2VoROLH2Qfa+4/93OD5V2FZ3uIFNJn+muS0NXQ2DXyRHZU q6rA== MIME-Version: 1.0 Received: by 10.59.13.135 with SMTP id ey7mr17000743ved.37.1355619639960; Sat, 15 Dec 2012 17:00:39 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.58.201.202 with HTTP; Sat, 15 Dec 2012 17:00:39 -0800 (PST) In-Reply-To: <201212151821.qBFILAOP013123@svn.freebsd.org> References: <201212151821.qBFILAOP013123@svn.freebsd.org> Date: Sat, 15 Dec 2012 17:00:39 -0800 X-Google-Sender-Auth: WV9Ot631vuLmRivhbe1R1eAxB8I Message-ID: Subject: Re: svn commit: r244271 - head/usr.sbin/iostat From: Adrian Chadd To: Mikolaj Golub Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Dec 2012 01:00:41 -0000 Hi, People may have scripts based on the current output. You should have introduced a new parameter which modifies the output behaviour in the way you wanted, rather than modifying the existing behaviour. Please consider reverting your change (which is a good idea, btw) and adding a new modifier that outputs the value(s), rather than a %age. Adrian On 15 December 2012 10:21, Mikolaj Golub wrote: > Author: trociny > Date: Sat Dec 15 18:21:09 2012 > New Revision: 244271 > URL: http://svnweb.freebsd.org/changeset/base/244271 > > Log: > Change `iostat -Ix` to display total duration of transactions instead > of average duration, and total busy time instead of %. > > This looks more useful when one runs `iostat -Ix` periodically to > collect statistics: e.g. now it is possible to calculate busy % > between two runs subtracting total busy times and dividing per time > period. > > Average duration and % busy are still available via `iostat -x`. > > Modified: > head/usr.sbin/iostat/iostat.8 > head/usr.sbin/iostat/iostat.c > > Modified: head/usr.sbin/iostat/iostat.8 > ============================================================================== > --- head/usr.sbin/iostat/iostat.8 Sat Dec 15 18:19:48 2012 (r244270) > +++ head/usr.sbin/iostat/iostat.8 Sat Dec 15 18:21:09 2012 (r244271) > @@ -56,7 +56,7 @@ > .\" > .\" @(#)iostat.8 8.1 (Berkeley) 6/6/93 > .\" > -.Dd November 24, 2010 > +.Dd December 15, 2012 > .Dt IOSTAT 8 > .Os > .Sh NAME > @@ -366,6 +366,32 @@ average duration of transactions, in mil > % of time the device had one or more outstanding transactions > .El > .Pp > +The extended > +.Nm > +device display, with the > +.Fl x > +and > +.Fl I > +flags specified, shows the following statistics: > +.Pp > +.Bl -tag -width indent -compact > +.It r/i > +read operations per time period > +.It w/i > +write operations per time period > +.It kr/i > +kilobytes read per time period > +.It kw/i > +kilobytes write per time period > +.It qlen > +transactions queue length > +.It tsvc_t/i > +total duration of transactions per time period, in seconds > +.It sb/i > +total time the device had one or more outstanding transactions per > +time period, in seconds > +.El > +.Pp > The old-style > .Nm > display (using > > Modified: head/usr.sbin/iostat/iostat.c > ============================================================================== > --- head/usr.sbin/iostat/iostat.c Sat Dec 15 18:19:48 2012 (r244270) > +++ head/usr.sbin/iostat/iostat.c Sat Dec 15 18:21:09 2012 (r244271) > @@ -731,10 +731,10 @@ devstats(int perf_select, long double et > u_int64_t total_bytes, total_transfers, total_blocks; > u_int64_t total_bytes_read, total_transfers_read; > u_int64_t total_bytes_write, total_transfers_write; > - long double busy_pct; > + long double busy_pct, busy_time; > u_int64_t queue_len; > long double total_mb; > - long double blocks_per_second, ms_per_transaction; > + long double blocks_per_second, ms_per_transaction, total_duration; > int firstline = 1; > char *devname; > > @@ -745,14 +745,13 @@ devstats(int perf_select, long double et > if (Cflag > 0) > printf(" cpu "); > printf("\n"); > - if (Iflag == 0) > - printf( > - "device r/s w/s kr/s kw/s qlen svc_t %%b " > - ); > - else > - printf( > - "device r/i w/i kr/i kw/i qlen svc_t %%b " > - ); > + if (Iflag == 0) { > + printf("device r/s w/s kr/s kw/s qlen " > + "svc_t %%b "); > + } else { > + printf("device r/i w/i kr/i" > + " kw/i qlen tsvc_t/i sb/i "); > + } > if (Tflag > 0) > printf("tin tout "); > if (Cflag > 0) > @@ -789,6 +788,8 @@ devstats(int perf_select, long double et > DSM_MS_PER_TRANSACTION, &ms_per_transaction, > DSM_BUSY_PCT, &busy_pct, > DSM_QUEUE_LENGTH, &queue_len, > + DSM_TOTAL_DURATION, &total_duration, > + DSM_TOTAL_BUSY_TIME, &busy_time, > DSM_NONE) != 0) > errx(1, "%s", devstat_errbuf); > > @@ -827,7 +828,9 @@ devstats(int perf_select, long double et > queue_len, > ms_per_transaction, busy_pct); > else > - printf("%-8.8s %5.1Lf %5.1Lf %7.1Lf %7.1Lf %4" PRIu64 " %5.1Lf %3.0Lf ", > + printf("%-8.8s %11.1Lf %11.1Lf " > + "%12.1Lf %12.1Lf %4" PRIu64 > + " %10.1Lf %9.1Lf ", > devname, > (long double)total_transfers_read, > (long double)total_transfers_write, > @@ -836,7 +839,7 @@ devstats(int perf_select, long double et > (long double) > total_bytes_write / 1024, > queue_len, > - ms_per_transaction, busy_pct); > + total_duration, busy_time); > if (firstline) { > /* > * If this is the first device