Re: Log every access to a file
From: Matthew Seaman (m.seaman_at_infracaninophile.co.uk)
Date: 10/29/03
- Previous message: andi payn: "Re: Log every access to a file"
- In reply to: andi payn: "Re: Log every access to a file"
- Next in thread: Chris Pressey: "Re: Log every access to a file"
- Reply: Chris Pressey: "Re: Log every access to a file"
- Reply: andi payn: "Re: Log every access to a file"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 29 Oct 2003 10:00:15 +0000 To: andi payn <andi_payn@speedymail.org>
On Wed, Oct 29, 2003 at 01:07:26AM -0800, andi payn wrote:
> The second is to use fam. I should mention that I've only used fam under
> linux, and, after a brief glance, it looks like the FreeBSD port
> (/usr/ports/devel/fam) is not as powerful--in particular, FreeBSD
> apparently doesn't provide imon support (a way for the filesystem to
> make a callback to a usermode app like fam--no dnotify or anything
> similar, either, apparently). Which implies that it's probably just a
> heavier-weight way of doing the exact same thing--periodically stat'ing
> a list of files--and that there is no better solution available.
Check the kevent(2) man page. It's a generic mechanism for having the
kernel message your process when some condition occurs, such as
modification of a file. Unfortunately other than knowing something
happened, it doesn't tell you a great deal else, like who it was that
made the alteration.
Even so, fam(1) has apparently not been patched to use kevent(2) under
FreeBSD, so, yes, it's probably going to operate by polling the file
status every so often.
Cheers,
Matthew
--
Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks
Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey Marlow
Tel: +44 1628 476614 Bucks., SL7 1TH UK
- application/pgp-signature attachment: stored
- Previous message: andi payn: "Re: Log every access to a file"
- In reply to: andi payn: "Re: Log every access to a file"
- Next in thread: Chris Pressey: "Re: Log every access to a file"
- Reply: Chris Pressey: "Re: Log every access to a file"
- Reply: andi payn: "Re: Log every access to a file"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]