From owner-svn-src-head@freebsd.org Wed Apr 18 02:25:04 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A2070F8651B; Wed, 18 Apr 2018 02:25:04 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FD4284127; Wed, 18 Apr 2018 02:25:04 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 46A3B14F03; Wed, 18 Apr 2018 02:25:04 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3I2P4F6033279; Wed, 18 Apr 2018 02:25:04 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3I2P4jT033278; Wed, 18 Apr 2018 02:25:04 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201804180225.w3I2P4jT033278@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Wed, 18 Apr 2018 02:25:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332662 - head/usr.sbin/iostat X-SVN-Group: head X-SVN-Commit-Author: allanjude X-SVN-Commit-Paths: head/usr.sbin/iostat X-SVN-Commit-Revision: 332662 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 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: Wed, 18 Apr 2018 02:25:04 -0000 Author: allanjude Date: Wed Apr 18 02:25:03 2018 New Revision: 332662 URL: https://svnweb.freebsd.org/changeset/base/332662 Log: Make `iostat -xC` print CPU information on its own line Requested by: mahrens Reviewed by: kenm (maintainer), mahrens MFC after: 1 week Relnotes: yes Sponsored by: ScaleEngine Inc. Differential Revision: https://reviews.freebsd.org/D15076 Modified: head/usr.sbin/iostat/iostat.c Modified: head/usr.sbin/iostat/iostat.c ============================================================================== --- head/usr.sbin/iostat/iostat.c Tue Apr 17 22:33:41 2018 (r332661) +++ head/usr.sbin/iostat/iostat.c Wed Apr 18 02:25:03 2018 (r332662) @@ -802,11 +802,15 @@ devstats(int perf_select, long double etime, int havel char *devicename; if (xflag > 0) { + if (Cflag > 0) { + printf(" cpu\n"); + printf(" us ni sy in id\n"); + cpustats(); + printf("\n"); + } printf(" extended device statistics "); if (Tflag > 0) printf(" tty "); - if (Cflag > 0) - printf(" cpu "); printf("\n"); if (Iflag == 0) { printf("device r/s w/s kr/s kw/s " @@ -817,8 +821,6 @@ devstats(int perf_select, long double etime, int havel } if (Tflag > 0) printf("tin tout "); - if (Cflag > 0) - printf("us ni sy in id "); printf("\n"); } @@ -922,8 +924,6 @@ devstats(int perf_select, long double etime, int havel printf("%4.0Lf%5.0Lf", cur.tk_nin / etime, cur.tk_nout / etime); - if (Cflag > 0) - cpustats(); } printf("\n"); }