Limit CPU usage per account

Discussion in 'Server Operation' started by calande, May 28, 2006.

  1. calande

    calande New Member

    I seriously need to set up a tool that monitors CPU usage per account so that if a user uses more than an hour of CPU cycles, his account gets suspended automatically so that other users on the same server don't suffer. How could I do that? :confused:
  2. mgorsuch

    mgorsuch New Member

    Process Accounting and Elbow Grease

    I'm not 100% sure how to do this, but I think you want to look to enable 'process accounting', and then scour that information via a cron task to find trouble makers. If you find one, do what you need to do to disable the user.

    Does this make sense?

    You could also look at periodically examining data from 'ps -ef' to find offending users.

    This would be a very interesting project to take on.
  3. calande

    calande New Member

    Problem is that for instance Apache is run as "nobody" :(
    Any idea how Dreamhost and these guys do to monitor how much CPU each account uses? :rolleyes:
  4. admire

    admire New Member

  5. calande

    calande New Member

    Thank you. Is there a way to limit globally for each account (FTP, MDA, etc...), for instance, each user can use up to an hour of CPU per day, whether it is Apache, PureFTPd, Popper, etc...?

Share This Page