svn commit: r332662 - head/usr.sbin/iostat

Allan Jude allanjude at FreeBSD.org
Wed Apr 18 02:25:04 UTC 2018


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");
 			}


More information about the svn-src-head mailing list