From owner-freebsd-stable@FreeBSD.ORG Wed Jun 9 02:21:26 2004 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8C12316A4CE for ; Wed, 9 Jun 2004 02:21:26 +0000 (GMT) Received: from smtp2.server.rpi.edu (smtp2.server.rpi.edu [128.113.2.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id ED8D943D39 for ; Wed, 9 Jun 2004 02:21:25 +0000 (GMT) (envelope-from drosih@rpi.edu) Received: from [128.113.24.47] (gilead.netel.rpi.edu [128.113.24.47]) by smtp2.server.rpi.edu (8.12.8/8.12.8) with ESMTP id i592KxVu008028; Tue, 8 Jun 2004 22:20:59 -0400 Mime-Version: 1.0 X-Sender: drosih@mail.rpi.edu Message-Id: In-Reply-To: <001001c44dab$29125470$1414a8c0@kyle> References: <001001c44dab$29125470$1414a8c0@kyle> Date: Tue, 8 Jun 2004 22:20:58 -0400 To: "Kyle Mott" , From: Garance A Drosihn Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-Scanned-By: CanIt (www . canit . ca) Subject: Re: 'ps aux' odditiy X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jun 2004 02:21:26 -0000 At 3:51 PM -0700 6/8/04, Kyle Mott wrote: >I just finished doing a buildworld in multi-user mode (which seemed >to work OK... though only time will tell :D) to RELENG_4. However, >when I run 'ps aux', the output seems to be inverted... IE processes >with lower PID's are on the bottom. Is this normal? Here's an example: > > >USER PID %CPU %MEM VSZ RSS >root 33444 77.7 3.5 13640 ... >root 33443 4.2 0.4 1696 ... >root 33442 0.0 0.1 308 ... >root 33440 0.0 0.1 664 ... >root 33438 0.0 0.1 636 ... From the man page, `u' implies `-r', which means "sort by CPU time". Processes with the exact same CPU time will be sorted by PID, as you were expecting. It used to be that processes with "close to the same CPU time" were treated as being exactly the same (due to round-off error), and thus it used be much more likely to see many processes listed in PID order. It's possible that there's some bug there, but the last time I looked into this it seemed to be doing the right thing. I plan to look into it again, because someone else has reported that there might be a bug in there. -- Garance Alistair Drosehn = gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu