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);
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to