Interpreting /proc/loadavg
Why am I seeing a different number of processes in /proc/loadavg than are reported by ps?
$ hostname -s;cat /proc/loadavg; ps -e|wc -l
bandb6
2.01 2.08 2.31 2/1204 4136
871
$ hostname -s;cat /proc/loadavg; ps -e|wc -l
fargo
0.00 0.00 0.00 1/486 4601
193
I've checked a few different machines and they all show a similar discrepancy. It might have to do with threads v. processes but I need to be able to reconcile them. I'd like to monitor the number of processes on a system and it seems like using the loadavg value would be more efficient.