iostat - report I/O statistics
/usr/bin/iostat [-cCdDeEiImMnpPrstxXYz] [-l n] [-T u | d] [disk]... [interval [count]]
The iostat utility iteratively reports terminal, disk, and tape I/O activity, as well as CPU utilization. The first line of output is for all time since boot; each subsequent line is for the prior interval only.
To compute this information, the kernel maintains a number of counters. For each disk, the kernel counts reads, writes, bytes read, and bytes written. The kernel also takes hi-res time stamps at queue entry and exit points, which allows it to keep track of the residence time and cumulative residence-length product for each queue. Using these values, iostat produces highly accurate measures of throughput, utilization, queue lengths, transaction rates and service time. For terminals collectively, the kernel simply counts the number of input and output characters.
During execution of the kernel status command, the state of the system can change. If relevant, a state change message is included in the iostat output, in one of the following forms:
<<device added: sd0>> <<device removed: sd0>> <<partition added: sd0,a>> <<partition removed: sd0,a>> <<NFS mounted: nfs1>> <<NFS unmounted: nfs1>> <<multi-path added: ssd4>> <<multi-path removed: ssd4>> <<controller added: c1>> <<controller removed: c1>> <<processors added: 1, 3>> <<processors removed: 1, 3>>
Note that the names printed in these state change messages are affected by the -n and -m options as appropriate.
For more general system statistics, use sar(1), sar(1M), or vmstat(1M).
The output of the iostat utility includes the following information.
device
r/s
w/s
kr/s
The average I/O size during the interval can be computed from kr/s divided by r/s.
kw/s
The average I/O size during the interval can be computed from kw/s divided by w/s.
wait
This is the number of I/O operations held in the device driver queue waiting for acceptance by the device.
actv
This is the number of I/O operations accepted, but not yet serviced, by the device.
svc_t
The svc_t output reports the overall response time, rather than the service time, of a device. The overall time includes the time that transactions are in queue and the time that transactions are being serviced. The time spent in queue is shown with the -x option in the wsvc_t output column. The time spent servicing transactions is the true service time. Service time is also shown with the -x option and appears in the asvc_t output column of the same report.
%w
%b
wsvc_t
asvc_t
wt
The following options are supported:
-c
-C
-d
-D
-e
-E
-i
-I
-l n
-m
-M
-n
By default, disks are identified by instance names such as ssd23 or md301. Combining the -n option with the -x option causes disk names to display in the cXtYdZsN format which is more easily associated with physical hardware characteristics. The cXtYdZsN format is particularly useful in FibreChannel (FC) environments where the FC World Wide Name appears in the t field.
-p
-P
-r
-s
-t
-T u | d
Specify u for a printed representation of the internal representation of time. See time(2). Specify d for standard date format. See ctime(3C).
-x
If no output display is requested (no -x, -e, -E), -x is implied.
-Y
In -n (descriptive) mode the targetport is shown in using the target-port property of the path. Without -n the targetport is shown using the shorter port-id. All target ports with the same target-port property value share the same port-id. The target-port-to-port-id association does not persist across reboot.
If no output display is requested (no -x, -e, -E), -x is implied.
-z
The option set -xcnCXTdz interval is particularly useful for determining whether disk I/O problems exist and for identifying problems.
The following operands are supported:
count
disk
interval
Example 1 Using iostat to Generate User and System Operation Statistics
The following command displays two reports of extended device statistics, aggregated by controller id, for user (us) and system (sy) operations. Because the -n option is used with the -x option, devices are identified by controller names.
example% iostat -xcnCXTdz 5 Mon Nov 24 14:58:36 2003 cpu us sy wt id 14 31 0 20 extended device statistics r/s w/s kr/s kw wait actv wsvc_t asvc_t %w %b device 3.8 29.9 145.8 44.0 0.0 0.2 0.1 6.4 0 5 c0 666.3 814.8 12577.6 17591.1 91.3 82.3 61.6 55.6 0 2 c12 180.0 234.6 4401.1 5712.6 0.0 147.7 0.0 356.3 0 98 d10 Mon Nov 24 14:58:41 2003 cpu us sy wt id 11 31 0 22 extended device statistics r/s w/s kr/s kw wait actv wsvc_t asvc_t %w %b device 0.8 41.0 5.2 20.5 0.0 0.2 0.2 4.4 0 6 c0 565.3 581.7 8573.2 10458.9 0.0 26.6 0.0 23.2 0 3 c12 106.5 81.3 3393.2 1948.6 0.0 5.7 0.0 30.1 0 99 d10
Example 2 Using iostat to Generate TTY Statistics
The following command displays two reports on the activity of five disks in different modes of operation. Because the -x option is used, disks are identified by instance names.
example% iostat -x tc 5 2 extended device statistics tty cpu device r/s w/s kr/s kw/s wait actv svc_t %w %b tin tout us sy wt id sd0 0.4 0.3 10.4 8.0 0.0 0.0 36.9 0 1 0 10 0 0 0 99 sd1 0.0 0.0 0.3 0.4 0.0 0.0 35.0 0 0 sd6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 nfs1 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 nfs2 0.0 0.0 0.0 0.1 0.0 0.0 35.6 0 0 extended device statistics tty cpu device r/s w/s kr/s kw/s wait actv svc_t %w %b tin tout us sy wt id sd0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 0 155 0 0 0 100 sd1 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 sd6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 nfs1 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 nfs2 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0
Example 3 Using iostat to Generate Partition and Device Statistics
The following command generates partition and device statistics for each disk. Because the -n option is used with the -x option, disks are identified by controller names.
example% iostat -xnp extended device statistics r/s w/s kr/s kw/s wait actv wsvc_t asvc_t %w %b device 0.4 0.3 10.4 7.9 0.0 0.0 0.0 36.9 0 1 c0t0d0 0.3 0.3 9.0 7.3 0.0 0.0 0.0 37.2 0 1 c0t0d0s0 0.0 0.0 0.1 0.5 0.0 0.0 0.0 34.0 0 0 c0t0d0s1 0.0 0.0 0.0 0.1 0.0 0.0 0.6 35.0 0 0 fuji:/export/home/user3
Example 4 Show Translation from Instance Name to Descriptive Name
The following example illustrates the use of iostat to translate a specific instance name to a descriptive name.
example% iostat -xn sd1 extended device statistics r/s w/s kr/s kw/s wait actv wsvc_t asvc_t %w %b device 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 c8t1d0
Example 5 Show Target Port and Controller Activity for a Specific Disk
In the following example, there are four controllers, all connected to the same target port.
# iostat -Y ssd22 extended device statistics device r/s w/s kr/s kw/s wait actv svc_t %w %b ssd22 0.2 0.0 1.5 0.0 0.0 0.0 0.7 0 0 ssd22.t2 0.2 0.0 1.5 0.0 0.0 0.0 0.0 0 0 ssd22.t2.fp0 0.0 0.0 0.4 0.0 0.0 0.0 0.0 0 0 ssd22.t2.fp1 0.0 0.0 0.4 0.0 0.0 0.0 0.0 0 0 ssd22.t2.fp2 0.0 0.0 0.4 0.0 0.0 0.0 0.0 0 0 ssd22.t2.fp3 0.0 0.0 0.4 0.0 0.0 0.0 0.0 0 0
See attributes(5) for descriptions of the following attributes:
|
Invocation is evolving. Human readable output is unstable.
sar(1), sar(1M), mpstat(1M), vmstat(1M), time(2), ctime(3C), attributes(5), scsi_vhci(7D)
The sum of CPU utilization might vary slightly from 100 because of rounding errors in the production of a percentage figure.
The svc_t response time is not particularly significant when the I/0 (r/s+w/s) rates are under 0.5 per second. Harmless spikes are fairly normal in such cases.
The mpstat utility reports the same wt, usr, and sys statistics. See mpstat(1M) for more information.
When executed in a zone and if the pools facility is active, iostat(1M) will only provide information for those processors in the processor set of the pool to which the zone is bound.
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |