lkml.org 
[lkml]   [1996]   [Sep]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Gack, this shouldn't happen under a stable OS I think
Date
Chris Fearnley  <cjf@netaxs.com> wrote:
> root@syntropy # ps aux|grep 27231
> root 27231 0.0 2.1 828 324 p7 S 23:28 0:00 /usr/sbin/radiusd
> root@syntropy # ps aux|grep 27231
> root 27231 0.0 2.1 828 324 p7 S 23:28 0:00 /usr/sbin/radiusd
> root 27239 0.0 2.5 916 376 p7 S 23:28 0:00 grep 27231
> Why doesn't the grep process show up each time???

Race condition between ps and grep (which one of them is finished
faster and in which order does ps output come up). At least newer
versions of procps support a pid argument to ps, so you can do
ps -aux 27231.

If you really need grep on a ps listing, e.g. to find processes of a
certain program, the standard way to do this is grepping out the grep:
ps -aux | grep "httpd" | grep -v grep
Not beautiful; direct supprt for this would surely be a nice extension to ps.

olaf
--
___ Olaf.Titz@inka.de or @{stud,informatik}.uni-karlsruhe.de ____
__ o <URL:http://www.inka.de/~bigred/> <IRC:praetorius>
__/<_ >> Just as long as the wheels keep on turning round
_)>(_)______________ I will live for the groove 'til the sun goes down << ____

\
 
 \ /
  Last update: 2005-03-22 13:38    [W:0.071 / U:3.564 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site