[Users] How to set resource quota of other process
Ian jonhson
jonhson.ian at gmail.com
Mon Dec 24 23:52:48 EST 2007
Hi,
We all know that we can set resource quota of process with pam_limits.so.
The module can enforce the resource usage (cpu, memory, maximal number of
open file, etc) by setrlimit.
It seems that the function, setrlimit(), can only set self resource
quota of process and inherit by its child processes, right?
Because I adopted the function in one process to set another process'
resource quota, and found nothing enforced happen. The other process can run as
before, not any limitation.
I don't know whether what I have designed is correct, using the setrlimit to
set other process resource usage. If it is wrong, are there other ways to
accomplish my target?
Also, in OpenVZ, are there any auxiliary tools (or libraries, functions) to
do enforcement?
Thank you in advance.
Regards,
Ian
More information about the Users
mailing list