The collection contains FreeBSD compatible versions of common DTrace scripts.
Outputs information about read/write calls by processes. Also provides the possibility to filter output by a certain process name or PID.
./bsdrwsnoop
./bsdrwsnoop -p 1773
./bsdrwsnoop -n bash
Shows ZFS read/write per process and file that are slower than a certain number of milliseconds, provided as a command line argument
./zfsslower.d 100
Traces 10,000 IO events or 15 minutes, whichever comes first. Traces user-level events via the ZFS/VFS interfaces, and is very verbose, because it includes ARC hits.
./zilt10k.d
Observes VFS events (open, close, read, etc.) for running systems
./vfssnoop.d
Track the amount of outstanding dirty data within your storage pool to know which way to adjust zfs_dirty_data_max. Requires the name of your zpool as a command line argument
./zfstxgsyncbytes.d zroot
Measure the time to sync transaction groups, so that you know how long it would take to flush zfs_dirty_data_max bytes to disk. Requires the name of your zpool as a command line argument
./zfstxgsyncduration.d zroot
Measure time, size, and number of IO operations, per spa_sync() call, which is the call which writes your txg out to disk.
./spasync.d
Measure average latency, standard deviation, iops, and throughput with a distribution for IO operations. Useful for adjusting the following sysctls for your hardware:
vfs.zfs.vdev.sync_read_min_active
vfs.zfs.vdev.sync_read_max_active
vfs.zfs.vdev.sync_write_min_active
vfs.zfs.vdev.sync_write_max_active
vfs.zfs.vdev.async_read_min_active
vfs.zfs.vdev.async_read_max_active
vfs.zfs.vdev.async_write_min_active
vfs.zfs.vdev.async_write_max_active
./rw.d
Measure ZIL activity to determine if an SLOG device will be a useful addition to your zpool
Adapted for FreeBSD from: http://www.richardelling.com/Home/scripts-and-programs-1/zilstat
Note: Requires FreeBSD 10.2 or later, otherwise the necessary function to trace is inlined.
./zilstat
./zilstat -t 60 (print timestamps with output every 60 seconds)
./zilstat 10 6 (print 10 samples 6 times)
./zilstat -p zroot (print activity for a particular zpool)
./zilstat -h (print additional help and usage)