If I want to check if I got to the max of the nproc value should I do:
ps -ef | wc -l
ps -efL | wc -l
Does nproc in
limits.conf refers to number of processes or number of threads?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
On Linux it refers to the number of threads. From
setrlimit(2) (which is the system call used to set the limits):
The maximum number of processes (or, more precisely on Linux, threads) that can be created for the real user ID of the calling process. Upon encountering this limit,
fork(2) fails with the error
EAGAIN. This limit is not enforced for processes that have either the
ps -efL | wc -l would be more appropriate, however the limits in
limits.conf apply per login session (see
limits.conf(5) for details).