How to do it...

Follow these steps to obtain a sample output from the iotop command:

  1. Enter interactive mode with this command (exit by pressing q):
        sudo iotop
  1. Obtain batch output for 10 seconds with this command:
        sudo iotop -b -n 10
  1. Restrict batch output to only active processes, include a timestamp, and suppress the headers with this command:
        sudo iotop -bot -qqq

Get PostgreSQL High Availability Cookbook - Second Edition 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.