From owner-freebsd-alpha Thu Jan 31 16:16:37 2002 Delivered-To: freebsd-alpha@freebsd.org Received: from rwcrmhc52.attbi.com (rwcrmhc52.attbi.com [216.148.227.88]) by hub.freebsd.org (Postfix) with ESMTP id E246A37B400 for ; Thu, 31 Jan 2002 16:16:26 -0800 (PST) Received: from peter3.wemm.org ([12.232.27.13]) by rwcrmhc52.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020201001626.IKQK3578.rwcrmhc52.attbi.com@peter3.wemm.org> for ; Fri, 1 Feb 2002 00:16:26 +0000 Received: from overcee.wemm.org (overcee.wemm.org [10.0.0.3]) by peter3.wemm.org (8.11.0/8.11.0) with ESMTP id g110GQs57227 for ; Thu, 31 Jan 2002 16:16:26 -0800 (PST) (envelope-from peter@wemm.org) Received: from wemm.org (localhost [127.0.0.1]) by overcee.wemm.org (Postfix) with ESMTP id 3AB243809; Thu, 31 Jan 2002 16:16:26 -0800 (PST) (envelope-from peter@wemm.org) X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: Bernd Walter Cc: Steve Price , alpha@FreeBSD.ORG Subject: Re: ps(1) output Q In-Reply-To: <20020131103128.GA6082@cicely8.cicely.de> Date: Thu, 31 Jan 2002 16:16:26 -0800 From: Peter Wemm Message-Id: <20020201001626.3AB243809@overcee.wemm.org> Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Bernd Walter wrote: > On Wed, Jan 30, 2002 at 10:00:15PM -0600, Steve Price wrote: > > Here's a really stupid question but something I've wondered for a long > > time. Why is it that the output of ps(1) on the Alpha always looks like > > this? > > > > PID TT STAT TIME COMMAND > > 77337 p0 Ss 0:00.21 (csh) > > 78179 p0 R+ 0:00.00 (ps) > > You can't access the remaining process informations, either by > permission or if the process is swapped. > > > While on the x86 it look like this? > > > > PID TT STAT TIME COMMAND > > 80796 p0 Is+ 0:00.04 zsh > > 14534 r5 I+ 3:48.99 mutt -y > > Put some mmeory load on the host or look at process from other users > and you will see this too. Care to double check this patch? ---------------------------- revision 1.41 date: 2001/11/08 00:23:06; author: peter; state: Exp; lines: +3 -3 kern.ps_arg_max_cache is a long, not an int. I believe this is half of what broke ps on ia64. It probably also broke on alpha, but the fallback method of using lseek/read on /proc/*/mem to read ps_strings seems to work there. It doesn't on ia64 yet. ---------------------------- revision 1.25.2.2 date: 2002/01/31 23:47:10; author: peter; state: Exp; lines: +1 -1 MFC 1.41: kern.ps_arg_max_cache is a long, not an int. This breaks ps(1) without /proc on 4.x on alpha. ---------------------------- RCS file: /home/ncvs/src/lib/libkvm/kvm_proc.c,v retrieving revision 1.25.2.1 retrieving revision 1.25.2.2 diff -u -r1.25.2.1 -r1.25.2.2 --- kvm_proc.c 1 Jul 2000 05:39:52 -0000 1.25.2.1 +++ kvm_proc.c 31 Jan 2002 23:47:10 -0000 1.25.2.2 @@ -670,7 +670,7 @@ int oid[4]; int i; size_t bufsz; - static int buflen; + static unsigned long buflen; static char *buf, *p; static char **bufp; static int argc; It seems to fix it for me, but a double check from somebody else would be handy in case it depends on something else that I've forgotten about. Dont forget to umount /proc while testing. Cheers, -Peter -- Peter Wemm - peter@FreeBSD.org; peter@yahoo-inc.com; peter@netplex.com.au "All of this is for nothing if we don't go to the stars" - JMS/B5 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message