Bugtraq mailing list archives

Re: ps under FreeBSD


From: Torbjorn Kristoffersen <sgt () digiweb no>
Date: Mon, 20 May 2002 04:29:37 +0200

On Sat, May 18, 2002 at 08:40:38PM +0200, Jakub Filonik wrote:
Hi,
I was playing with ps on FreeBSD with kern.ps_showallprocs=0 and I was
surprised when I have seen that I may see info about running process, if I
know it's ID

I think it may be seen as bug. What do You think?


This is a known problem, see Problem Report kern/30608 at
http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/30608
This issue is fixed in Current, but not in FreeBSD 4.5-STABLE, etc.

By the way, I was thinking of the best way to view all the "hidden" processes at
the same time. Something similar to ''for i in $(jot 99999); do ps -u$i....''
is extremely slow and sometimes hangs my system.

Included is therefore a patch for ps.c in /usr/src/bin/ps to view all the
"hidden" processes (just a braindead hack, really..). Any normal user can
compile his own hacked 'ps'.

You could always traverse /proc instead, but cmdline and status give too little
info.

-- 
Torbjorn Kristoffersen <sgt () digiweb no>

"Real programmers don't comment their code.  It was hard to write, it
should be hard to understand."

Attachment: ps.c.diff
Description:


Current thread: