Control Web Panel

WebPanel => How to => Topic started by: ennery on October 01, 2023, 08:50:32 PM

Title: How to limit the cpu usage percentage for a domain
Post by: ennery 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.
Title: Re: How to limit the cpu usage percentage for a domain
Post by: Starburst 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