From owner-cvs-bin Mon Dec 25 19:39:02 1995 Return-Path: owner-cvs-bin Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id TAA14996 for cvs-bin-outgoing; Mon, 25 Dec 1995 19:39:02 -0800 (PST) Received: (from peter@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id TAA14986 Mon, 25 Dec 1995 19:38:59 -0800 (PST) Date: Mon, 25 Dec 1995 19:38:59 -0800 (PST) From: Peter Wemm Message-Id: <199512260338.TAA14986@freefall.freebsd.org> To: cvs-bin, CVS-committers Subject: cvs commit: src/bin/ps ps.1 ps.c Sender: owner-cvs-bin@FreeBSD.ORG Precedence: bulk peter 95/12/25 19:38:58 Modified: bin/ps ps.1 ps.c Log: Implement a new option to ps.. `-U username'. This allows you to list the processes belonging to a particular user without having to use `-u' and grepping for the username. Basically you can now get a short `ps -x' like list (with more space for the command) for other users. Revision Changes Path 1.5 +5 -1 src/bin/ps/ps.1 1.10 +14 -3 src/bin/ps/ps.c From owner-cvs-bin Sat Dec 30 05:52:22 1995 Return-Path: owner-cvs-bin Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id FAA18675 for cvs-bin-outgoing; Sat, 30 Dec 1995 05:52:22 -0800 (PST) Received: (from joerg@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id FAA18625 Sat, 30 Dec 1995 05:52:06 -0800 (PST) Date: Sat, 30 Dec 1995 05:52:06 -0800 (PST) From: Joerg Wunsch Message-Id: <199512301352.FAA18625@freefall.freebsd.org> To: cvs-bin, CVS-committers Subject: cvs commit: src/bin/ps ps.1 Sender: owner-cvs-bin@FreeBSD.ORG Precedence: bulk joerg 95/12/30 05:52:04 Modified: bin/ps ps.1 Log: Small man page tweaks: . mention the need for procfs . make it clear that default sorting is first by ctty, then by PID Submitted by: schweikh@ito.uni-stuttgart.de (Jens Schweikhardt) Revision Changes Path 1.6 +12 -2 src/bin/ps/ps.1 From owner-cvs-bin Sat Dec 30 05:53:24 1995 Return-Path: owner-cvs-bin Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id FAA18759 for cvs-bin-outgoing; Sat, 30 Dec 1995 05:53:24 -0800 (PST) Received: (from joerg@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id FAA18745 Sat, 30 Dec 1995 05:53:19 -0800 (PST) Date: Sat, 30 Dec 1995 05:53:19 -0800 (PST) From: Joerg Wunsch Message-Id: <199512301353.FAA18745@freefall.freebsd.org> To: cvs-bin, CVS-committers Subject: cvs commit: src/bin/ps ps.1 Sender: owner-cvs-bin@FreeBSD.ORG Precedence: bulk joerg 95/12/30 05:53:18 Branch: bin/ps RELENG_2_1_0 Modified: bin/ps ps.1 Log: Update man page from HEAD. Revision Changes Path 1.4.6.1 +12 -2 src/bin/ps/ps.1 From owner-cvs-bin Sat Dec 30 06:12:19 1995 Return-Path: owner-cvs-bin Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id GAA19469 for cvs-bin-outgoing; Sat, 30 Dec 1995 06:12:19 -0800 (PST) Received: from jhome.DIALix.COM (root@jhome.DIALix.COM [192.203.228.69]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id GAA19464 Sat, 30 Dec 1995 06:12:14 -0800 (PST) Received: (from peter@localhost) by jhome.DIALix.COM (8.7.3/8.7.3) id WAA06374; Sat, 30 Dec 1995 22:12:10 +0800 (WST) Date: Sat, 30 Dec 1995 22:12:09 +0800 (WST) From: Peter Wemm To: Joerg Wunsch cc: cvs-bin@freefall.freebsd.org, CVS-committers@freefall.freebsd.org Subject: Re: cvs commit: src/bin/ps ps.1 In-Reply-To: <199512301352.FAA18625@freefall.freebsd.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-bin@FreeBSD.ORG Precedence: bulk On Sat, 30 Dec 1995, Joerg Wunsch wrote: > joerg 95/12/30 05:52:04 > > Modified: bin/ps ps.1 > Log: > Small man page tweaks: > > . mention the need for procfs > . make it clear that default sorting is first by ctty, then by PID Hmm. this was a suprise to me... I thought procfs was optional, but it doesn't look like, since libkvm reads the /proc//mem files. BTW, libkvm should only try to grab /proc//mem from if ISALIVE(kd) is true.. Otherwise doing a ps on a dead kernel is going to look pretty interesting.. :-) Also, it sounds like it's time to put a warning in GENERIC and LINT saying that procfs is needed for 'ps' and 'gdb' to work completely. (gdb uses it to attach to processes) -Peter From owner-cvs-bin Sat Dec 30 06:19:32 1995 Return-Path: owner-cvs-bin Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id GAA19575 for cvs-bin-outgoing; Sat, 30 Dec 1995 06:19:32 -0800 (PST) Received: from irz301.inf.tu-dresden.de (irz301.inf.tu-dresden.de [141.76.1.11]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id GAA19570 Sat, 30 Dec 1995 06:19:25 -0800 (PST) Received: from sax.sax.de by irz301.inf.tu-dresden.de (8.6.12/8.6.12-s1) with ESMTP id PAA21249; Sat, 30 Dec 1995 15:19:23 +0100 Received: by sax.sax.de (8.6.11/8.6.12-s1) with UUCP id PAA04603; Sat, 30 Dec 1995 15:19:22 +0100 Received: (from j@localhost) by uriah.heep.sax.de (8.7.3/8.6.9) id PAA00991; Sat, 30 Dec 1995 15:18:21 +0100 (MET) From: J Wunsch Message-Id: <199512301418.PAA00991@uriah.heep.sax.de> Subject: Re: cvs commit: src/bin/ps ps.1 To: peter@jhome.DIALix.COM (Peter Wemm) Date: Sat, 30 Dec 1995 15:18:20 +0100 (MET) Cc: joerg@freefall.freebsd.org, cvs-bin@freefall.freebsd.org, CVS-committers@freefall.freebsd.org Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) In-Reply-To: from "Peter Wemm" at Dec 30, 95 10:12:09 pm X-Phone: +49-351-2012 669 X-Mailer: ELM [version 2.4 PL23] MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-cvs-bin@FreeBSD.ORG Precedence: bulk As Peter Wemm wrote: > > > . mention the need for procfs > > Hmm. this was a suprise to me... I thought procfs was optional, but it > doesn't look like, since libkvm reads the /proc//mem files. It's more optional than device npx. :) > Also, it sounds like it's time to put a warning in GENERIC and LINT > saying that procfs is needed for 'ps' and 'gdb' to work completely. > (gdb uses it to attach to processes) No need to force it into the kernel config. I'm almost always modloading it. It must only be ensured to be in the default fstab file. -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-) From owner-cvs-bin Sat Dec 30 07:20:14 1995 Return-Path: owner-cvs-bin Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id HAA21291 for cvs-bin-outgoing; Sat, 30 Dec 1995 07:20:14 -0800 (PST) Received: from ibp.ibp.fr (ibp.ibp.fr [132.227.60.30]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id HAA21275 Sat, 30 Dec 1995 07:20:04 -0800 (PST) Received: from blaise.ibp.fr (blaise.ibp.fr [132.227.60.1]) by ibp.ibp.fr (8.6.12/jtpda-5.0) with ESMTP id QAA22792 ; Sat, 30 Dec 1995 16:20:02 +0100 Received: from (uucp@localhost) by blaise.ibp.fr (8.6.12/jtpda-5.0) with UUCP id QAA17572 ; Sat, 30 Dec 1995 16:20:02 +0100 Received: (from roberto@localhost) by keltia.freenix.fr (8.7.3/keltia-uucp-2.7) id PAA16695; Sat, 30 Dec 1995 15:50:43 +0100 (MET) From: Ollivier Robert Message-Id: <199512301450.PAA16695@keltia.freenix.fr> Subject: Re: cvs commit: src/bin/ps ps.1 To: peter@jhome.dialix.com (Peter Wemm) Date: Sat, 30 Dec 1995 15:50:42 +0100 (MET) Cc: joerg@freefall.freebsd.org, cvs-bin@freefall.freebsd.org, CVS-committers@freefall.freebsd.org In-Reply-To: from "Peter Wemm" at Dec 30, 95 10:12:09 pm X-Operating-System: FreeBSD 2.2-CURRENT ctm#1489 X-Mailer: ELM [version 2.4 PL24 ME8b] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-cvs-bin@FreeBSD.ORG Precedence: bulk It seems that Peter Wemm said: > Hmm. this was a suprise to me... I thought procfs was optional, but it > doesn't look like, since libkvm reads the /proc//mem files. On the same subject, is it expected to all the "files" in /proc/ to be of size 0 ? total 0 --w------- 1 root staff 0 Dec 30 15:50 ctl ---------- 1 root staff 0 Dec 30 15:50 fpregs ----r----- 1 root kmem 0 Dec 30 15:50 mem --w------- 1 root staff 0 Dec 30 15:50 note --w------- 1 root staff 0 Dec 30 15:50 notepg ---------- 1 root staff 0 Dec 30 15:50 regs -r--r--r-- 1 root staff 0 Dec 30 15:50 status I'd expect mem to be the size of the binary in the VM system... -- Ollivier ROBERT -=- The daemon is FREE! -=- roberto@keltia.frmug.fr.net FreeBSD keltia.freenix.fr 2.2-CURRENT #9: Mon Dec 25 22:55:52 MET 1995 From owner-cvs-bin Sat Dec 30 08:59:27 1995 Return-Path: owner-cvs-bin Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id IAA24763 for cvs-bin-outgoing; Sat, 30 Dec 1995 08:59:27 -0800 (PST) Received: from Root.COM (implode.Root.COM [198.145.90.17]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id IAA24758 Sat, 30 Dec 1995 08:59:23 -0800 (PST) Received: from corbin.Root.COM (corbin [198.145.90.50]) by Root.COM (8.6.12/8.6.5) with ESMTP id IAA15614; Sat, 30 Dec 1995 08:59:22 -0800 Received: from localhost (localhost [127.0.0.1]) by corbin.Root.COM (8.7.3/8.6.5) with SMTP id IAA03212; Sat, 30 Dec 1995 08:59:28 -0800 (PST) Message-Id: <199512301659.IAA03212@corbin.Root.COM> To: Peter Wemm cc: Joerg Wunsch , cvs-bin@freefall.freebsd.org, CVS-committers@freefall.freebsd.org Subject: Re: cvs commit: src/bin/ps ps.1 In-reply-to: Your message of "Sat, 30 Dec 95 22:12:09 +0800." From: David Greenman Reply-To: davidg@Root.COM Date: Sat, 30 Dec 1995 08:59:27 -0800 Sender: owner-cvs-bin@FreeBSD.ORG Precedence: bulk >On Sat, 30 Dec 1995, Joerg Wunsch wrote: >> joerg 95/12/30 05:52:04 >> >> Modified: bin/ps ps.1 >> Log: >> Small man page tweaks: >> >> . mention the need for procfs >> . make it clear that default sorting is first by ctty, then by PID > >Hmm. this was a suprise to me... I thought procfs was optional, but it >doesn't look like, since libkvm reads the /proc//mem files. > >BTW, libkvm should only try to grab /proc//mem from if ISALIVE(kd) is >true.. Otherwise doing a ps on a dead kernel is going to look pretty >interesting.. :-) We should probably remove support for "dead kernels". It has never worked in 2.x anyway and I'm fundamentally opposed to hacking in cruft to drudge around in the kernel's crash dump and attempt to parse paging data structures. That's what debuggers are for. That goes against the principal of why we're using procfs in the first place. -DG From owner-cvs-bin Sat Dec 30 09:12:56 1995 Return-Path: owner-cvs-bin Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id JAA25493 for cvs-bin-outgoing; Sat, 30 Dec 1995 09:12:56 -0800 (PST) Received: from Root.COM (implode.Root.COM [198.145.90.17]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id JAA25485 Sat, 30 Dec 1995 09:12:51 -0800 (PST) Received: from corbin.Root.COM (corbin [198.145.90.50]) by Root.COM (8.6.12/8.6.5) with ESMTP id JAA15663; Sat, 30 Dec 1995 09:12:43 -0800 Received: from localhost (localhost [127.0.0.1]) by corbin.Root.COM (8.7.3/8.6.5) with SMTP id JAA03238; Sat, 30 Dec 1995 09:12:49 -0800 (PST) Message-Id: <199512301712.JAA03238@corbin.Root.COM> To: Ollivier Robert cc: peter@jhome.dialix.com (Peter Wemm), joerg@freefall.freebsd.org, cvs-bin@freefall.freebsd.org, CVS-committers@freefall.freebsd.org Subject: Re: cvs commit: src/bin/ps ps.1 In-reply-to: Your message of "Sat, 30 Dec 95 15:50:42 +0100." <199512301450.PAA16695@keltia.freenix.fr> From: David Greenman Reply-To: davidg@Root.COM Date: Sat, 30 Dec 1995 09:12:48 -0800 Sender: owner-cvs-bin@FreeBSD.ORG Precedence: bulk >It seems that Peter Wemm said: >> Hmm. this was a suprise to me... I thought procfs was optional, but it >> doesn't look like, since libkvm reads the /proc//mem files. > >On the same subject, is it expected to all the "files" in /proc/ to be >of size 0 ? > >total 0 >--w------- 1 root staff 0 Dec 30 15:50 ctl >---------- 1 root staff 0 Dec 30 15:50 fpregs >----r----- 1 root kmem 0 Dec 30 15:50 mem >--w------- 1 root staff 0 Dec 30 15:50 note >--w------- 1 root staff 0 Dec 30 15:50 notepg >---------- 1 root staff 0 Dec 30 15:50 regs >-r--r--r-- 1 root staff 0 Dec 30 15:50 status > >I'd expect mem to be the size of the binary in the VM system... Yes, it's expected to be zero. "mem" is the process's virtual memory and thus it is sparse. It would have to be nearly 4GB before the number would be accurate. Our kernel allows seeking/reading the file even though it's beyond the EOF. If we change the size to be non-zero, then ordinary things like grep will read the contents...this can be BAD, especially when they are part of a "find / | xargs grep foo". :-) It also prevents people from mmaping the file contents, and this is desired for various reasons (which is the reason that the rest of the files are 0 length). The main reason mmap of procfs files is undesired is that they aren't real files and the data changes dynamically. You don't want to cache that and you don't want to get a fault for _every_ access. There's no way to win, so we don't allow it. -DG From owner-cvs-bin Sat Dec 30 10:15:56 1995 Return-Path: owner-cvs-bin Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id KAA27876 for cvs-bin-outgoing; Sat, 30 Dec 1995 10:15:56 -0800 (PST) Received: (from joerg@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id KAA27816 Sat, 30 Dec 1995 10:15:35 -0800 (PST) Date: Sat, 30 Dec 1995 10:15:35 -0800 (PST) From: Joerg Wunsch Message-Id: <199512301815.KAA27816@freefall.freebsd.org> To: cvs-bin, CVS-committers Subject: cvs commit: src/bin/ls print.c Sender: owner-cvs-bin@FreeBSD.ORG Precedence: bulk joerg 95/12/30 10:15:33 Modified: bin/ls print.c Log: Print dev minor #'s > 255 in hex. Reviewed by: jkh, kuku, phk Revision Changes Path 1.7 +7 -3 src/bin/ls/print.c