On Fri, Nov 14, 2003 at 09:06:38AM -0600, Skip Montanaro wrote:
> On a related note, restarting the scgi server is a little bit of a pain. Is
> this the best I can do
>
> ps auxww | egrep 'python main' | egrep -v egrep \
> | awk '{print $2}' | sort -n | xargs kill -1
>
> (Thank goodness for bash command recall!)
From my .shellrc:
psg() { ps auxw | egrep -i ${1+"$@"} | grep -v grep; }
psgw() { ps auxwww | egrep -i ${1+"$@"} | grep -v grep; }
pidOf() { psgw ${1+"$@"} | awk '{print $2}'; }
KillAll() { pidOf "$1" | xargs kill "$2"; }
Oleg.
--
Oleg Broytmann http://phd.pp.ru/ phd@phd.pp.ru
Programmers don't die, they just GOSUB without RETURN.