Linux - General This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
|
01-05-2006, 04:45 PM
|
#1
|
LQ Newbie
Registered: Oct 2003
Distribution: slackware
Posts: 13
Rep:
|
When SWAP and RAM are out
Hello,
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?
Thanks.
|
|
|
01-06-2006, 12:28 AM
|
#2
|
Senior Member
Registered: Jun 2004
Posts: 2,553
Rep:
|
just make a swap file for extra swap space
|
|
|
01-06-2006, 06:31 PM
|
#3
|
LQ Newbie
Registered: May 2004
Posts: 13
Rep:
|
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.
|
|
|
01-06-2006, 11:09 PM
|
#4
|
LQ Newbie
Registered: Oct 2003
Distribution: slackware
Posts: 13
Original Poster
Rep:
|
Quote:
Originally Posted by Gunark
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.
|
|
|
01-06-2006, 11:44 PM
|
#5
|
LQ Veteran
Registered: Mar 2003
Location: Boise, ID
Distribution: Mint
Posts: 6,642
Rep:
|
Out of curiousity, how much RAM and how much swap are you running?
|
|
|
01-07-2006, 12:58 AM
|
#6
|
LQ Newbie
Registered: Oct 2003
Distribution: slackware
Posts: 13
Original Poster
Rep:
|
Quote:
Originally Posted by J.W.
Out of curiousity, how much RAM and how much swap are you running?
|
Code:
synide:~# free
total used free shared buffers cached
Mem: 255136 252812 2324 0 17712 40492
-/+ buffers/cache: 194608 60528
Swap: 259544 243644 15900
256MB of RAM and ~253MB of swap.
|
|
|
01-07-2006, 01:13 AM
|
#7
|
Member
Registered: Apr 2004
Location: Europe
Distribution: Debian, Slackware
Posts: 505
Rep:
|
Quote:
Originally Posted by Gunark
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.
Last edited by alienDog; 01-07-2006 at 01:18 AM.
|
|
|
All times are GMT -5. The time now is 07:26 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|