Skip to contentSkip to conversation

/proc/loadavg: total number of processes is wrong?

DISCUSSION Chuck Ebbert 3 participants 4 messages Mar 12, 2008

lore
Share & tools
lore
#0 lore raw
# cat /proc/loadavg ; ps ax | wc -l
0.00 0.00 0.00 1/192 3683
121

/proc/loadavg says 192 processes, but ps only sees 121.

#1 lore raw
Quoted 1 line · Chuck Ebbert

/proc/loadavg says 192 processes, but ps only sees 121.

'ps ax' does not include threads?

Signature · 1 line
Guillaume
#2 lore raw
In reply to Chuck Ebbert
Quoted 5 lines · Chuck Ebbert
# cat /proc/loadavg ; ps ax | wc -l
0.00 0.00 0.00 1/192 3683
121

/proc/loadavg says 192 processes, but ps only sees 121.

I guess you need to ps max, but it won't match exactly anyway.

regards,

Signature · 3 lines
Jiri Slaby
Faculty of Informatics, Masaryk University
Suse Labs
#3 lore raw
Quoted 1 line · Jiri Slaby

I guess you need to ps max, but it won't match exactly anyway.

With ps axh you can get it:

[g ~]$ cat /proc/loadavg|cat
0.45 0.35 0.24 3/192 12463
[g ~]$ ps Haxh|wc -l
192

Signature · 1 line
Guillaume