LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-16-2005, 05:25 AM   #1
D.kok
LQ Newbie
 
Registered: Mar 2005
Posts: 5

Rep: Reputation: 0
memoryleak? oomkiller kills processes


Hi,

Fedora core 3 runlevel 3 used as a webserver
Since a while this system is loosing memory . When the memory is empty oom-killer kills processes f.i. httpd mysqld. So the systems becomes unusable.
I have no process withs consumes the load of memory

After a reboot the same happens again.

How can I find the "thing" that takes the memory?

Thanks in Advance
Donald
 
Old 03-16-2005, 06:32 AM   #2
marcosdumay
LQ Newbie
 
Registered: Jan 2005
Distribution: Debian, testing
Posts: 19

Rep: Reputation: 1
Spying processes.

There are two very useful programs to spy processes, ps and top.

Both run on a terminal, top is interative, while ps just dumps the info on the screen, so I recomend you top (if you where writing a script, ps whould be better).

To run, open a terminal and enter the command "top". You problalbly want to sort the processes by memory use, if I remember it right, you do that pressing "m", if I am wrong, try pressing "h" to see a help screen.
 
Old 03-16-2005, 07:11 AM   #3
D.kok
LQ Newbie
 
Registered: Mar 2005
Posts: 5

Original Poster
Rep: Reputation: 0
Hi Marcos,
I used top and ps (and free, /proc/meminfo), but can not find strange things. Memory level is getting lower and lower though.
Greetzz
Donald
 
Old 03-16-2005, 08:20 AM   #4
Oliv'
Senior Member
 
Registered: Jan 2004
Location: Montpellier (France)
Distribution: Gentoo
Posts: 1,014

Rep: Reputation: 36
Hello,

from http://linux-mm.org/docs/oom-killer.php :
Quote:
The OOM killer uses the following factors to chose which process to kill in an out of memory situation:

* memory use, the more memory a process is using, the more memory we will free up and the higher the likelyhood that this program is too big for the system and couldn't have run to completion anyway
o more memory use increases the likelyhood of being killed
* CPU use, the more processor time a process has used, the more work will be lost if we kill this process
o more cpu time decreases the chance of being killed
* time since start time, the longer a process has been running, the more likely it is that the process is stable and not "guilty" of exhausting system resources
o a longer run time decreases the chance of being killed
* system administrator rights, usually only trusted programs and important system programs run as root or with capabilities enabled
o running as root decreases the chance of being killed
* direct hardware access, killing a process which has direct hardware access may lead to hardware getting confused and the machine hanging; also, programs with direct hardware access are usually important for whatever task the system is doing
o direct hardware access decreases the chance of being killed
try to run pmap on process killed. You can also have a look at your kernel messages to see if there are more info.
 
Old 03-16-2005, 09:11 AM   #5
D.kok
LQ Newbie
 
Registered: Mar 2005
Posts: 5

Original Poster
Rep: Reputation: 0
oom-killer kills processes because the memory is low. It is a syptom.
I need to know why the memory on the system is running low, so oom-killer does not need to kill processes.
oom-killer helps a system, without it the system would 'die'.
 
Old 03-17-2005, 09:22 AM   #6
marcosdumay
LQ Newbie
 
Registered: Jan 2005
Distribution: Debian, testing
Posts: 19

Rep: Reputation: 1
Is swap enogh?

Are you sure you jave enogh memory + swap to run everyting you are running?
Some programs consume a lot of memory on only a few tasks, so they may be stable for a time, but suddelnly run aout of memory.

Also, if you have a memory leak, you will se the memory use of the offending program grow up all the time (it's different to grow up and keep there, several programs don't release their memory while running, this is ok). You must examine their usage several times and see if the memory usage of a program is growing.
 
Old 03-18-2005, 02:03 AM   #7
D.kok
LQ Newbie
 
Registered: Mar 2005
Posts: 5

Original Poster
Rep: Reputation: 0
Hi Marcos,
The machine has 200 of the 500 Mb free after booting. It also has 2 Gb for swapping.
Basicly it runs httpd and mysql with a quite statical website.
Until last week the machine woked without problems for months without booting. The last weeks I have to to boot twice a day.
No additional software is added. I update the machine with yum daily though.
Do you know of a tool which can print the memory usage of processes, So I can put that in cron and analyse it later?
 
Old 03-18-2005, 12:07 PM   #8
marcosdumay
LQ Newbie
 
Registered: Jan 2005
Distribution: Debian, testing
Posts: 19

Rep: Reputation: 1
Hi, Dkok.

Well, ps -A -l display all process information on stdout. You can redirect it to a log file.
The problem is that this is quite a verbhouse dump, you will problably want to make a script to walk through it. Knowing that the position of older processes on the dumps don't change will help.

But the problem you descripbe is quite a weard one. Are you sure no software has changed (even actualized)? You may want to look for a worm with those simptoms.

Sorry I can't really help you, but I never saw anything like that before.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
e1000 kills me gyrus Linux - Hardware 7 11-16-2006 08:26 PM
10.1 - log out kills X Esenthiel Mandriva 6 10-04-2004 10:40 AM
monitoring active processes and identifying the required processes. gajaykrishnan Programming 2 08-13-2004 01:58 AM
microsoft.com kills kde sathia Slackware 26 01-15-2004 06:42 AM
aMSN kills linux angustia Linux - General 7 01-09-2004 09:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:40 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration