FreeBSD Jails & Perl: Reading /proc ...
Kirk Strauser
kirk at strauser.com
Mon Dec 27 07:22:04 PST 2004
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),
and eventually solved it by using jexec to execute ps from within a jail.
This is actually a lot faster than opening and reading a lot of files from
within /proc, *and* allows you to run a system without a mounted proc
filesystem should you want to do so.
--
Kirk Strauser
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 155 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20041227/0df090e0/attachment.bin
More information about the freebsd-questions
mailing list