From owner-cvs-all Sun Nov 25 15:37: 2 2001 Delivered-To: cvs-all@freebsd.org Received: from obsecurity.dyndns.org (adsl-64-165-226-105.dsl.lsan03.pacbell.net [64.165.226.105]) by hub.freebsd.org (Postfix) with ESMTP id 109D037B405; Sun, 25 Nov 2001 15:36:57 -0800 (PST) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id 976D366C29; Sun, 25 Nov 2001 15:36:56 -0800 (PST) Date: Sun, 25 Nov 2001 15:36:56 -0800 From: Kris Kennaway To: Ian Dowse Cc: Kris Kennaway , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.bin/tail forward.c Message-ID: <20011125153656.A94203@xor.obsecurity.org> References: <20011125144540.A93369@xor.obsecurity.org> <200111252321.aa42920@salmon.maths.tcd.ie> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="mP3DRpeJDSE+ciuQ" Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200111252321.aa42920@salmon.maths.tcd.ie>; from iedowse@maths.tcd.ie on Sun, Nov 25, 2001 at 11:21:02PM +0000 Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --mP3DRpeJDSE+ciuQ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Nov 25, 2001 at 11:21:02PM +0000, Ian Dowse wrote: > In message <20011125144540.A93369@xor.obsecurity.org>, Kris Kennaway writ= es: > > > >Hmm, this strikes me as a bit nasty...ideally you shouldn't have to > >poll for any status changes in a kqueue world. Is there an easy way > >kq could be improved to handle this? >=20 > I guess tail could add a kevent for every component in the specified > path including expanded symlinks (and resort to polling if any were > on filesystems that don't support kqueue). I think that would just > over-complicate tail for very little real gain. Note that tail -f > doesn't use polling; it's only when you explicitly tell tail that > the path might change by specifying "-F" that it gets used. I > suppose for -F, the timeout could be increased to 5 or 10 seconds > also because simple renames within the same directory are noticed > immediately. I dunno..the major use of tail -F is probably on logfiles which get rotated infrequently. I can imagine that a site might want to simultaneously monitor a large number of logfiles, but I don't know what the CPU impact of that with your change would be..maybe not much. If you tail -F, say, 100 simultaneous files, how much CPU does that stat'ing use? Kris --mP3DRpeJDSE+ciuQ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (FreeBSD) Comment: For info see http://www.gnupg.org iD8DBQE8AYCEWry0BWjoQKURAh9xAJ9ZnqHFZxDNCFa1TFQ2iHQJj44+8wCfSKbF 2gKE0XwXcsCKtxbpHrYvXy0= =XYIn -----END PGP SIGNATURE----- --mP3DRpeJDSE+ciuQ-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message