From owner-freebsd-questions@FreeBSD.ORG Mon Dec 27 15:22:04 2004 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 6179B16A4D0 for ; Mon, 27 Dec 2004 15:22:04 +0000 (GMT) Received: from kanga.honeypot.net (kanga.honeypot.net [208.162.254.122]) by mx1.FreeBSD.org (Postfix) with ESMTP id 181DD43D45 for ; Mon, 27 Dec 2004 15:22:04 +0000 (GMT) (envelope-from kirk@strauser.com) Received: from localhost (localhost [127.0.0.1]) by kanga.honeypot.net (Postfix) with ESMTP id 2AA9121C8E7 for ; Mon, 27 Dec 2004 09:22:03 -0600 (CST) Received: from kanga.honeypot.net ([127.0.0.1]) by localhost (kanga.honeypot.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 07397-02 for ; Mon, 27 Dec 2004 09:22:02 -0600 (CST) Received: from janus.daycos.com (janus.daycos.com [204.26.70.77]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by kanga.honeypot.net (Postfix) with ESMTP id 7B50E21C888 for ; Mon, 27 Dec 2004 09:22:02 -0600 (CST) From: Kirk Strauser To: freebsd-questions@freebsd.org Date: Mon, 27 Dec 2004 09:21:58 -0600 User-Agent: KMail/1.7.2 References: <20041224101222.W1788@ganymede.hub.org> In-Reply-To: <20041224101222.W1788@ganymede.hub.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2988122.sdbQliCg1y"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200412270922.01450.kirk@strauser.com> X-Virus-Scanned: amavisd-new at honeypot.net Subject: Re: FreeBSD Jails & Perl: Reading /proc ... 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: Mon, 27 Dec 2004 15:22:04 -0000 --nextPart2988122.sdbQliCg1y Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Friday 24 December 2004 08:17, Marc G. Fournier wrote: > I'm trying to read /proc/*/status, specifically to find what processes > belong to what jail ... but, doing 'direct views' on it tends to generate > errors since processes "come-n-go" ... I had the same problem when I was writing JailAdmin (sysutils/jailadmin),=20 and eventually solved it by using jexec to execute ps from within a jail. = =20 This is actually a lot faster than opening and reading a lot of files from= =20 within /proc, *and* allows you to run a system without a mounted proc=20 filesystem should you want to do so. =2D-=20 Kirk Strauser --nextPart2988122.sdbQliCg1y Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- iD8DBQBB0CiZ5sRg+Y0CpvERAjsmAJwNiF6scT3mD1dNRpzpka2B/8VmKACfVvyz FW2L70hoNRAo5xa9444GZKg= =7EqR -----END PGP SIGNATURE----- --nextPart2988122.sdbQliCg1y--