Workload and Resource Management
Showing results for 
Search instead for 
Do you mean 

getting number of threads

Occasional Contributor

getting number of threads

Hi,
Is there any tool (beside glance or measureware) that tells me, how many threads are activbe in each process?
6 REPLIES
Honored Contributor Honored Contributor

Re: getting number of threads

Depends on the o/s your on...

Prior to 10.3 you could only get this via Glance or MWA.

In 11.0 you can get this information from kernel parms
nkthread , max_thread_proc

/rcw
Occasional Contributor

Re: getting number of threads

I'm using 11.0.

The kernel parameters only tell me the maximum number of threads for each process (max_thread_proc) or for the whole system (nkthread). What I want to know is the number of threads actually running on the machine or within a single process.

Re: getting number of threads

Hi:
you could attach a debugger and list the live threads (dde prompt> list threads)

Kiran
Honored Contributor Honored Contributor

Re: getting number of threads

You can use the pstat system call to get this info.

small demo program attached.
Occasional Contributor

Re: getting number of threads

Hello Andy Monks
The pstat hint is interesting, but I'm afraid, you forgot to attach the example.
Honored Contributor Honored Contributor

Re: getting number of threads

Hmm, sure I did. Lets try it again.