From owner-freebsd-questions Fri Jan 24 5:32: 6 2003 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 29DB737B401 for ; Fri, 24 Jan 2003 05:32:05 -0800 (PST) Received: from ei.bzerk.org (ei.xs4all.nl [213.84.67.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 909D543F6D for ; Fri, 24 Jan 2003 05:31:59 -0800 (PST) (envelope-from fbsd-q@bzerk.org) Received: from ei.bzerk.org (BOFH@localhost [127.0.0.1]) by ei.bzerk.org (8.12.6/8.12.6) with ESMTP id h0ODXsJi059875; Fri, 24 Jan 2003 14:33:54 +0100 (CET) (envelope-from stable@ei.bzerk.org) Received: (from stable@localhost) by ei.bzerk.org (8.12.6/8.12.6/Submit) id h0ODXsHv059874; Fri, 24 Jan 2003 14:33:54 +0100 (CET) Date: Fri, 24 Jan 2003 14:33:54 +0100 From: Ruben de Groot To: Josh Brooks Cc: freebsd-questions@FreeBSD.ORG Subject: Re: differentiating apache children from parents ? Message-ID: <20030124133354.GA59812@ei.bzerk.org> References: <20030124052109.R64423-100000@mail.econolodgetulsa.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030124052109.R64423-100000@mail.econolodgetulsa.com> User-Agent: Mutt/1.4i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, Jan 24, 2003 at 05:22:00AM -0800, Josh Brooks typed: > > Hello, > > Is there any way to tell, simply from /proc info and/or ps output if a > certain httpd PID is a child or the parent ? Yes, use "ps xalw | grep httpd". In the third column you see the processes' PPID (Parent Proces ID). All except one will have the same PPID. The one proces with PPID=1 is the parent, the rest are its children. > If yes, is this method applicable on any OS (linux) ? AFAIK, on any Unix-like OS. Although the format of the ps output may differ. > > thanks. > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message