opensnoop -n MyApp
dfn install -y bcc-tools
updatedb
locate opensnoop
/usr/share/bcc/tools/opensnoop
See if system integrity protection is on with csrutil status
https://stackoverflow.com/a/60910410/143447
How to make opensnoop work with macos Sonoma:
csrutil disable
csrutil enable –without dtrace
Reboot
Find all built-in dtrace files on MacOS with:
find /usr/bin -name '*.d'
source: https://www.youtube.com/watch?v=1OMX69KOhGg
https://github.com/brendangregg/DTrace-book-scripts
Also lookup dtruss
https://www.brendangregg.com/blog/2014-07-16/iosnoop-for-linux.html
http://dtrace.org/blogs/brendan/2011/10/10/top-10-dtrace-scripts-for-mac-os-x/
Option 1:
sudo mdutil -a -i off # Turns off mds
sudo opensnoop
:: Do the intall
Option 2:
touch /tmp/foo
:: Do the install
sudo find /Volumes/HD2 -type -f -newer /tmp/foo