iostat Command: Linux Performance Guide
The iostat command is a tool used to monitor performance metrics such as disk, CPU, and network on a Linux system. It provides real-time and average statistical information about disk and CPU usage on the system.
Common uses of the iostat command include:
- Check the disk usage:
- Check disk input/output statistics
- Check the usage status of a specific disk:
- Display disk statistics for a specific disk device with the command “iostat -d [disk device name]”.
- Check the CPU usage.
- Show me the CPU statistics.
- Check the usage status of network devices.
- Show network statistics.
- Set the interval for data refresh:
- iostat -d [time interval (seconds)]
- Run in batch mode and output to a specified file.
- Capture disk I/O statistics at regular intervals for a specified number of times and save the output to a file.
- View help information:
- Show me the disk I/O statistics in a human-readable format.
Please note that the iostat command requires the sysstat software package to be installed.