I am running a webserver with apache2 and ubuntu. Using ps I can see only a few apache processes running:
ps aux | grep apache
However if I htop, I can see loads of apache2 processes running. About 2 dozen. Why the difference?
|
I am running a webserver with apache2 and ubuntu. Using
However if I
| |||
feedback
|
|
HTop is showing all the processes and their threads whereas ps aux only shows the processes. Press F5 in htop to create a hierarchal view of the processes and their threats. It will make more sense. | |||
|
feedback
|
|
sweimann's answer is correct. Additionally you can make Apparently the same key will also toggle off such behaviour in | |||
|
feedback
|
|
I don't know htop, but maybe it displays threads as separate processes and you have configured apache with a multithreaded worker? | |||
|
feedback
|
|
In htop, you can disable this behavior by pressing F2, then go to "Display options", then mark "Hide userland threads". Optionally you may find "Hide kernel threads" useful too. | |||
|
feedback
|
|
To highlight the difference between processes and threads in htop:
| |||
|
feedback
|