Skip to content

iostat MacOS Command Guide

The MacOS iostat command provides essential information about system input/output statistics, helping users monitor disk and CPU performance. With various options like -C, -w, -c, and -d, users can customize the output to display specific metrics. By analyzing disk utilization, CPU idle time, and other key indicators, users can optimize system performance and identify bottlenecks effectively. Ideal for system administrators, the iostat command is a powerful tool for performance tuning and troubleshooting on MacOS.

Terminal window
iostat [interval] [count]
OptionDescription
-CPrint output in a condensed format.
-cPrint individual CPU utilization.
-dDisplay disk utilization report.
-hOutput in a human-readable format.
-nReport network utilization.
-tInclude the time of day in the report.
-wReport statistics for I/O devices.
-xReport extended disk statistics.
ParameterDescription
intervalSpecifies the time in seconds between each report. Default is 1 second.
countIndicates the number of reports generated at intervals determined by the interval parameter. If count is not specified, iostat will continue to run until interrupted.
Terminal window
iostat -c

Displays CPU utilization statistics.

Terminal window
iostat -d

Monitors disk I/O activity.

Terminal window
iostat -w 2

Displays system load average every 2 seconds.

Terminal window
iostat -i

Displays the interrupt statistics.

Terminal window
iostat -n

Displays network I/O statistics.

Terminal window
iostat -C 5

Monitors CPU utilization in real-time every 5 seconds.

Terminal window
iostat -z

Displays all statistics together.

To use the iostat command in MacOS, execute the following command:

Terminal window
iostat

What is the purpose of the -w option in iostat?

Section titled “What is the purpose of the -w option in iostat?”

The -w option in iostat is used to set the interval between each report’s output. This allows you to control how often the statistics are displayed.

Terminal window
iostat -w 5

How can I display extended disk I/O statistics with iostat?

Section titled “How can I display extended disk I/O statistics with iostat?”

To display extended disk I/O statistics with iostat, use the -d flag in the command. This will provide detailed information about disk operations.

Terminal window
iostat -d

How to show CPU statistics in iostat for MacOS?

Section titled “How to show CPU statistics in iostat for MacOS?”

To display CPU statistics in iostat for MacOS, use the -c flag in the command. This will show details on CPU usage and activity.

Terminal window
iostat -c

Can I monitor specific disk partitions with iostat?

Section titled “Can I monitor specific disk partitions with iostat?”

Yes, you can monitor specific disk partitions with iostat by specifying the partition(s) you want to track. Use the -n flag followed by the partition name(s) in the command.

Terminal window
iostat -n disk1 disk2

How to continuously monitor system input/output statistics with iostat?

Section titled “How to continuously monitor system input/output statistics with iostat?”

To continuously monitor system input/output statistics with iostat, use the -t flag in the command. This will display a timestamp for each report.

Terminal window
iostat -t
  • Monitoring system input/output (I/O) device loading
  • Analyzing disk performance
  • Troubleshooting disk bottlenecks
  • Tracking disk utilization and throughput