我想用cgroups来限制linux中的资源
http://en.wikipedia.org/wiki/Cgroups
如果碰到一个限制,我怎么能通知。 例如,如果我将进程限制为2个演出或ram,如果我没有主动监视它,我将如何知道它何时到达?
cgroups支持如2.4节所述的Notification API: http : //www.kernel.org/doc/Documentation/cgroups/cgroups.txt
本指南在编写相同的处理程序方面有一些很好的步骤:
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Resource_Management_Guide/sec-Using_the_Notification_API.html