Thread (3 messages) flat view 3 messages, 3 authors, 2012-02-26

How to know number of user threads from /proc

From: emani murali <hidden>
Date: 2012-02-26 11:15:11

Hi,
 I'm running a multithreaded program in OpenMP on linux to study CPU
overloading. As the subject says, I need to know the number of threads this
program creates (assuming in this case, number of threads in this program
is same as the number of user threads) from the information kernel provides.

I'm looking something similar to run-queue length from "sar -q 0" that
gives me exact picture of number of user threads. From the implementation
of sar, I found that this information is fetched from /proc filesystem.

So is there anyway that /proc fs gives me the number of threads running in
the system, apart from /proc/cpuinfo that gives me a static information of
existing CPUs.
-- 
Thanks,
Kris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120226/31ce3c45/attachment.html 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help