From owner-freebsd-stable@FreeBSD.ORG Thu Oct 30 16:14:20 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 7BEC91065672; Thu, 30 Oct 2008 16:14:20 +0000 (UTC) (envelope-from aragon@phat.za.net) Received: from mail.geek.sh (decoder.geek.sh [196.36.198.81]) by mx1.freebsd.org (Postfix) with ESMTP id 1AD7D8FC2A; Thu, 30 Oct 2008 16:14:20 +0000 (UTC) (envelope-from aragon@phat.za.net) Received: by mail.geek.sh (Postfix, from userid 1000) id 642A224D22; Thu, 30 Oct 2008 17:45:12 +0200 (SAST) Date: Thu, 30 Oct 2008 17:45:12 +0200 From: Aragon Gouveia To: Eduardo Meyer Message-ID: <20081030154512.GB80375@phat.za.net> Mail-Followup-To: Eduardo Meyer , stable@freebsd.org, questions@freebsd.org References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4i X-Operating-System: FreeBSD 4.10-RELEASE-p2 i386 Cc: stable@freebsd.org, 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:14:20 -0000 | 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). Regards, Aragon