From owner-freebsd-alpha Thu Jan 31 15:41:37 2002 Delivered-To: freebsd-alpha@freebsd.org Received: from rwcrmhc53.attbi.com (rwcrmhc53.attbi.com [204.127.198.39]) by hub.freebsd.org (Postfix) with ESMTP id 46AFC37B405 for ; Thu, 31 Jan 2002 15:41:33 -0800 (PST) Received: from peter3.wemm.org ([12.232.27.13]) by rwcrmhc53.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020131234132.JZHI10199.rwcrmhc53.attbi.com@peter3.wemm.org> for ; Thu, 31 Jan 2002 23:41:32 +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 g0VNfWs57085 for ; Thu, 31 Jan 2002 15:41:32 -0800 (PST) (envelope-from peter@wemm.org) Received: from wemm.org (localhost [127.0.0.1]) by overcee.wemm.org (Postfix) with ESMTP id 18F293809; Thu, 31 Jan 2002 15:41:32 -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 15:41:32 -0800 From: Peter Wemm Message-Id: <20020131234132.18F293809@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. It's a 64 bit long/int bug on RELENG_4. > > 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. Not with the ps args cache stuff in 4.x and beyond. (assuming the bug is fixed). beast.freebsd.org (running 5.x) works as expected: peter@beast[3:36pm]~-103> mount | grep /proc peter@beast[3:36pm]~-104> ps -ax PID TT STAT TIME COMMAND ... 30 ?? IL 0:02.98 (nfsiod 3) 162 ?? Ss 0:38.91 /usr/sbin/syslogd -s 166 ?? Ss 8:21.62 ntpd -p /var/run/ntpd.pid 168 ?? Is 0:00.09 /usr/sbin/rpcbind 170 ?? Is 1:24.82 ypbind 176 ?? Ss 105:46.87 amd -p -a /.amd_mnt -l syslog /host /etc/amd.map /net 180 ?? Ss 2:27.50 rwhod 185 ?? Ss 1:17.82 /usr/sbin/cron ... Whereas on 4.x: peter@axp0[3:39pm]~-1# umount /proc peter@axp0[3:39pm]~-2# ps -ax -Upeter PID TT STAT TIME COMMAND 338 p0 IWs 0:00.00 (tcsh) 365 p1 IWs 0:00.00 (tcsh) 386 p2 IWs 0:00.00 (tcsh) 43639 p3 Ss 0:00.15 (tcsh) 1243 p4 IWs 0:00.00 (tcsh) peter@axp0[3:39pm]~-3# mount -t procfs /proc /proc peter@axp0[3:39pm]~-4# ps -ax -Upeter PID TT STAT TIME COMMAND 338 p0 IWs 0:00.00 -tcsh (tcsh) 365 p1 IWs 0:00.00 -tcsh (tcsh) 386 p2 IWs 0:00.00 -tcsh (tcsh) 43639 p3 Is 0:00.15 -tcsh (tcsh) 1243 p4 IWs 0:00.00 -tcsh (tcsh) /bin/ps is no longer setgid, so it cannot read /proc/*/mem for other users on alpha. That explains why you see that quirk. /proc/*/mem is associated with lockups from a long while back. We should not depend on it. 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