Operating System - HP-UX
1830865 Members
2468 Online
110017 Solutions
New Discussion

THREAD IDENTIFICATION IN GLANCE

 
Carlo Henrico_1
Regular Advisor

THREAD IDENTIFICATION IN GLANCE

We have a multi-threaded application running which has +- 10 threads. Is there a way to identify the individual threads in Glance? Should changes be made to the code?

At this stage all the threads just look like duplicates of the main app.
Live fast, die young - enjoy a good looking corpse!
6 REPLIES 6
Mark Mitchell
Trusted Contributor

Re: THREAD IDENTIFICATION IN GLANCE

I have worked on that one before with no luck from Hp. I made a mod to my system so that if I do a ps -ef |grep XXX the output gives me more information from my database processes.
Andy Monks
Honored Contributor

Re: THREAD IDENTIFICATION IN GLANCE

What sort of information are you after? a thread is a duplicate really. only the cpu usage is different between threads (memory etc all the same).

The system calls will be different, but glance only reports that at the process level.
Jim Welch
Respected Contributor

Re: THREAD IDENTIFICATION IN GLANCE

I don't understand the question. Each thread has a thread id (THREAD_THREAD_ID) and you could use a process loop with a thread loop inside it to print thread metrics assuming you want to capture some info on threads inside an adviser script. (This works on Glance C.02.60 on HP-UX 11.0 on my system.) If you have HP-UX 10.20 and pthreads you are probably out of luck.
Any sufficiently advanced technology is indistinguishable from Magic - Arthur C. Clarke
Carlo Henrico_1
Regular Advisor

Re: THREAD IDENTIFICATION IN GLANCE

Jim

I am using HP 11.0 with Glance C.02.40. The threads are all part of the main application but each with a unique 'task'. One could probably actually write seperate apps. The thread_thread_id is selected and they have different values but I cannot ascertain from that which one has what 'task'.
Live fast, die young - enjoy a good looking corpse!
Andy Monks
Honored Contributor

Re: THREAD IDENTIFICATION IN GLANCE

glance has no way of knowing what each thread does from the application point of view. It just shows resource usage. It sounds like your using threads just cos you can and that using processes would actually be just as good for you (and would allow glance to report the info you want as each process would have a different name which you could change to be the name of the task)
Mark Mitchell
Trusted Contributor

Re: THREAD IDENTIFICATION IN GLANCE

Its true that Glance won't go deep enought to show you what task is running. What I meant above is that on my system I made a changed that when the process is fired up it puts information such as the report name in the process description. After I do a ps -ef|grep (process id Number) I can tell what it is. Not the ideal fix but it works. In glance you can hit shift+1 and pop out look it up, type exit and then be back in glance.