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

MinaIsaac

Member
Dec 19, 2013
5
0
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.
 

Sys Admin

Well-Known Member
Apr 29, 2007
67
0
156
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.
 

NixTree

Well-Known Member
Aug 19, 2010
413
5
143
Gods Own Country
cPanel Access Level
Root Administrator
Twitter
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.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
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.
 

iero

Member
Jul 2, 2013
10
0
51
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
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
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.