Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Restricting server load by user

Discussion in 'General Discussion' started by sawan3, Jan 17, 2006.

  1. sawan3

    sawan3 Member

    Jan 17, 2006
    Likes Received:
    Trophy Points:
    Is there any way to restrict the server load a user can use.
  2. MattGetWeb

    MattGetWeb Well-Known Member

    Aug 4, 2005
    Likes Received:
    Trophy Points:
    Disclaimer: I have no idea if this will work in a webhosting scenario.

    PAM has this facility - kind of. Have a look at /etc/security/limits.conf. I imagine for anything to work, you'd need to make sure you were running phpsuexec so the processes run as the user in question. Rather than looking directly at the cpu time option there, I'd probably use the priority option so that even if the user had 90%+ cpu, it would be low priority and other users could get cpu time easily. If you aren't familiar with PAM, you might not know that you will probably need to insert something like "session required" somewhere in /etc/pam.d/* if your distro wasn't kind enough to set this up for you.

    There is also ulimit, but I don't think this what you are after.
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice