detect file system accesses for a process

Hi,

I'm trying to detect file system accesses for a process. I tried inotify, and I could successfully detect when a file was created on the desktop, but not in /proc/[pid]/fd where I wanted to. Reading the wikipedia page concerning inotify I got to know that inotify doesn't monitor the procfs and sysfs. Is there any other way of monitoring file accesses in /proc/fd? Or is there any other way of monitoring a process' file accesses?
Last edited on
I've done that or similar things a few times using LD_PRELOAD (linux) or LDR_PRELOAD (aix). Write a wrapper around the interesting system calls, compile as a shared-library, and put it in that environment variable.

But if you just want to debug some program's system calls, there's strace/truss
Thans for the reply Cubbi,

I'll try this method. I specifically want to monitor file accesses by a process.
Topic archived. No new replies allowed.