Created
June 22, 2017 05:22
-
-
Save bdelacretaz/0c2a6d994efcf726dd9c43b1dee6babb to your computer and use it in GitHub Desktop.
dtrace script to dump all file open calls for a specific process
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/sbin/dtrace -s | |
/* dump all "open" syscalls */ | |
/* $1 is the PID to observe */ | |
syscall::open:entry | |
/pid == $1/ | |
{ | |
printf("'%s' (PID: %d): syscall:open %s", execname, pid, copyinstr(arg0)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment