22

I have the same question like this, but for macOS.

There is a GUI solution with Activity Monitor. Any command line alternative? I use latest macOS Sierra.

enter image description here

2 Answers 2

18

iotop is available in macOS/OS X itself.

iotop relies on dtrace though and you have to disable SIP in systems like El Capitan/Sierra to run dtrace.

Check man iotop for options and then execute iotop as root :

sudo iotop [-C] [-D|-o|-P] [-j|-Z] [-d device] [-f filename] [-m mount_point] [-t top] [interval [count]] 
1
  • 4
    You can also selectively disable SIP, as discussed here. Commented Aug 7, 2018 at 13:18
9

sudo fs_usage -f diskio

it's not the same as iotop, but it comes with the OS and you don't have to disable SIP.

From the man pages:

The fs_usage utility presents an ongoing display of system call usage information pertaining to filesystem
     activity.  It requires root privileges due to the kernel tracing facility it uses to operate.  By default, the
     activity monitored includes all system processes except the running fs_usage process, Terminal, telnetd, telnet,
     sshd, rlogind, tcsh, csh, sh, and zsh.  These defaults can be overridden such that output is limited to include
     or exclude a list of processes specified by the user.
1
  • 1
    this is pretty interesting but seems difficult to interpret the output Commented Jan 12, 2023 at 17:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .