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.

How can I check memory/ram usage for each cPanel account?

Discussion in 'General Discussion' started by MinaIsaac, Dec 27, 2013.

  1. MinaIsaac

    MinaIsaac Member

    Joined:
    Dec 19, 2013
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hello,

    Currently I have 4 cPanel accounts running on my VPS. I need to check the memory/ram usage for each account on the vps to identify which of them is using high resources in order to ban. I opened the "Daily Process Log" in WHM but it is not showing the username or which accounts exactly uses resources.

    WHM displayes the following under the "User" column:
    root, nobody, mysql, dovenull, dovecot, mailnull, mailman, sshd, named, DELAYED, leechprotect, eximstats


    Thank you.
     
  2. Sys Admin

    Sys Admin Well-Known Member

    Joined:
    Apr 29, 2007
    Messages:
    67
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Try to log into your VPS via SSH and run " top" which should give you more details on this or ask your host/server admin to help you with identifying this for you.
     
  3. NixTree

    NixTree Well-Known Member

    Joined:
    Aug 19, 2010
    Messages:
    387
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Gods Own Country
    cPanel Access Level:
    Root Administrator
    That says no cPanel account is using major system resources. Monitoring the top command output is a good option; you may set a script to get the usage information in a fixed interval and that can provide some info to you. If you strictly want to check and limit server resources for users, use CloudLinux.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    You may want to consider a third-party application such as Cloud Linux if you want to monitor and limit accounts based on resource usage. You can find more information about Cloud Linux at:

    CloudLinux | cPanel

    Thank you.
     
  5. iero

    iero Member

    Joined:
    Jul 2, 2013
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    besides cloud linux, there is no report to know how to check memory/ram usage for each cPanel account, whm or command line? really?

    - - - Updated - - -

    i have found this:

    TOTAL=$(free | awk '/Mem:/ { print $2 }')
    for USER in $(ps haux | awk '{print $1}' | sort -u)
    do
    ps hux -U $USER | awk -v user=$USER -v total=$TOTAL '{ sum += $6 } END { printf "%s %.2f\n", user, sum / total * 100; }'
    done

    What i need is to know this for a period of time
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    There are no native features included with cPanel/WHM that will report that information over a set time period, but you are welcome to develop a custom script that monitors the usage over time and produces a report based on that data.

    Thank you.
     
Loading...

Share This Page