Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Sometimes, I accidentally run out of available RAM and swap space. When that happens, the system starts swapping VERY heavily and makes me unable to kill some processes.
I remember that on 2.4 kernels, it will automatically kill processes when it cannot allocate more RAM.
How would I set it so that the 2.6 kernel would kill processes instead of freezing up?
Is there some sort of daemon or utility out there that could monitor your free RAM and warn you / freeze processes when you're almost out? I've accidently ran out a few times while in KDE (see my thread about X taking 460+ megs of RAM ), and it gets pretty ugly. Often I can't even kill X with Ctrl+Alt+Backspace. It'd be nice if I had something that would watch my remaining free memory and stop whatever is eating it before it's too late.
Is there some sort of daemon or utility out there that could monitor your free RAM and warn you / freeze processes when you're almost out? I've accidently ran out a few times while in KDE (see my thread about X taking 460+ megs of RAM ), and it gets pretty ugly. Often I can't even kill X with Ctrl+Alt+Backspace. It'd be nice if I had something that would watch my remaining free memory and stop whatever is eating it before it's too late.
Gkrellm can monitor memory usage and alert you when you're getting close. It can also run a command, so you can write a script to kill processes.
I usually have enough RAM and swap, but sometimes, I accidentally go over the limit. For example, this flash movie tried to load a whole video into memory.
I guess there's no easy way of preventing something like this from happening, except a huge swap partition/file.
Is there some sort of daemon or utility out there that could monitor your free RAM and warn you / freeze processes when you're almost out?
There is ulimit command, see ulimit -a for current settings. It also gives you switches with which you can set the limits. You have to do it from the login shell. It doesn't warn you or anything, but it prevents the system from freezing and is really "the linux way" of doing this. Personally I don't like gkrellm, it just seems like a geek toy to me.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.