Linux command
iostat 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Example
iostat
Example
iostat -m
Example
iostat -c
Example
iostat -N
Example
iostat -x
Example
iostat -xN [sda]
Example
iostat 2
Example
iostat 2 5
Example
iostat -o JSON
Example
iostat -yz 2
说明
iostat monitors system input/output device loading by observing the time devices are active in relation to their average transfer rates. It generates CPU and device utilization reports useful for optimizing I/O performance.
参数
- -c
- Display CPU utilization only
- -d
- Display device utilization only
- -x
- Display extended statistics
- -k
- Display statistics in kilobytes per second
- -m
- Display statistics in megabytes per second
- -N
- Display registered device mapper names (LVM)
- -p _device_|ALL
- Display statistics for block devices and all their partitions.
- -h
- Make the NFS and Device reports easier to read by a human.
- -t
- Print timestamp for each report
- -y
- Omit first report (boot statistics)
- -z
- Exclude inactive devices from report
- -g GROUP
- Display statistics grouped together
- -H
- With -g, only show group totals
- -j {ID|LABEL|PATH|UUID}
- Display persistent device names
- -o JSON
- Output in JSON format
- --human
- Print sizes in human-readable format
- --pretty
- Pretty-print device names.
- -s
- Display short (narrow) report fitting 80-column screens.
- -V
- Print version number and exit.
FAQ
What is the iostat command used for?
iostat monitors system input/output device loading by observing the time devices are active in relation to their average transfer rates. It generates CPU and device utilization reports useful for optimizing I/O performance.
How do I run a basic iostat example?
Run `iostat` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -c do in iostat?
Display CPU utilization only