From owner-freebsd-hackers Tue Oct 1 10:59:50 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id KAA05743 for hackers-outgoing; Tue, 1 Oct 1996 10:59:50 -0700 (PDT) Received: from terra.Sarnoff.COM (terra.sarnoff.com [130.33.11.203]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id KAA05736 for ; Tue, 1 Oct 1996 10:59:47 -0700 (PDT) Received: (from rminnich@localhost) by terra.Sarnoff.COM (8.6.12/8.6.12) id NAA19663; Tue, 1 Oct 1996 13:58:51 -0400 Date: Tue, 1 Oct 1996 13:58:50 -0400 (EDT) From: "Ron G. Minnich" X-Sender: rminnich@terra To: Jason Thorpe cc: hackers@FreeBSD.ORG Subject: Re: PS broke again -- what has to be rebuilt to stop this? In-Reply-To: <199610011621.JAA01098@lestat.nas.nasa.gov> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On Tue, 1 Oct 1996, Jason Thorpe wrote: > In my mind, using /proc for ps(1) is just silly... yup. the /proc approach is easy from the point of view of some uses, but suppose you want to do continuous monitoring of kernel variables for some reason. The best way it seems to me is to mmap the kernel address space in and simply monitor what you need to monitor. One of the worst ways is to periodically call a read() system call that vectors through vfs to /proc -- that's a big chunk of time to get the same information. Also, suppose you want to look at something that's not in the current /proc -- you have to build the kvm walker anyway. /proc is nice but does have its limitations. ron Ron Minnich |"If you leave out all the killings, D.C. has as rminnich@sarnoff.com | low a crime rate as many cities" -- (609)-734-3120 | D.C. Mayor Marion Barry ftp://ftp.sarnoff.com/pub/mnfs/www/docs/cluster.html