Before the IDS 11.50 this kind of identification are very annoying and must be manually or with shell script...
In IDS 11.50 you can get the CPU utilization of each thread with command:
onstat -g cpu
Before this version, so far I know, you need to get a statical sample... something with this logical:
Code:
> act.out
i = 0
while i < 60
do
onstat -g act | awk '/tid/,/^ *$/ { print $1 } ' | egrep -v "tid|^ *$" >> act.out
i=$((i+1))
done
cat act.out | sort -n | uniq -c | sort -n
This code, are not exactly a shell, I just write the logic to get the thread where use more CPU.
The Idea above is repeat the commant "onstat -g act" 60 times and see who appear more time...
but, remember , you will get the thread number, you still need identificate the session id of this thread what can be do with this SQL:
Code:
select us_tid as tid , us_sid as sid , us_name as user from sysuserthreads