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.

%CPU/%Mem in WHM

Discussion in 'General Discussion' started by xnull, Apr 4, 2002.

  1. xnull

    xnull Well-Known Member

    Joined:
    Sep 9, 2001
    Messages:
    156
    Likes Received:
    0
    Trophy Points:
    16
    Ever since the very nice and fancy page was implemented for the &show current CPU usage&, some strange thing have appeared.

    All apache httpd process list as 156-159% CPU usage EACH! They also say they are taking 5-10% mem. I know that should not be true. Is there a way to tell if this is a bug in WHM or if there is something seriously wrong with our server?
     
  2. totalufo

    totalufo Well-Known Member

    Joined:
    Jan 17, 2002
    Messages:
    160
    Likes Received:
    0
    Trophy Points:
    16
    [quote:97d3817b21][i:97d3817b21]Originally posted by xnull[/i:97d3817b21]

    Ever since the very nice and fancy page was implemented for the &show current CPU usage&, some strange thing have appeared.

    All apache httpd process list as 156-159% CPU usage EACH! They also say they are taking 5-10% mem. I know that should not be true. Is there a way to tell if this is a bug in WHM or if there is something seriously wrong with our server?[/quote:97d3817b21]

    How many domain accounts are on this server?
    Look at Apache status. How any &K&'s are there?
     
  3. xnull

    xnull Well-Known Member

    Joined:
    Sep 9, 2001
    Messages:
    156
    Likes Received:
    0
    Trophy Points:
    16
    I think we have 68 accounts
     
  4. patchwork

    patchwork Well-Known Member

    Joined:
    Nov 2, 2001
    Messages:
    92
    Likes Received:
    0
    Trophy Points:
    16
    Have you noticed that none of the figures in the WHM process list for CPU/Mem usage agree with the figures reported by the top command.

    I will use the figures from my server (Redhat 7.2) as an example

    If I grab the information for named and mysql from the top command (after its been running for a 30 seconds and stabilized), these are the figures it shows.



    CPU states: 7.8% user, 3.5% system, 0.0% nice, 88.5% idle

    %CPU %MEM COMMAND

    3.5 2.9 mysqld
    0.7 2.9 mysqld
    0.5 2.9 mysqld
    0.3 2.9 mysqld
    0.1 2.9 mysqld
    0.1 2.9 mysqld
    0.0 2.9 mysqld
    0.0 2.9 mysqld
    0.0 2.9 mysqld
    0.0 2.9 mysqld
    0.0 2.9 mysqld
    0.1 2.7 named
    0.0 2.7 named
    0.0 2.7 named
    0.0 2.7 named
    0.0 2.7 named


    Then if I look in the WHM process manager it shows

    COMMAND %CPU %MEM

    mysql 17 0
    mysql 17 0
    mysql 17 0
    mysql 17 0
    mysql 17 0
    mysql 17 0
    mysql 17 0
    mysql 17 0
    mysql 17 0
    mysql 17 0
    mysql 17 0
    named 26 9
    named 26 9
    named 26 9
    named 26 9
    named 26 9


    Weird isn't it.


    I've tried to work out the &real& memory useage consumed by all threads of a task before now and I know that it is almost impossible to get accurate numbers from linux. So I know its not totally WHM's fault, but the figures WHM does supply are almost meaningless. Like MySQL taking up 0% of the memory (I wish) named at 26% CPU, using the top command I've never seen named above 0.1% CPU.


    Maybe this is just a problem with my machine or maybe its a Linux 7.2 bug, maybe a few other people could look at their machines and see what numbers are reported.


    Pete
     
  5. xnull

    xnull Well-Known Member

    Joined:
    Sep 9, 2001
    Messages:
    156
    Likes Received:
    0
    Trophy Points:
    16
    So, should I assume this is a bug in Cpanel and apache really isn't bringing the server to its knees 24/7?
     
  6. patchwork

    patchwork Well-Known Member

    Joined:
    Nov 2, 2001
    Messages:
    92
    Likes Received:
    0
    Trophy Points:
    16
    Open a shell and type &top& leave it for around 15 seconds for everything to stablize and see what it reports for the httpd tasks.

    If you cannot see enough of the output, you could type

    cd tmp (or another temp directory)
    top -n3 -b & top.txt
    pico top.txt

    Scroll down to the bottom set of results as they will be more accurate than the results from the top of the file.

    Pete
     

Share This Page