LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 01-31-2006, 08:26 AM   #1
guarriman
Member
 
Registered: Nov 2004
Posts: 101

Rep: Reputation: 15
oom-killer: How to set priorities to kill processes


Hi.

Working with Linux 2.6.9-1.667, my server suffers periodically 'oom-killer' problems. Apache
stops working and so SSH does.

The only information I can get is within '/var/log/messages':
Jan 31 01:04:28 www kernel: oom-killer: gfp_mask=0x1d2

There are no more messages dealing with this error, and this is the memory status just 4 minutes
before (I make a 'free -m' memory log each 10 minutes):
------
01:00:01 up 27 days, 22:44, 0 users, load average: 0.39, 0.32, 0.28
total used free shared buffers cached
Mem: 496 356 139 0 32 117
-/+ buffers/cache: 206 289
Swap: 1058 74 983
procs -----------memory---------- ---swap-- -----io---- --system-- ----cpu----
r b swpd free buff cache si so bi bo in cs us sy id wa
6 0 76764 142972 33228 120612 1 1 15 23 12 9 16 2 81 1
0 0 76764 143076 33396 120640 0 0 0 2668 1300 1674 50 15 34 1
0 0 76764 143076 33396 120640 0 0 0 0 1015 20 0 0 100 0
0 0 76764 143076 33396 120640 0 0 0 0 1020 35 0 0 100 0
0 0 76764 143076 33396 120640 0 0 0 0 1040 339 28 4 68 0
-----------
I consider it as a normal status, isn't it?

Is there any posibility to set priorities in order to make oom-killer stop
the processes I want? I don't want it to stop 'httpd' or 'sshd'.

Thank you very much.
 
Old 01-31-2006, 10:03 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608
First of all please upgrade to kernel 2.6.15.2.
It may not solve *this* problem, but it will fix vulnerabilities.

Second this is no security question and so should better be in Linux - General with your old thread and I will move this thread there. If you think it's beneficial to merge the two threads ask


You haven't posted much info to go on like when/after which changes this started happening, CPU and process specs, dmesg, HW, drivers, SW in use, etc, etc and the kernel should start spewing messages right after and before activating Out Of Memory killing. Since in your old thread for instance sendmail shows a reject because of high load I don't think the stats you show are useful. I would suggest running continuous stats with vmstat or install more comprehensive tools like Dstat or Atsar, removing all non-critical services from restarting (not syslog and friends but httpd, mysqld, y'know), rebooting the box after installing the latest stable kernel and start monitoring. If it doesn't crash (wait and use the box for say half a day) enable each service, use it and wait a reasonable period (say half a day) before reenabling the next service. When you crash the box you've got some nice dstat numbers to graph in OOo Calc to draw conclusions from and a more approximate idea what the culprit(s) could be, but that's just my 2 cents.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Safe to kill all user: 'nobody' processes? lagu2653 Linux - Security 4 11-06-2005 07:28 PM
how to use kill to kill a batch of processes with same name? dr_zayus69 Linux - Software 2 09-03-2005 07:35 PM
How can I kill all processes form a certain user ? Menestrel Linux - Newbie 6 07-05-2005 10:53 AM
oom-killer is killing my programs on FC3 abarclay Fedora 1 03-08-2005 10:14 AM
HP-UX failing to kill some processes itumeleng Other *NIX 1 01-21-2005 09:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 06:25 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