用于收集CICS进程truss报告的脚本(包含cicsas进程和sarpcd进程)
通常我们在分析CICS进程占用高cpu的场景下,需要收集CICS进程的truss报告进一步分析,可以参照如下脚本去收集CICS进程truss报告(包含cicsas进程和sarpcd进程):
#!/bin/ksh
# collect running cicsas truss output
pids=`ps -ef | grep cicsas | grep -v grep | awk ‘{print $2}’`
for pid in $pids
do
truss -a -d -f -rall -wall -o /tmp/cicsas.$pid.truss -p $pid &
done
# collect sarpcd process truss output
pid=`ps -ef | grep sarpcd | grep -v grep | awk ‘{print $2}’`
truss -a -d -f -rall -wall -o /tmp/sarpcd.$pid.truss -p $pid &
# Add truss collection duration
sleep 200
# stop the truss command after the specified sleep interval
pids=`ps -ef | grep truss | grep -v grep | grep -v truss.sh | awk ‘{print $2}’`
for pid in $pids
do
kill -9 $pid
done
以下文章点击率最高
Loading…