Author Topic: How to limit the cpu usage percentage for a domain  (Read 882 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
How to limit the cpu usage percentage for a domain
« on: October 01, 2023, 08:50:32 PM »
Hello dear colleagues, I am having a problem with my current hosting provider, since apparently some of the VPS accounts that I manage with CWP7 are exceeding the "Acceptable Usage Percentages of the VPS service", the detail is that I do not They indicate which accounts or which domain are doing it.

Therefore, I would like to ask, is there a way to configure individually or globally the maximum percentage of usage that an account or domain can consume in CWP7?

Thank you.

Offline
*****
Re: How to limit the cpu usage percentage for a domain
« Reply #1 on: October 02, 2023, 01:35:13 AM »
If you know which user, you can add them to / etc/ security/ limits.conf (remove spaces in path, had to add due to SMF)

username    hard    cpu    10

or if you know what exec file:

cpulimit -l 10 -e /home/[username]/public_html/offender.php