mohakevin

Well-Known Member
Jan 19, 2005
84
0
156
I have done /scripts/upcp --force in my servers and Cpanel have updated the Mysql version to Mysql 4.1.19, all webspaces work correctly, but i have checked the server status and :

- when i do : ps -ef | grep mysqld, the result is :

ps -ef |grep mysqld
root 4484 1 0 06:00 ? 00:00:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/niobe.sync-intertainment.com.pid
mysql 4505 4484 0 06:00 ? 00:04:42 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/niobe.sync-intertainment.com.pid --skip-locking


and when i do: top


PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME CPU COMMAND
24799 root 23 8 29120 23M 2160 S N 0.0 2.3 0:30 1 spamd
4505 mysql 21 6 30648 21M 3960 S N 0.0 2.1 0:01 1 mysqld
4506 mysql 25 0 30648 21M 3960 S 0.0 2.1 0:00 0 mysqld
4507 mysql 15 0 30648 21M 3960 S 0.0 2.1 0:00 1 mysqld
4508 mysql 15 0 30648 21M 3960 S 0.0 2.1 0:00 1 mysqld
4509 mysql 15 0 30648 21M 3960 S 0.0 2.1 0:00 1 mysqld
4510 mysql 15 0 30648 21M 3960 S 0.0 2.1 0:07 0 mysqld
4511 mysql 15 0 30648 21M 3960 S 0.0 2.1 0:04 0 mysqld
4512 mysql 15 0 30648 21M 3960 S 0.0 2.1 0:00 0 mysqld
4513 mysql 15 0 30648 21M 3960 S 0.0 2.1 0:05 1 mysqld
16185 mysql 25 6 30648 21M 3960 S N 0.0 2.1 0:00 0 mysqld

There are different number of process when i execute top and when i execute ps.
Does anybody know why is it happening ?

It´s normal or not ?

Regards.
 

mohakevin

Well-Known Member
Jan 19, 2005
84
0
156
Ok, i think this... but this childs must appear when i do a `ps -ef` or not ? and why not ? In previous version, the child process always appear when i do a ps . I always think that yes...

Regards y thanks for the answer chirpy.
 
Last edited:

jrehmer

Well-Known Member
Apr 10, 2003
287
0
166
Denver, CO
mohakevin said:
Ok, i think this... but this childs must appear when i do a `ps -ef` or not ? and why not ? In previous version, the child process always appear when i do a ps . I always think that yes...

Regards y thanks for the answer chirpy.

I was wondering the same thing. When I ran MySQL 3 the output of a ps -ef would show all the threads, however after upgrading to 4.0+ (4.1.19 now) it only lists the parent process. Is there a different parameter I need to use with ps to see the threads?
 

mohakevin

Well-Known Member
Jan 19, 2005
84
0
156
The problem is on a "Red Hat Enterprise Linux ES release 3 (Taroon Update 7)"
Besides, I do the same commands in other server "Fedora Core release 1 (Yarrow)" and the problem is different (is opposite).

In fedora when i do a `ps -ef | grep mysql | wc -l`
The result is 30

And when i do a `top`


6297 mysql 13 6 86444 68M 54200 S N 42.1 13.7 120:49 0 mysqld

Only a mysqld process i can see.

can it be the way of control the process different in each distribution ?

Regards
 

chirpy

Well-Known Member
Verifed Vendor
Jun 15, 2002
13,462
25
473
Go on, have a guess
jrehmer said:
I was wondering the same thing. When I ran MySQL 3 the output of a ps -ef would show all the threads, however after upgrading to 4.0+ (4.1.19 now) it only lists the parent process. Is there a different parameter I need to use with ps to see the threads?
It's different for various linux distributions, some show threads by default, others are sometimes hidden. To show them you usually add m to ps:

ps axfm