which thread is consuming much time ?

Hi

How do i check which thread is consuming much time ?

In my process it is tacking much %CPU so i want to check whick thread tacking much time?

Any suggestion highly appriciated.

I am using HP-UX B.11.31 U ia64

Regards,
Ashok

You could use the glance tool.

I do not have in my system.
Can i down load it from any where?

I am not getting any useful links.
Thanks,

You can install a 60 day trial version of Glance from your application CDs.

you can use "top"

I don't know about looking up individual "threads" but if you don't have glance, you can run top and locate the process id <pid> of whatever is taking your cpu time:

(top output)
CPU TTY PID USERNAME PRI NI SIZE RES STATE TIME %WCPU %CPU COMMAND
2 ? 8076 www 152 20 117M 63900K run 0:07 0.55 0.55 httpd

ps -ef |grep <pid> - which should give you an output.

root 8076 1975 0 Jan 13 ? 0:00 /usr/sbin/<process name>

You can then run ps -ef |grep <ppid> <--- parent process id

That should tell you all of the processes involved with the one item taking your cpu.