From owner-freebsd-current Sat Sep 13 10:58:40 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id KAA16821 for current-outgoing; Sat, 13 Sep 1997 10:58:40 -0700 (PDT) Received: from watcher.isl.net (ppp-48.isl.net [199.3.25.97]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id KAA16810 for ; Sat, 13 Sep 1997 10:58:35 -0700 (PDT) Received: (from ortmann@localhost) by watcher.isl.net (8.8.7/8.8.5) id MAA00426 for current@freebsd.org; Sat, 13 Sep 1997 12:39:48 -0500 (CDT) From: Daniel Ortmann Message-Id: <199709131739.MAA00426@watcher.isl.net> Subject: Does this idea have merit? To: current@freebsd.org Date: Sat, 13 Sep 1997 12:39:47 -0500 (CDT) X-Mailer: ELM [version 2.4ME+ PL17 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Since 'ps' is often run to find - all processes belonging to a user, - or all processes with a particular controlling tty, - or which instances of a binary are running (i.e. how many instances of 'spice' circuit simulations are running) ... would it make sense to enhance procfs to provide /proc/users/, /proc/users/binaries/, /proc/ttys/, and /proc/binaries/? Under these dirs we could perhaps have symlinks to the "real" processes. (Part of my motivation is to get the information from a scripting language such as perl ... without writing extensions.) On the other hand, maybe I'm missing something basic. Is there some other way to find out (without forking a /bin/ps): - the names and process info of all a user's processes? - the names and process info of all processes? - which processes are controlled by a given tty? - which processes have a given uid? This seems to be basic information that isn't conveniently available. Yes? No? -- Daniel Ortmann 507.288.7732 (h) ortmann@isl.net 2414 30 av NW, #D 507.253.6795 (w) ortmann@vnet.ibm.com Rochester, MN 55901 "PERL: The Swiss Army Chainsaw"