Tracing system calls

simX

Unofficial Mac Genius
Is there a command built-in to Mac OS X that traces system calls? More specifically, I would like a program that traces which files a certain program reads and writes to.

Is there a program for Mac OS X/OS X's subsystem that can accomplish this? Any suggestions would be appreciated. I just need to find and trash a certain problem file that a program is reading and writing to, but I can't seem to find it, and the program doesn't have an uninstaller.

I tried ktrace, but ktrace claims that the kernel of OS X needs to be recompiled before ktrace will work.
 
Unfortunately, OSX doesn't seem to have the all important 'ptrace' syscall
which is what is generally required to make that happen.

You might want to check out 'lsof' though (it lists open files, etc).
 
There are two programs, fs_usage and sc_usage, which show some information but I have yet to figure out how to use them to show what you're looking for. fstat may also be a possibility.
 
Back
Top