[Orca-users] Re: Problem starting ORCA via SSH command

Blair Zajac blair at orcaware.com
Fri Apr 19 09:00:59 PDT 2002


Peter Radcliffe wrote:
> 
> Sean O'Neill <soneill at oneill.dhs.org> probably said:
> > At 12:09 PM 4/18/2002 -0700, Blair Zajac wrote:
> > >Try changing the line:
> > >pids=`/usr/ucb/ps auxww | $AWK '/orcallator.se/ && !/awk/ {print $2}'`
> > >to
> > >pids=`/usr/ucb/ps auxww | grep '[o]rcallator.se' | $AWK {print $2}'`
> > >and let me know if this stops the burps.
> > Let it be known the burps have stopped.
> 
> Script writing rule of thumb #346;
> If you are piping grep output into awk, you shouldn't be.
> 
> pids=`/usr/ucb/ps auxww | \
>                  $AWK '/[o]rcallator.se/ && $9 != "'$AWK'" {print $2}'`
> 
> If you are paranoid you can also add a;
>   && $1 == "root"
> to make sure you don't accidentally kill off a user's process that happens
> to include the name orcallator.se.

This will still run into the problems that Sean ran into with the
process with the extremely long list of command line options that nawk
complains, hence using grep to trim the list of processes down to the
list that contains orcallator.se that should not be that long.

Good point about the root, I'll add that.

Best,
Blair

-- 
Blair Zajac <blair at orcaware.com>
Web and OS performance plots - http://www.orcaware.com/orca/



More information about the Orca-users mailing list