linux get current thread count and system threads limit

get current thread count

grep -s '^Threads' /proc/[0-9]*/status | awk '{ sum += $2; } END { print sum; }'

get the system thread limit

cat /proc/sys/kernel/threads-max

原文地址:https://www.cnblogs.com/long123king/p/3755144.html