-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathpreabort.sh
executable file
·46 lines (42 loc) · 1.06 KB
/
preabort.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/bash
dumpstacks()
{
local processName=$1
local binPath=$( find /opt/HPCCSystems/ -iname ${processName} -type f 2>&1 )
if [[ -n "$binPath" ]]
then
pids=$(pidof ${processName})
if [[ -n $pids ]]
then
for p in $(pidof ${processName})
do
echo "${processName}[${p}] stacks:"
sudo gdb --batch --quiet -ex "set interactive-mode off" -ex "thread apply all bt" -ex "quit" ${binPath} ${p}
done
else
echo "No pid found for ${processName}"
fi
else
echo "${processName} binary not found."
fi
echo '==============='
echo
}
echo 'List of processes:'
ps aux
echo '==============='
echo
dumpstacks daserver
dumpstacks esp
dumpstacks ecl
dumpstacks eclcc
daliadminPath=$( find /opt/HPCCSystems/ -iname 'daliadmin' -type f 2>&1 )
if [[ -n "$daliadminPath" ]]
then
echo 'job queues meta data:'
eval ${daliadminPath} . export /JobQueues jq.xml
cat jq.xml
else
echo "daliadmin not found"
fi
echo '***************'