[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: htop vs ps



Camaleón wrote:
On Fri, 11 Feb 2011 09:25:31 -0600, Hugo Vanwoerkom wrote:

Camaleón wrote:
You can also make use of the switches of "htop" like "s" to strace the
misterious process :-?


I asked on the apcupsd mailing list and it is normal for apcupsd to show
that extra PID. Mysql does the same: htop shows 13 PID's and 'ps -Al'
shows 2!

But noone said 'why' that is so...

Well, according to "man ps" -section "notes"- this utility reads the processes listed under /proc so if there is no such a process in there, "ps" will not list it.

Question then is what kind of PID is listing htop :-?

(searching...)

Oh, okay :-)

Why does htop show lots of apache2 processes by ps aux doesn't?
http://serverfault.com/questions/24198/why-does-htop-show-lots-of-apache2-processes-by-ps-aux-doesnt


Except that the -H option of ps does *not* show the child PID's:

/sda7/hda10/backup.files/fromhd/home/hugo/gpc-qt4-002-1Fri Feb 11-11:47:39SDA6# ps -HAl|grep apcupsd
1 S     0  2570     1  0 100   0 - 11586 -      ?        00:00:24   apcupsd
/sda7/hda10/backup.files/fromhd/home/hugo/gpc-qt4-002-1Fri Feb 11-11:47:44SDA6# ps -HAl|grep mysql 0 S 0 1732 1 0 100 0 - 692 - ? 00:00:00 mysqld_safe
4 S   105  1771  1732  0 100   0 - 32081 -      ?        00:00:02     mysqld

Hugo


Reply to: