Re: How to count the number of threads



This is possible in your own process.

My question was for the whole system. I have got a system with the
following parameters:
ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
max locked memory (kbytes, -l) 4
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
stack size (kbytes, -s) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) 7168
virtual memory (kbytes, -v) unlimited

cat /proc/sys/kernel/threads-max
14336

Sometimes, i can not do anymore bash command (ps, ls top or whatever).
The number of processes are:
ps -aux|wc -l
137

It is far from 7168.
So, I assume it is due to the number of threads. But how can I count
the whole number of threads on my system?

Regards,

Sylvain

.



Relevant Pages