Monitoring a file?

Cordula's Web cpghost at
Sun Nov 23 01:48:52 PST 2003

> >  What is the canonical way to monitor accesses to a file?
> You may want to take a look at 'fam,' in /usr/ports/devel/fam , as some 
> of the code's already been done for this type of monitoring AFAIK...

Yes, that is a nice framework to start with. It uses help from
the kernel (imon pseudo device on irix or linux), or polls the
files with lstat(). It could be extended to use kevent(2) on FBSD...

Unfortunately, it still doesn't know which process accessed the
files. Hmmm...

Thank you.

Cordula's Web.

More information about the freebsd-questions mailing list