git://git.onelab.eu
/
monitor.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Setting tag Monitor-3.0-34
[monitor.git]
/
tools
/
kill.cmd.sh
1
#!/bin/bash
2
3
if [ -z "$1" ] ; then
4
echo "getting pid list"
5
l=`ps ax | grep automate | grep -v grep | awk '{print $1}'`
6
else
7
l=$1
8
fi
9
10
for pid in $l ; do
11
pstree -p -a -A $pid | awk -F ',' '{print $2}' | \
12
awk '{print $1}' | tr ')' ' ' | xargs kill || :
13
done