Automatically kill a process if it exceeds a given amount of RAM
- by chrisamiller
I work on large-scale datasets. When testing new software, a script will sometimes sneak up on me, quickly grab all available RAM, and render my desktop unusable. I'd like a way to set a RAM limit for a process so that if it exceeds that amount, it will be killed automatically. A language-specific solution probably won't work, as I use all sorts of different tools (R, Perl, Python, Bash, etc).
So is there some sort of process-monitor that will let me set a threshold amount of RAM and automatically kill a process if it uses more?