Skip to content

Instantly share code, notes, and snippets.

@dryliketoast
Last active February 7, 2023 08:22
Show Gist options
  • Save dryliketoast/b2bd450a54dd0fa26dbeb0c35787fdf3 to your computer and use it in GitHub Desktop.
Save dryliketoast/b2bd450a54dd0fa26dbeb0c35787fdf3 to your computer and use it in GitHub Desktop.
Is there a tool like iotop but for monitoring IO on specific volumes?
https://unix.stackexchange.com/questions/72027/iotop-but-for-particular-disk/701656#701656
Check out `fatrace`
For example, cd into the partition you want to (in my case, mount point /hdd) monitor and run
sudo fatrace -c -t
Then, for example a touch /hdd/x will show:
16:11:05.278541 touch(179482): + /hdd
16:11:05.278541 touch(179482): CWO /hdd/x
Details:
Usage: fatrace [options...]
Options:
-c, --current-mount Only record events on partition/mount of current directory.
-o FILE, --output=FILE Write events to a file instead of standard output.
-s SECONDS, --seconds=SECONDS Stop after the given number of seconds.
-t, --timestamp Add timestamp to events. Give twice for seconds since the epoch.
-p PID, --ignore-pid PID Ignore events for this process ID. Can be specified multiple times.
-f TYPES, --filter=TYPES Show only the given event types; choose from C, R, O, or W, e. g. --filter=OC.
-C COMM, --command=COMM Show only events for this command.
-h, --help Show help.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment