Re: getting number of threads (37 Views)
Reply
Occasional Contributor
Ullrich Rieger
Posts: 6
Registered: ‎10-03-2000
Message 1 of 7 (37 Views)

getting number of threads

Hi,
Is there any tool (beside glance or measureware) that tells me, how many threads are activbe in each process?
Please use plain text.
Honored Contributor
Rita C Workman
Posts: 3,791
Registered: ‎08-03-2000
Message 2 of 7 (37 Views)

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
Please use plain text.
Occasional Contributor
Ullrich Rieger
Posts: 6
Registered: ‎10-03-2000
Message 3 of 7 (37 Views)

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.
Please use plain text.
Advisor
Kiran N. Mehta
Posts: 25
Registered: ‎06-20-2000
Message 4 of 7 (37 Views)

Re: getting number of threads

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

Kiran
Please use plain text.
Honored Contributor
Andy Monks
Posts: 462
Registered: ‎05-31-1999
Message 5 of 7 (37 Views)

Re: getting number of threads

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

small demo program attached.
Please use plain text.
Occasional Contributor
Ullrich Rieger
Posts: 6
Registered: ‎10-03-2000
Message 6 of 7 (37 Views)

Re: getting number of threads

Hello Andy Monks
The pstat hint is interesting, but I'm afraid, you forgot to attach the example.
Please use plain text.
Honored Contributor
Andy Monks
Posts: 462
Registered: ‎05-31-1999
Message 7 of 7 (37 Views)

Re: getting number of threads

Hmm, sure I did. Lets try it again.
Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation