How does one find out the true number of processes that is running on your system? A number of articles mention using ps
in order to count the number of processes. But recently I looked at cat /proc/stat
, and it outputted:
cpu 972 0 1894 189609 236 26 490 0 0 0
cpu0 972 0 1894 189609 236 26 490 0 0 0
intr 101595 157 10 0 0 0 0 0 0 3 0 0 0 136 0 0 0 1406 0 0 14936 934 19133 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ctxt 244344
btime 1405754990
processes 3912
procs_running 3
procs_blocked 0
softirq 122778 0 48263 439 15599 19037 0 1 0 7405 32034
It shows the number of processes as 3912. Using something like ps -A --no-headers | wc -l
only shows 173 processes.
Why does /proc/stat
show so many more processes (an increase of 3739 processes)? Who is giving the right number?