Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Aug 2011 22:17:54 +0000
From:      oleksandr@FreeBSD.org
To:        svn-soc-all@FreeBSD.org
Subject:   socsvn commit: r225170 - soc2011/oleksandr/oleksandr-head/head/usr.sbin/iostat
Message-ID:  <20110816221754.45578106564A@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: oleksandr
Date: Tue Aug 16 22:17:54 2011
New Revision: 225170
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=225170

Log:
  Add new type of errors to iostat

Modified:
  soc2011/oleksandr/oleksandr-head/head/usr.sbin/iostat/iostat.c

Modified: soc2011/oleksandr/oleksandr-head/head/usr.sbin/iostat/iostat.c
==============================================================================
--- soc2011/oleksandr/oleksandr-head/head/usr.sbin/iostat/iostat.c	Tue Aug 16 22:13:07 2011	(r225169)
+++ soc2011/oleksandr/oleksandr-head/head/usr.sbin/iostat/iostat.c	Tue Aug 16 22:17:54 2011	(r225170)
@@ -762,11 +762,8 @@
 			printf("us ni sy in id ");
 		printf("\n");
 	}
-        if (Eflag>0) {
-		printf("                    error device statistics\n");
-		printf("device  retriable  non-retriable  read  write  other");
-		printf("\n");
-        }
+        if (Eflag>0) 
+		printf("                 Error Device Statistics\n");
 	for (dn = 0; dn < num_devices; dn++) {
 		int di;
 
@@ -816,13 +813,22 @@
 			if (asprintf(&devname, "%s%d",
 			    cur.dinfo->devices[di].device_name,
 			    cur.dinfo->devices[di].unit_number) == -1)
-				err(1, "asprintf");
-			printf("%-8.8s %-10d %-14d %-5d %-6d %-6d",
-       		            devname, cur.dinfo->devices[di].dev_error.retriable,
-			    cur.dinfo->devices[di].dev_error.non_retriable,
-			    cur.dinfo->devices[di].dev_error.read_error,
-			    cur.dinfo->devices[di].dev_error.write_error,
-			    cur.dinfo->devices[di].dev_error.other_error);
+				err(1, "aspRintf");
+		        printf("Device: %-8.8s Retriable: %d Non-retriable: %d "
+                               "Read: %d Write: %d Other: %d Recovered: %d "
+                               "Device Not Ready: %d Medium: %d Hardware: %d "
+                               "Illegal Request: %d",
+                                devname,
+       		                cur.dinfo->devices[di].dev_error.retriable,
+			        cur.dinfo->devices[di].dev_error.non_retriable,
+    			        cur.dinfo->devices[di].dev_error.read_error,
+  			        cur.dinfo->devices[di].dev_error.write_error,
+   			        cur.dinfo->devices[di].dev_error.other_error,
+   			        cur.dinfo->devices[di].dev_error.recovered,
+   			        cur.dinfo->devices[di].dev_error.not_ready,
+  			        cur.dinfo->devices[di].dev_error.medium_error,
+  			        cur.dinfo->devices[di].dev_error.hardware,
+  			        cur.dinfo->devices[di].dev_error.illegal_req);
 			printf("\n");
 			free(devname);
 	        }		



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