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

Edward Tomasz Napierala trasz at FreeBSD.org
Thu Mar 28 20:16:20 UTC 2019


Author: trasz
Date: Thu Mar 28 20:16:19 2019
New Revision: 345653
URL: https://svnweb.freebsd.org/changeset/base/345653

Log:
  Make the "KB/s" field one character shorter (by reducing the precision)
  and use the space to make the "tps" one character longer.
  
  It makes the iostat(8) output a bit less messed up.
  
  Reviewed by:	allanjude
  MFC after:	2 weeks
  Sponsored by:	Klara Inc.
  Differential Revision:	https://reviews.freebsd.org/D19710

Modified:
  head/usr.sbin/iostat/iostat.c

Modified: head/usr.sbin/iostat/iostat.c
==============================================================================
--- head/usr.sbin/iostat/iostat.c	Thu Mar 28 20:13:34 2019	(r345652)
+++ head/usr.sbin/iostat/iostat.c	Thu Mar 28 20:16:19 2019	(r345653)
@@ -769,9 +769,9 @@ phdr(void)
 					(void)printf(" blk xfr msps ");
 			} else {
 				if (Iflag == 0)
-					printf("  KB/t tps  MB/s ");
+					printf(" KB/t  tps  MB/s ");
 				else
-					printf("  KB/t xfrs   MB ");
+					printf(" KB/t xfrs    MB ");
 			}
 			printed++;
 		}
@@ -945,7 +945,7 @@ devstats(int perf_select, long double etime, int havel
 				       ms_per_transaction);
 		} else {
 			if (Iflag == 0)
-				printf(" %5.2Lf %3.0Lf %5.2Lf ",
+				printf(" %4.1Lf %4.0Lf %5.2Lf ",
 				       kb_per_transfer,
 				       transfers_per_second,
 				       mb_per_second);
@@ -953,7 +953,7 @@ devstats(int perf_select, long double etime, int havel
 				total_mb = total_bytes;
 				total_mb /= 1024 * 1024;
 
-				printf(" %5.2Lf %3.1" PRIu64 " %5.2Lf ",
+				printf(" %4.1Lf %4.1" PRIu64 " %5.2Lf ",
 				       kb_per_transfer,
 				       total_transfers,
 				       total_mb);


More information about the svn-src-all mailing list