[was@dmgr ita-scripts]$ vi java_analys.sh
PID=$1 ; ps -mp $PID -o THREAD,tid,time | awk -F " " '{print $2" "$8}' | grep -v CPU | grep -v "-" | sort -nr | head -1 | awk -F " " '{print $2}' | xargs pri
ntf "%x " | while read line ; do TID=$line ;echo $TID ; jstack $PID | grep $TID -A 30 ; done
PID=$1 ; ps -mp $PID -o THREAD,tid,time | awk -F " " '{print $2" "$8}' | grep -v CPU | grep -v "-" | sort -nr | head -1 | awk -F " " '{print $2}' | xargs pri
ntf "%x " | while read line ; do TID=$line ;echo $TID ; jstack $PID | grep $TID -A 30 ; done