How it works...

The iostat utility has a rather unique method of interpreting command-line arguments. If no recognized disks are part of the command, it simply shows information about all of them. After devices, it checks for timing statistics. To get a second-by-second status, we specify 1 second as the final argument. By providing the -d argument, we remove CPU utilization from the report.

The default output rate of iostat is in kilobytes per second (kBps). Current hardware is often so fast that these results can be almost too high to easily compare, so we set the -m parameter in the second command to change the output to MBps. We also take advantage of the fact that the last two parameters are related to timing. The first parameter specifies ...

Get PostgreSQL 12 High Availability Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.