Mobile app version of vmapp.org
Login or Join
Looi9037786

: How can I check memory usage for each cPanel account? 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

@Looi9037786

Posted in: #Centos #Cpanel #Linux #UsageData #Vps

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

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Looi9037786

1 Comments

Sorted by latest first Latest Oldest Best

 

@Kaufman445

If you have SSH access try this

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


See this link from StackOverflow for more information

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme