1833006 Members
3069 Online
110048 Solutions
New Discussion

Re: threads

 
Rusty Sapper
Frequent Advisor

threads

11.0 N-class
two parts.
our system is running an application that uses many multi-threaded processes.

a) How can I get a thread count for the system?

b) is there an easy way to see how many threads each process is using?

TIA
-Rusty
4 REPLIES 4
harry d brown jr
Honored Contributor

Re: threads


Do you have glance/measureware installed? If not, you can install a trial version, and then determine if that's what you need, then you can purchase it.

live free or die
harry
Live Free or Die
Rusty Sapper
Frequent Advisor

Re: threads

I've already tried the glance option. This server must have already used the trial version because when I load it and run it, it tells me the trial period has expired.

I was hoping there was another way besides glance.

-Rusty
Pavel Hampl
Occasional Advisor

Re: threads

Try to use this little trick to start your expired glance :

touch -t 200008080101 /var/adm/.ao
/opt/perf/bin/gpm &

It works at least with version C.02.40.00.


Ciao
oiram
Regular Advisor

Re: threads

Hi,

If you have configured q4 you can use this scripts to know the number of threads:

a)Process:
#!/usr/bin/sh
cp /stand/vmunix /tmp/vmunixq4
/usr/contrib/bin/q4pxdb /tmp/vmunixq4 2> /dev/null
/usr/contrib/bin/q4 /tmp/vmunixq4 /dev/mem <<-EOF
load struct proc from proc max nproc
keep p_pid==$1
print p_comm p_pid %d p_livethreads %d p_suspended_threads %d p_cached_threads_count %d
EOF

b)System:

#!/usr/bin/sh
cp /stand/vmunix /tmp/vmunixq4
/usr/contrib/bin/q4pxdb /tmp/vmunixq4
/usr/contrib/bin/q4 /tmp/vmunixq4 /dev/mem <<-EOF
load struct kthread from kthread max nkthread
keep kt_stat != 0
EOF

Best regards.