Script-friendly (parseble) ps(1) output?

Marian Hettwer mh at
Thu Oct 30 09:46:16 PDT 2008


On Thu, 30 Oct 2008 17:45:12 +0200, Aragon Gouveia <aragon at>
> | By Eduardo Meyer <dudu.meyer at>
> |                                          [ 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...


More information about the freebsd-stable mailing list