The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Mysql doubt

Discussion in 'General Discussion' started by mohakevin, Jun 7, 2006.

  1. mohakevin

    mohakevin Well-Known Member

    Joined:
    Jan 19, 2005
    Messages:
    84
    Likes Received:
    0
    Trophy Points:
    6
    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.
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Perfectly normal, they're child processes of the main process, i.e. threads.
     
  3. mohakevin

    mohakevin Well-Known Member

    Joined:
    Jan 19, 2005
    Messages:
    84
    Likes Received:
    0
    Trophy Points:
    6
    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.
     
    #3 mohakevin, Jun 7, 2006
    Last edited: Jun 7, 2006
  4. jrehmer

    jrehmer Well-Known Member

    Joined:
    Apr 10, 2003
    Messages:
    287
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Denver, CO

    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?
     
  5. mohakevin

    mohakevin Well-Known Member

    Joined:
    Jan 19, 2005
    Messages:
    84
    Likes Received:
    0
    Trophy Points:
    6
    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
     
  6. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    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
     
  7. mohakevin

    mohakevin Well-Known Member

    Joined:
    Jan 19, 2005
    Messages:
    84
    Likes Received:
    0
    Trophy Points:
    6
    Thanks chirpy.
     
Loading...

Share This Page