Before summarizing uptime and the free command, continue today to summarize the iostat. Leave a note for yourself. At the same time also want to be useful to everyone.
Version number information:
Sysstat version 9.0.4
(C) Sebastien Godard (Sysstat <at> orange.fr)
Basic use:
Iostat [-c] [-d] [-n] [-n] [-h] [-K |-m] [-t] [-v] [-X] [-z] [device [...] | ALL] [-p [device [,...] | ALL] [Inter-val [Count]]
[-c]: Output CPU statistics
[-d]: Output disk statistics Note: The default is two outputs
[-n]: Output IO information according to device Mapper, which is what we often call LVM
[-n]: Output IO information based on network file system (NFS) (Kernel version> 2.6.17)
[-h]: Better readability of NFS statistics
[-K |-m]: replace the original block/s with kb/s|mb/s
[-T]: print time to collect information at the moment Note: Time printing format and system variable S_time_format related
[-V]: version number information
[-X]: Output Expansion Statistics Note: summary in the following
[-z]: RESET disk input/output information
[Device [...] | ALL]: Device list
[-P [device[...]| ALL]]: Device list. But this will output the IO information of the sub-device. For example, SDB will output the partition information of SDB1, SDB2, etc.
[Inter-val [Count]]:inter-val is the statistical time interval unit is S,count is the number of statistics
Interpretation of output information:
Basic CPU Output Information:
%user: Percentage of CPU consumed by user processes
%nice: User process priority tuning CPU consumption
%sys: CPU scale consumed by the system core
%iowait: CPU scale consumed by waiting for disk IO
%idle: Percentage of idle CPUs (not including s that wait for disk IO)
Basic Device Output Information:
Device: The name of the appliance
Tps: Number of IO transmissions per second on the device (possibly multiple IO are composed of one IO)
BLK_READ/S: Number of blocks (kernel 2.4, block=512byte) read from device per second
BLK_WRTN/S: Number per second written to device block (kernel 2.4 or more, Block=512byte)
Blk_read: Within a time interval. Read the total block count from the device
BLK_WRTN: The total number of blocks written to the device during the time interval
Note: Activate the-K|-M option. will become kb_* or mb_*.
The-x option expands the output information:
RRQM/S: Number of read operations per second for merge (multiple IO merges)
wrqm/s: Number of write operations per second for merge (multiple IO merges)
R/S: Number of Read IO devices completed per second
W/S: Number of Write IO devices completed per second
RSEC/S: Number of Read sectors per second
WSEC/S: Number of Write sectors per second Note: Activation-k|-m will become rkb/s wkb/s | rmb/s wmb/s
Avgrq-sz: The average size of each IO device (in sectors) due to the merge read or write. So each IO size needs to be calculated
Avgqu-sz: Average I/O Queue Length
Await: The wait time for each IO device also contains the IO service time (milliseconds).
the size of an await typically depends on the service time (SVCTM) and the length of the I/O queue and the emit mode of the I/O request.
Usage examples:
The basic analysis is over, let's take a look at some of the usage examples. The specific reference explanation is skipped.
Iostat Command Specific explanation--linux performance analysis