From owner-freebsd-questions@FreeBSD.ORG Wed Oct 29 02:00:54 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 157EF16A4CE for ; Wed, 29 Oct 2003 02:00:54 -0800 (PST) Received: from smtp.infracaninophile.co.uk (ns0.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id B09E843F3F for ; Wed, 29 Oct 2003 02:00:51 -0800 (PST) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost [127.0.0.1]) h9TA0F4b021537 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 29 Oct 2003 10:00:45 GMT (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost)id h9TA0F1R021536; Wed, 29 Oct 2003 10:00:15 GMT (envelope-from matthew) Date: Wed, 29 Oct 2003 10:00:15 +0000 From: Matthew Seaman To: andi payn Message-ID: <20031029100015.GA21376@happy-idiot-talk.infracaninophile.co.uk> Mail-Followup-To: Matthew Seaman , andi payn , freebsd-questions@freebsd.org References: <000c01c39c3e$72c47950$fe01a8c0@JMICH> <20031027113545.GB11587@happy-idiot-talk.infracaninophile.co.uk> <1067418435.36829.690.camel@verdammt.falcotronic.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="UugvWAfsgieZRqgk" Content-Disposition: inline In-Reply-To: <1067418435.36829.690.camel@verdammt.falcotronic.net> User-Agent: Mutt/1.5.4i X-Spam-Status: No, hits=-4.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=2.60 X-Spam-Checker-Version: SpamAssassin 2.60 (1.212-2003-09-23-exp) on happy-idiot-talk.infracaninophile.co.uk cc: freebsd-questions@freebsd.org Subject: Re: Log every access to a file X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Oct 2003 10:00:54 -0000 --UugvWAfsgieZRqgk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 --=20 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 --UugvWAfsgieZRqgk Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (FreeBSD) iD8DBQE/n4+vdtESqEQa7a0RAl6nAJ9GezyzD+EyTfCeabimfi6SjbU0ugCeMc+q 7vADpO5wDbcoRnHEICPXrYM= =BwjM -----END PGP SIGNATURE----- --UugvWAfsgieZRqgk--