Copyright (c) 2007, Sun Microsystems, Inc. All rights reserved.
The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
dsstat -m mode [-r report-options] [-d display-options] [-s volume-sets] [-f | -F] [-z] [interval [count]]
The dsstat command collects and reports I/O statistics for the Sun StorageTek Availability Suite products.
The dsstat supports the following options: -m mode
Specifies the mode(s) of operation. Valid modes are: cache
Cache statistics
Point-in-Time Copy statistics
Remote Mirror statistics
% dsstat -m ii -m sndr % dsstat -m ii -m sndr -m cacheTo determine which statistics are being reported from which service, use the role field, described below. When cache statistics are requested as one of the multiple services, the rkps and wkps statistics is further divided into crkps, drkps, cwkps, and dwkps. If no -m switch is specified, then dsstat displays default statistics for all of the valid modes as described above. See "Field Descriptions," below for descriptions of these fields.
Specifies the volume components to be displayed. Each item is represented by a single character, and multiple items can be selected. The report-options vary based on the mode(s) specified above. This option is not used for cache mode. Valid report-options for ii mode are: m
Master volume statistics.
For the "report-options for ii mode": m, s, b, o
For the "report-options for sndr mode": b, n
For the "display-options for cache mode": r, w, d, c, s, f
For the "display-options for ii mode": r, w, t, s, p, f
Shadow volume statistics.
Bitmap volume statistics.
Overflow volume statistics, if attached.
Bitmap volume statistics.
Network volume statistics.
Specifies the statistics to be displayed. The types of statistics are represented by a single character; multiple types can be specified. For cache mode, the valid display-options are: r
Detailed read statistics.
Detailed write statistics.
Summary statistics.
Cache behavior flags.
Destaged data statistics.
Write cancellation statistics.
Detailed read statistics.
Detailed write statistics.
Timing statistics.
Summary statistics.
Percentage of volume requiring sync.
Detailed read statistics.
Detailed write statistics.
Timing statistics.
Summary statistics.
Percentage of volume requiring sync.
Asynchronous queue statistics.
Asynchronous queue statistics.
Filters the output to include only the specified volume-sets, where volume-sets is a comma-delimited list of volume names. When displaying Remote Mirror statistics, the name specified is compared to the Remote Mirror primary volume to determine if they match. Additionally, an Remote Mirror volume should be specified as <host>:<volume> where <host> is the primary or secondary host and <volume> is the volume name by which that host recognizes the volume set. When specifying multiple Remote Mirror volumes sets, be aware that each volume set specified is evaluated individually, using the rules above. When displaying Point-in-Time Copy statistics, the volume name specified is compared to the Point-in-Time Copy shadow volume to determine if they match.
Output field headers at every reporting cycle.
Output field headers once, when reporting begins.
Suppress report lines that have zero values or no activity.
The dsstat command line supports the following operands: interval
Specifies the interval for each report, in seconds. If no interval is specified, a single report with a one second interval is output. Due to the varying number of entries in a given set and the varying number of sets, header information might appear in the middle of a set being reported. To avoid this, use the -f or -F options to display the header information at the desired time.
Specifies the number of reports to generate. If no count is specified, output continues until interrupted.
Unless otherwise specified, all fields are per-second averages based on the data collected during the specified interval. name
Name of the entity being reported
Volume type
Volume status
Cache read behavior
Cache write behavior
Percentage of volume requiring sync
Role of the item being reported
Total number of reads + writes
Number of reads
Number of writes
Total kilobytes read + written
Kilobytes read
Kilobytes written
Kilobytes read from cache
Kilobytes read from disk
Kilobytes written to cache
Kilobytes written to disk
Kilobytes transferred to or from cache
Kilobytes transferred to or from disk
Service time per operation
Read hits during interval
Kilobytes destaged from cache
Number of write cancellations
Type of asynchronous queuing being used
Number of items currently queued
Kilobytes currently queued
High water mark of queued items
High water mark of queued kilobytes
The name field displays only the last 16 characters of the name.
Valid cache behaviors for cache are: C
DValid volume types for ii are: I
Independent shadow volume
Dependent shadow volume
Valid volume status for ii is: C
Copy in progress
No copy in progress
Valid volume types for sndr are: P
This is the primary host of this volume set
This is the secondary host of this volume set
Valid volume status for sndr is: L
Changes to this volume are being logged
Volume are in queuing mode
Replicating changes to secondary
Synchronization in progress. Sending data.
Reverse synchronization in progress. Receiving data.
Synchronization needed
Reverse synchronization needed
Volume failed
Bitmap failed
Queue failed
Valid queue types for sndr are: D
Disk-based queuing enabled
Memory-based queuing enabled
Volume roles for sndr are: net
Network volume statistics
Bitmap volume statistics
Volume roles for ii are: mst
Master volume statistics
Shadow volume statistics
Bitmap volume statistics
Overflow volume statistics
Example 1 Report Cache Statistics
The following example shows the display of Report Cache statistics, with detailed breakdowns of read and writes to cache/disk. Reports are generated at five second intervals. Reporting is limited to the set /dev/rdsk/c1t1d0s0.
# dsstat -m cache -d rw -s /dev/rdsk/c1t1d0s0 5 - read - - write - name ckps dkps hit ckps dkps hit dev/rdsk/c1t1d0s0 0 0 0.00 0 0 0.00 dev/rdsk/c1t1d0s0 3 2396 0.13 983 763 100.00 dev/rdsk/c1t1d0s0 2399 799 75.00 2815 2686 100.00 dev/rdsk/c1t1d0s0 3200 800 80.00 2755 2908 100.00 dev/rdsk/c1t1d0s0 3999 799 83.33 2809 2868 100.00 dev/rdsk/c1t1d0s0 4800 800 85.71 2867 2931 100.00
Example 2 Report Master, Shadow and Bitmap Statistics
Report master, shadow and bitmap statistics for Point-in-Time Copy, using default output. Generate reports at two second intervals.
# dsstat -m ii -r msb 2 name t s pct role kps tps svt dev/rdsk/c0t1d0s5 I C 96.15 mst 19921 38 22 dev/rdsk/c0t1d0s6 shd 9960 19 20 dev/rdsk/c0t1d0s7 bmp 39 77 2 dev/rdsk/c0t1d0s5 I C 94.24 mst 19623 38 22 dev/rdsk/c0t1d0s6 shd 9939 19 20 dev/rdsk/c0t1d0s7 bmp 39 77 2 dev/rdsk/c0t1d0s5 I C 92.34 mst 19969 39 22 dev/rdsk/c0t1d0s6 shd 9984 19 20 dev/rdsk/c0t1d0s7 bmp 39 78 2
Example 3 Report Network Statistics for Remote Mirror
Report network statistics for Remote Mirror, using detailed read, write statistics. Report includes volume type/status flags and percentages. Generate reports at two second intervals. Limit reporting to the set /dev/rdsk/c0t1d0s0.
# dsstat -m sndr -r n -d rwpf -s /dev/rdsk/c0t1d0s0 2 name t s pct role rkps rtps wkps wtps dev/rdsk/c0t1d0s0 P L 100.00 sec 0 0 0 0 dev/rdsk/c0t1d0s0 P SY 99.90 sec 0 0 288 9 dev/rdsk/c0t1d0s0 P SY 97.90 sec 0 0 5296 165 dev/rdsk/c0t1d0s0 P SY 95.81 sec 0 0 5184 161 dev/rdsk/c0t1d0s0 P SY 93.81 sec 0 0 5280 164 dev/rdsk/c0t1d0s0 P SY 91.71 sec 0 0 5198 162
The following exit values are returned: 0
Successful completion.
Successful completion, no statistics to report.
An invalid argument has been encountered.
No memory is available to create kstat statistics.
An unknown error has occurred.
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE ATTRIBUTE VALUE |
Interface Stability Evolving |
dscfg(1M), svadm(1M), ds.log(4), rdc.cf(4), attributes(5)