JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
man pages section 1M: System Administration Commands
search filter icon
search icon

Document Information

Preface

Introduction

System Administration Commands - Part 1

6to4relay(1M)

accept(1M)

acct(1M)

acctadm(1M)

acctcms(1M)

acctcon1(1M)

acctcon(1M)

acctcon2(1M)

acctdisk(1M)

acctdusg(1M)

acctmerg(1M)

accton(1M)

acctprc1(1M)

acctprc(1M)

acctprc2(1M)

acctsh(1M)

acctwtmp(1M)

adbgen(1M)

add_allocatable(1M)

addbadsec(1M)

add_drv(1M)

add_install_client(1M)

add_to_install_server(1M)

afbconfig(1M)

aliasadm(1M)

answerbook2_admin(1M)

apache(1M)

arp(1M)

aset(1M)

aset.restore(1M)

atohexlabel(1M)

audit(1M)

auditconfig(1M)

auditd(1M)

auditreduce(1M)

audit_startup(1M)

auditstat(1M)

audit_warn(1M)

automount(1M)

automountd(1M)

autopush(1M)

bart(1M)

bdconfig(1M)

boot(1M)

bootadm(1M)

bootconfchk(1M)

bootparamd(1M)

bsmconv(1M)

bsmrecord(1M)

bsmunconv(1M)

busstat(1M)

cachefsd(1M)

cachefslog(1M)

cachefspack(1M)

cachefsstat(1M)

cachefswssize(1M)

captoinfo(1M)

catman(1M)

cfgadm(1M)

cfgadm_ac(1M)

cfgadm_cardbus(1M)

cfgadm_fp(1M)

cfgadm_ib(1M)

cfgadm_pci(1M)

cfgadm_sata(1M)

cfgadm_sbd(1M)

cfgadm_scsi(1M)

cfgadm_shp(1M)

cfgadm_sysctrl(1M)

cfgadm_usb(1M)

cfsadmin(1M)

chargefee(1M)

chat(1M)

check(1M)

check-hostname(1M)

check-permissions(1M)

chk_encodings(1M)

chroot(1M)

cimworkshop(1M)

ckpacct(1M)

clear_locks(1M)

clinfo(1M)

closewtmp(1M)

clri(1M)

comsat(1M)

consadm(1m)

conv_lp(1M)

conv_lpd(1M)

coreadm(1M)

cpustat(1M)

cron(1M)

cryptoadm(1M)

cvcd(1M)

datadm(1M)

dcopy(1M)

dcs(1M)

dd(1M)

devattr(1M)

devfree(1M)

devfsadm(1M)

devfsadmd(1M)

device_remap(1M)

devinfo(1M)

devlinks(1M)

devnm(1M)

devreserv(1M)

df(1M)

dfmounts(1M)

dfmounts_nfs(1M)

dfshares(1M)

dfshares_nfs(1M)

df_ufs(1M)

dhcpagent(1M)

dhcpconfig(1M)

dhcpmgr(1M)

dhtadm(1M)

dig(1M)

directoryserver(1M)

disks(1M)

diskscan(1M)

dispadmin(1M)

dladm(1M)

dmesg(1M)

dmi_cmd(1M)

dmiget(1M)

dminfo(1M)

dmispd(1M)

dnssec-dsfromkey(1M)

dnssec-keyfromlabel(1M)

dnssec-keygen(1M)

dnssec-signzone(1M)

dodisk(1M)

domainname(1M)

drd(1M)

drvconfig(1M)

dsvclockd(1M)

dtrace(1M)

dumpadm(1M)

editmap(1M)

edquota(1M)

eeprom(1M)

efdaemon(1M)

embedded_su(1M)

etrn(1M)

fbconfig(1M)

fcinfo(1M)

fdetach(1M)

fdisk(1M)

ff(1M)

ffbconfig(1M)

ff_ufs(1M)

fingerd(1M)

fiocompress(1M)

flar(1M)

flarcreate(1M)

fmadm(1M)

fmd(1M)

fmdump(1M)

fmstat(1M)

fmthard(1M)

format(1M)

fpsd(1M)

fruadm(1M)

fsck(1M)

fsck_cachefs(1M)

fsck_pcfs(1M)

fsck_udfs(1M)

fsck_ufs(1M)

fsdb(1M)

fsdb_udfs(1M)

fsdb_ufs(1M)

fsirand(1M)

fssnap(1M)

fssnap_ufs(1M)

fsstat(1M)

fstyp(1M)

ftpaddhost(1M)

ftpconfig(1M)

ftpd(1M)

ftprestart(1M)

ftpshut(1M)

fuser(1M)

fwflash(1M)

fwtmp(1M)

getdev(1M)

getdevpolicy(1M)

getdgrp(1M)

getent(1M)

gettable(1M)

getty(1M)

getvol(1M)

GFXconfig(1M)

gkadmin(1M)

groupadd(1M)

groupdel(1M)

groupmod(1M)

growfs(1M)

grpck(1M)

gsscred(1M)

gssd(1M)

halt(1M)

hextoalabel(1M)

host(1M)

hostconfig(1M)

hotplug(1M)

hotplugd(1M)

htable(1M)

ickey(1M)

id(1M)

idsconfig(1M)

ifconfig(1M)

if_mpadm(1M)

ifparse(1M)

ikeadm(1M)

ikecert(1M)

imqadmin(1M)

imqbrokerd(1M)

imqcmd(1M)

imqdbmgr(1M)

imqkeytool(1M)

imqobjmgr(1M)

imqusermgr(1M)

in.chargend(1M)

in.comsat(1M)

in.daytimed(1M)

in.dhcpd(1M)

in.discardd(1M)

in.echod(1M)

inetadm(1M)

inetconv(1M)

inetd(1M)

in.fingerd(1M)

infocmp(1M)

in.ftpd(1M)

in.iked(1M)

init(1M)

init.sma(1M)

init.wbem(1M)

inityp2l(1M)

in.lpd(1M)

in.mpathd(1M)

in.named(1M)

in.ndpd(1M)

in.rarpd(1M)

in.rdisc(1M)

in.rexecd(1M)

in.ripngd(1M)

in.rlogind(1M)

in.routed(1M)

in.rshd(1M)

in.rwhod(1M)

install(1M)

installboot(1M)

installer(1M)

installf(1M)

installgrub(1M)

install_scripts(1M)

install-solaris(1M)

in.stdiscover(1M)

in.stlisten(1M)

in.talkd(1M)

in.telnetd(1M)

in.tftpd(1M)

in.timed(1M)

in.tnamed(1M)

intrstat(1M)

in.uucpd(1M)

iostat(1M)

ipaddrsel(1M)

ipf(1M)

ipfs(1M)

ipfstat(1M)

ipmon(1M)

ipnat(1M)

ippool(1M)

ipqosconf(1M)

ipsecalgs(1M)

ipsecconf(1M)

ipseckey(1M)

iscsiadm(1M)

iscsitadm(1M)

iscsitgtd(1M)

itu(1M)

k5srvutil(1M)

kadb(1M)

kadmin(1M)

kadmind(1M)

kadmin.local(1M)

kcfd(1M)

kclient(1M)

kdb5_ldap_util(1M)

kdb5_util(1M)

kdmconfig(1M)

kernel(1M)

keyserv(1M)

killall(1M)

kprop(1M)

kpropd(1M)

kproplog(1M)

krb5kdc(1M)

ksslcfg(1M)

kstat(1M)

ktkt_warnd(1M)

labeld(1M)

labelit(1M)

labelit_hsfs(1M)

labelit_udfs(1M)

labelit_ufs(1M)

lastlogin(1M)

ldapaddent(1M)

ldap_cachemgr(1M)

ldapclient(1M)

ldmad(1M)

link(1M)

listdgrp(1M)

listen(1M)

llc2_loop(1M)

localeadm(1M)

localectr(1M)

locator(1M)

lockd(1M)

lockfs(1M)

lockstat(1M)

lofiadm(1M)

logadm(1M)

logins(1M)

lpadmin(1M)

lpfilter(1M)

lpforms(1M)

lpget(1M)

lpmove(1M)

lpsched(1M)

lpset(1M)

lpshut(1M)

lpsystem(1M)

lpusers(1M)

lu(1M)

luactivate(1M)

lucancel(1M)

lucompare(1M)

lucreate(1M)

lucurr(1M)

ludelete(1M)

ludesc(1M)

lufslist(1M)

lumake(1M)

lumount(1M)

lurename(1M)

lustatus(1M)

luumount(1M)

luupgrade(1M)

luxadm(1M)

m64config(1M)

mail.local(1M)

makedbm(1M)

makemap(1M)

makeuuid(1M)

masfcnv(1M)

mdlogd(1M)

mdmonitord(1M)

medstat(1M)

metaclear(1M)

metadb(1M)

metadetach(1M)

metadevadm(1M)

metahs(1M)

System Administration Commands - Part 2

System Administration Commands - Part 3

iostat

- report I/O statistics

Synopsis

/usr/bin/iostat  [-cCdDeEiImMnpPrstxXYz] [-l n] [-T u | d]
 [disk]... [interval [count]]

Description

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).

Output

The output of the iostat utility includes the following information.

device

name of the disk

r/s

reads per second

w/s

writes per second

kr/s

kilobytes read per second

The average I/O size during the interval can be computed from kr/s divided by r/s.

kw/s

kilobytes written per second

The average I/O size during the interval can be computed from kw/s divided by w/s.

wait

average number of transactions waiting for service (queue length)

This is the number of I/O operations held in the device driver queue waiting for acceptance by the device.

actv

average number of transactions actively being serviced (removed from the queue but not yet completed)

This is the number of I/O operations accepted, but not yet serviced, by the device.

svc_t

average response time of transactions, in milliseconds

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

percent of time there are transactions waiting for service (queue non-empty)

%b

percent of time the disk is busy (transactions in progress)

wsvc_t

average service time in wait queue, in milliseconds

asvc_t

average service time of active transactions, in milliseconds

wt

the I/O wait time is no longer calculated as a percentage of CPU time, and this statistic will always return zero.

Options

The following options are supported:

-c

Report the percentage of time the system has spent in user mode, in system mode, waiting for I/O, and idling. See the NOTES section for more information.

-C

When the -x option is also selected, report extended disk statistics aggregated by controller id.

-d

For each disk, report the number of kilobytes transferred per second, the number of transfers per second, and the average service time in milliseconds.

-D

For each disk, report the reads per second, writes per second, and percentage disk utilization.

-e

Display device error summary statistics. The total errors, hard errors, soft errors, and transport errors are displayed.

-E

Display all device error statistics.

-i

In -E output, display the Device ID instead of the Serial No. The Device Id is a unique identifier registered by a driver through ddi_devid_register(9F).

-I

Report the counts in each interval, rather than rates (where applicable).

-l n

Limit the number of disks included in the report to n; the disk limit defaults to 4 for -d and -D, and unlimited for -x. Note: disks explicitly requested (see disk below) are not subject to this disk limit.

-m

Report file system mount points. This option is most useful if the -P or -p option is also specified or used in conjunction with -Xn or -en. The -m option is useful only if the mount point is actually listed in the output. This option can only be used in conjunction with the -n option.

-M

Display data throughput in MB/sec instead of KB/sec.

-n

Display names in descriptive format. For example, cXtYdZ, rmt/N, server:/export/path.

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

For each disk, report per-partition statistics in addition to per-device statistics.

-P

For each disk, report per-partition statistics only, no per-device statistics.

-r

Display data in a comma-separated format.

-s

Suppress messages related to state changes.

-t

Report the number of characters read and written to terminals per second.

-T u | d

Display a time stamp.

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

Report extended disk statistics. By default, disks are identified by instance names such as ssd23 or md301. Combining the x option with the -n option causes disk names to display in the cXtYdZsN format, more easily associated with physical hardware characteristics. Using the cXtYdZsN format is particularly helpful in the FibreChannel environments where the FC World Wide Name appears in the t field.

If no output display is requested (no -x, -e, -E), -x is implied.

-Y

For disks under scsi_vhci(7D) control, in addition to disk lun statistics, also report statistics for lun.targetport and lun.targetport.controller.

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

Do not print lines whose underlying data values are all zeros.

The option set -xcnCXTdz interval is particularly useful for determining whether disk I/O problems exist and for identifying problems.

Operands

The following operands are supported:

count

Display only count reports.

disk

Explicitly specify the disks to be reported; in addition to any explicit disks, any active disks up to the disk limit (see -l above) will also be reported.

interval

Report once each interval seconds.

Examples

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

Attributes

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Availability
SUNWcsu
Interface Stability
See below.

Invocation is evolving. Human readable output is unstable.

See Also

sar(1), sar(1M), mpstat(1M), vmstat(1M), time(2), ctime(3C), attributes(5), scsi_vhci(7D)

System Administration Guide: Basic Administration

Notes

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.