CHAPTER 24 Useful Utilities
% iostat 5
tty fd0 sd1 sd3 sd5 cpu
tin tout Kps tps serv Kps tps serv Kps tps serv Kps tps serv us sy wt id
0 4 0 0 0 1 0 37 2 0 33 0 0 100 25 7 0 68
0 0 0 0 0 0 0 0 0 0 0 0 0 0 9 7 0 84
0 0 0 0 0 0 0 0 16 2 80 0 0 0 3 4 0 93
0 0 0 0 0 12 3 8 88 22 12 0 0 0 2 6 25 68
2 1 0 0 0 9 2 8 23 6 13 0 0 0 0 1 9 90
1 33 0 0 0 23 5 9 19 5 13 0 0 0 2 3 9 86
2 63 0 0 0 5 1 10 0 0 0 0 0 0 1 2 0 96
1 4389 0 0 0 218 57 10 11 3 15 0 0 0 45 25 8 22
0 6728 0 0 0 150 58 12 0 0 0 0 0 0 63 29 8 0
0 7053 0 0 0 126 66 13 1 0 12 0 0 0 59 36 5 0
0 4902 0 0 0 330 76 265 40 6 25 0 0 0 44 26 9 21
0 7571 0 0 0 182 57 11 32 6 17 0 0 0 60 31 9 0
0 7900 0 0 0 144 39 9 4 1 10 0 0 0 56 36 8 0
0 7885 0 0 0 139 33 11 0 0 0 0 0 0 59 35 6 0
0 8100 0 0 0 142 29 13 18 3 16 0 0 0 59 37 4 0
0 2143 0 0 0 44 11 12 4 1 10 0 0 0 18 9 2 71
3 15 0 0 0 283 35 40 8 1 16 0 0 0 2 4 45 49
0 171 0 0 0 675 84 73 29 5 18 0 0 0 3 8 85 4
0 0 0 0 0 106 13 375 3 0 17 0 0 0 1 2 0 97
2 344 0 0 0 0 0 0 0 0 0 0 0 0 3 4 0 93
where the headings refer to:
tin characters read from terminals
tout characters written to terminals
kps Kilo bytes transferred/second
tps transfers/second
serv average service time (milliseconds) (estimated)
us user mode (% of CPU time)
sy system mode (% of CPU time)
wt waiting for I/O (% of CPU time)
id idle (% of CPU time)
The "-D" option reports the disk activity, reads/sec, writes/sec, and % disk utilization, for each disk, e.g.:
% iostat -D
fd0 sd1 sd3 sd5
rps wps util rps wps util rps wps util rps wps util
0 0 0.0 0 0 0.1 0 0 0.3 0 0 0.0
A disk is heavily loaded if the utilization rate, util, is ³ .75, or I/O operations (rps + wps) ³ 40 IOPS. To enhance system performance you might try to spread the load more evenly among the disks. Run tmpfs, which reduces disk and network traffic (for diskless clients) and reduces the number of writes to the filesystem where /tmp is located.
The "-x" option reports extended disk activity, e.g.:
extended disk statistics
disk r/s w/s Kr/s Kw/s wait actv svc_t %w %b
fd0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0
sd1 0.1 0.0 0.4 0.3 0.0 0.0 36.9 0 0
sd3 0.1 0.1 0.8 0.8 0.0 0.0 33.2 0 0
sd5 0.0 0.0 0.0 0.0 0.0 0.0 99.5 0 0
where the headings refer to:
disk name of the disk
r/s reads/second
w/s writes/second
Kr/s Kilobytes read/second
Kw/s Kilobytes written/second
wait average number of transactions waiting for service (length of queue)
actv average number of transactions currently being served
svc_t average service time (milliseconds)
%w % of time there are transactions waiting for service
%b % of time the disk is busy