Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 Nov 2003 10:48:07 +0100 (CET)
From:      "Cordula's Web" <cpghost@cordula.ws>
To:        wegster@mindcore.net
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Monitoring a file?
Message-ID:  <200311230948.hAN9m6pd097582@fw.farid-hajji.net>
In-Reply-To: <3FBFEE6B.4000803@mindcore.net> (message from Scott W on Sat, 22 Nov 2003 18:16:59 -0500)
References:  <200311222258.hAMMwApd092388@fw.farid-hajji.net> <3FBFEE6B.4000803@mindcore.net>

next in thread | previous in thread | raw e-mail | index | archive | help
> >  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. http://www.cordula.ws/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200311230948.hAN9m6pd097582>