The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Restricting server load by user

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

  1. sawan3

    sawan3 Member

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

    MattGetWeb Well-Known Member

    Joined:
    Aug 4, 2005
    Messages:
    49
    Likes Received:
    0
    Trophy Points:
    6
    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 pam_limits.so" 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.
     
Loading...

Share This Page