From owner-freebsd-stable@FreeBSD.ORG Thu Oct 30 16:46:15 2008 Return-Path: Delivered-To: stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EF2421065670; Thu, 30 Oct 2008 16:46:15 +0000 (UTC) (envelope-from mh@kernel32.de) Received: from crivens.kernel32.de (crivens.asm68k.org [81.169.171.191]) by mx1.freebsd.org (Postfix) with ESMTP id AFEAB8FC12; Thu, 30 Oct 2008 16:46:15 +0000 (UTC) (envelope-from mh@kernel32.de) Received: from www.terrorteam.de (localhost [127.0.0.1]) by crivens.kernel32.de (Postfix) with ESMTP id 562BDB02E0; Thu, 30 Oct 2008 17:28:46 +0100 (CET) MIME-Version: 1.0 Date: Thu, 30 Oct 2008 17:28:46 +0100 From: Marian Hettwer To: Aragon Gouveia In-Reply-To: <20081030154512.GB80375@phat.za.net> References: <20081030154512.GB80375@phat.za.net> Message-ID: <7b873e39ac6eb91f7d2d3a1088207498@localhost> X-Sender: mh@kernel32.de User-Agent: RoundCube Webmail/0.1-rc2 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit Cc: stable@freebsd.org, Eduardo Meyer , questions@freebsd.org Subject: Re: Script-friendly (parseble) ps(1) output? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Oct 2008 16:46:16 -0000 Hi, On Thu, 30 Oct 2008 17:45:12 +0200, Aragon Gouveia wrote: > | By Eduardo Meyer > | [ 2008-10-30 00:04 +0200 ] >> Hello, >> >> I need to write a cgi script which will print the output from ps(1) in >> a table (html), so the average-operator can click on a KILL link and >> the cgi will send the selected signal. >> >> I need to add one ps information per column in a table (html), >> however, I found ps(1) output to be too hard to parse. There is no >> separator. I believed \t was the separator but its not. > > Another option might be to mount /proc and use that instead. See > procfs(5). > I wouldn't do that. IIRC procfs(5) is deprecated in FreeBSD. But I could be wrong... regards, Marian