[geeks] "Filemon" for Unix

James Braid jamesb at loreland.org
Mon May 31 22:06:55 CDT 2004


On 1/06/2004, at 5:59 AM, Matthew Braun wrote:
> I'm actually on an OS X box, but given the lack of valid options, I'm 
> curious if there's such a tool for any Unix-based OS.
>
> Filemon was great for figuring out why a program was bombing out when 
> it was trying to read or write to a file that didn't exist or had the 
> wrong permissions when the program wasn't very communicative ("An 
> error has occurred" doesn't do much for me) and I'm confronted with a 
> similar problem (something that once worked now does not after some 
> directory fuckups).

On OS X, ktrace/kdump should do the trick... run ktrace $your_command 
which will make a ktrace.out file, then run kdump -f ktrace.out, and 
look for the permission denied or whatever. It will show you all the 
system calls that the process does, so you can see which files it tries 
to open unsuccessfully. Its not as nice as filemon, but it should do 
the job.

If you are on Linux, use strace, IRIX, use par, Solaris, use truss.

Cheers, James

[demime 1.01d removed an attachment of type application/pgp-signature which had a name of PGP.sig]



More information about the geeks mailing list