Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Apr 2018 02:25:04 +0000 (UTC)
From:      Allan Jude <allanjude@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r332662 - head/usr.sbin/iostat
Message-ID:  <201804180225.w3I2P4jT033278@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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");
 			}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201804180225.w3I2P4jT033278>