changeset 10714:4338c01ecef3

6677348 AVS 4.0 - 'dsstat' command outputs strange information in the kps, tps, and svt columns
author Thomas Atkins <Thomas.Atkins@Sun.COM>
date Mon, 05 Oct 2009 12:20:40 -0400
parents 51b106665ace
children b905b416f22e
files usr/src/cmd/avs/dsstat/ii_stats.c usr/src/cmd/avs/dsstat/report.c usr/src/cmd/avs/dsstat/report.h usr/src/cmd/avs/dsstat/sndr_stats.c
diffstat 4 files changed, 16 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/cmd/avs/dsstat/ii_stats.c	Mon Oct 05 12:11:57 2009 -0400
+++ b/usr/src/cmd/avs/dsstat/ii_stats.c	Mon Oct 05 12:20:40 2009 -0400
@@ -19,7 +19,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -494,8 +494,7 @@
 				printf(" <<offline>>");
 				linesout++;
 			} else {
-				io_report(cur->cur_mst->ks_data,
-				    cur->pre_mst->ks_data,
+				io_report(cur->cur_mst, cur->pre_mst,
 				    sdbc_getstat(vol + offset));
 			}
 
@@ -536,8 +535,7 @@
 				printf(" <<offline>>");
 				linesout++;
 			} else {
-				io_report(cur->cur_shd->ks_data,
-				    cur->pre_shd->ks_data,
+				io_report(cur->cur_shd, cur->pre_shd,
 				    sdbc_getstat(vol + offset));
 			}
 
@@ -578,8 +576,7 @@
 				printf(" <<offline>>");
 				linesout++;
 			} else {
-				io_report(cur->cur_bmp->ks_data,
-				    cur->pre_bmp->ks_data,
+				io_report(cur->cur_bmp, cur->pre_bmp,
 				    sdbc_getstat(vol + offset));
 			}
 			printf("\n");
@@ -632,8 +629,7 @@
 				printf(" <<offline>>");
 				linesout++;
 			} else {
-				io_report(cur->cur_ovr->ks_data,
-				    cur->pre_ovr->ks_data,
+				io_report(cur->cur_ovr, cur->pre_ovr,
 				    sdbc_getstat(vol + offset));
 			}
 
--- a/usr/src/cmd/avs/dsstat/report.c	Mon Oct 05 12:11:57 2009 -0400
+++ b/usr/src/cmd/avs/dsstat/report.c	Mon Oct 05 12:20:40 2009 -0400
@@ -19,7 +19,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -141,7 +141,7 @@
  * 	at the beginning of an interval.
  */
 void
-io_report(kstat_io_t *cur, kstat_io_t *pre, sdbcstat_t *sdbcstat)
+io_report(kstat_t *cur_kstat, kstat_t *pre_kstat, sdbcstat_t *sdbcstat)
 {
 	sdbcvals_t vals;
 
@@ -150,12 +150,15 @@
 
 	double rtm, tps, avs, etime;
 
+	kstat_io_t *cur = cur_kstat->ks_data;
+	kstat_io_t *pre = pre_kstat->ks_data;
+
 	if (sdbcstat &&
 	    sdbc_getvalues(sdbcstat, &vals, (SDBC_KBYTES | SDBC_INTAVG)))
 		return;
 
 	/* Time */
-	hr_etime = hrtime_delta(pre->wlastupdate, cur->wlastupdate);
+	hr_etime = hrtime_delta(pre_kstat->ks_snaptime, cur_kstat->ks_snaptime);
 	etime = hr_etime / (double)NANOSEC;
 
 	/* Read count */
--- a/usr/src/cmd/avs/dsstat/report.h	Mon Oct 05 12:11:57 2009 -0400
+++ b/usr/src/cmd/avs/dsstat/report.h	Mon Oct 05 12:20:40 2009 -0400
@@ -19,7 +19,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -34,7 +34,7 @@
 uint64_t hrtime_delta(hrtime_t, hrtime_t);
 uint32_t u32_delta(uint32_t, uint32_t);
 uint64_t u64_delta(uint64_t, uint64_t);
-void io_report(kstat_io_t *, kstat_io_t *, sdbcstat_t *);
+void io_report(kstat_t *, kstat_t *, sdbcstat_t *);
 int io_value_check(kstat_io_t *, kstat_io_t *);
 void cd_report(sdbcstat_t *);
 void header();
--- a/usr/src/cmd/avs/dsstat/sndr_stats.c	Mon Oct 05 12:11:57 2009 -0400
+++ b/usr/src/cmd/avs/dsstat/sndr_stats.c	Mon Oct 05 12:20:40 2009 -0400
@@ -19,7 +19,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -454,7 +454,7 @@
 			if (dflags & ASYNC_QUEUE)
 				printQueueStats(first, cur->cur_set);
 
-			io_report(cur->cur_sec->ks_data, cur->pre_sec->ks_data,
+			io_report(cur->cur_sec, cur->pre_sec,
 			    sdbc_getstat(vn));
 			printf("\n");
 
@@ -486,7 +486,7 @@
 			if (dflags & ASYNC_QUEUE)
 				printQueueStats(first, cur->cur_set);
 
-			io_report(cur->cur_bmp->ks_data, cur->pre_bmp->ks_data,
+			io_report(cur->cur_bmp, cur->pre_bmp,
 			    sdbc_getstat(vn));
 			printf("\n");