From owner-freebsd-bugs Mon Apr 20 10:47:11 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id KAA21558 for freebsd-bugs-outgoing; Mon, 20 Apr 1998 10:47:11 -0700 (PDT) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: from gateman.zeus.leitch.com (gateman.zeus.leitch.com [204.187.61.193]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id RAA21528 for ; Mon, 20 Apr 1998 17:46:57 GMT (envelope-from woods@tap.zeus.leitch.com) Received: from zeus.leitch.com (tap.zeus.leitch.com [204.187.61.10]) by gateman.zeus.leitch.com (8.8.5/8.7.3/1.0) with ESMTP id NAA18438 for ; Mon, 20 Apr 1998 13:46:39 -0400 (EDT) Received: from brain.zeus.leitch.com (brain.zeus.leitch.com [204.187.61.32]) by zeus.leitch.com (8.7.5/8.7.3/1.0) with ESMTP id NAA23713 for ; Mon, 20 Apr 1998 13:46:38 -0400 (EDT) Received: (from woods@localhost) by brain.zeus.leitch.com (8.8.8/8.8.8) id NAA13877; Mon, 20 Apr 1998 13:46:38 -0400 (EDT) (envelope-from woods@tap.zeus.leitch.com) Date: Mon, 20 Apr 1998 13:46:38 -0400 (EDT) Message-Id: <199804201746.NAA13877@brain.zeus.leitch.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit From: woods@zeus.leitch.com (Greg A. Woods) To: freebsd-bugs@FreeBSD.ORG Subject: Re: kern/5236 In-Reply-To: Pierre Beyssac's message of "Mon, April 20, 1998 10:54:46 +0200" regarding "Re: kern/5236" id <19980420105446.AG32944@mars.hsc.fr> References: <19980420011335.SG57732@@> <16263.893051669@critter.freebsd.dk> <19980420105446.AG32944@mars.hsc.fr> X-Mailer: VM 6.45 under Emacs 20.2.1 Reply-To: freebsd-bugs@FreeBSD.ORG Organization: Planix, Inc.; Toronto, Ontario; Canada Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org [ On Mon, April 20, 1998 at 10:54:46 (+0200), Pierre Beyssac wrote: ] > Subject: Re: kern/5236 > > > Second: ps doesn't give an atomic snapshot of the system, > > so it isn't an accurate view of system resources. > > Even though they are supposed to be updated atomically, the problem > is most certainly with kernel tables, ps only reflects this. I assume > top would, too, but I haven't tried it (hence the filing of my > PR in the "kern" category). In theory ps should report the last state of *all* variables in struct proc *and* struct user, but since the data in the u-area goes away when the process becomes a zombie, zeros must be reported for those values. IMNSHO it would be wrong to zero out other fields in struct proc when making the process a zombie, esp. since this would make it difficult to account some values to the parent upon final exit(). I.e. what I'm getting at is that this PR is a *user* problem -- a misunderstanding of what's being reported by ps. Ps doesn't report about system resource utilization -- it reports per-*process* resource utilization, and the numbers reported for a zombie represent the resources it had used up to the point it died. -- Greg A. Woods +1 416 443-1734 VE3TCP Planix, Inc. ; Secrets of the Weird To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message