Applying memory limits to screen sessions

Posted by CollinJSimpson on Server Fault See other posts from Server Fault or by CollinJSimpson
Published on 2012-04-05T17:55:57Z Indexed on 2012/04/06 5:32 UTC
Read the original article Hit count: 518

Filed under:
|
|
|
|

You can set memory usage limits for standard Linux applications in: /etc/security/limits.conf

Unfortunately, I previously thought these limits only apply to user applications and not system services. This means that users can by bypass their limits by launching applications through a system service such as screen. I'd like to know if it's possible to let users use screen but still enforce application limits.

Jeff had the great idea of using nohup which obeys user limits (wonderful!), but I would still like to know if it's possible to mimic the useful windowing features of screen.

EDIT:

It seems my screen sessions are now obeying my hard address space limits defined in /etc/security/limits.conf. I must have been making some mistake. I recently installed cpulimit, but I doubt that's the solution.Thanks for the nohup tip, Jeff! It's very useful.

Link to CPU Limit package

© Server Fault or respective owner

Related posts about linux

Related posts about memory