LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-29-2008, 05:54 AM   #1
linux_@dmin
LQ Newbie
 
Registered: Dec 2008
Posts: 6

Rep: Reputation: 0
Smile OOM on linux


Dear All,

I have enabled few settings to check the OOM condition. But i dont know how to manually crash the server due to OOM.

Thanks & Regards

Linux_@dmin

"if you are living on edge, you are taking too much space"
 
Old 12-29-2008, 05:59 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,119

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Oracle ???
.
.
.
Sorry, couldn't resist ...
 
Old 12-29-2008, 12:12 PM   #3
rweaver
Senior Member
 
Registered: Dec 2008
Location: Louisville, OH
Distribution: Debian, CentOS, Slackware, RHEL, Gentoo
Posts: 1,833

Rep: Reputation: 167Reputation: 167
Quote:
Originally Posted by linux_@dmin View Post
Dear All,

I have enabled few settings to check the OOM condition. But i dont know how to manually crash the server due to OOM.

Thanks & Regards

Linux_@dmin

"if you are living on edge, you are taking too much space"
I assume "OOM" means "Out of Memory", there are several possible scenarios the most simplistic being a perl script or small c program that calls itself a given number of times and allocates a sizable chunk of memory and sleeps to hold onto it.

Basically a controlled memory intensive fork bomb (or uncontrolled if you're feeling lazy and the server can crash without a problem.)

What are you working on? Disaster recovery? Load testing?

Last edited by rweaver; 12-29-2008 at 12:15 PM.
 
Old 12-30-2008, 12:02 AM   #4
linux_@dmin
LQ Newbie
 
Registered: Dec 2008
Posts: 6

Original Poster
Rep: Reputation: 0
Hi,

Can you please send me any such script ?
I have added following parameter in /etc/init.d/sshd such a way that ssh will be available in case of OOM.

startproc -t 5 -f -p $SSHD_PIDFILE $SSHD_BIN $SSHD_OPTS -o "PidFile=$SSHD_PIDFILE"
echo -17 > /proc/$(cat $SSHD_PIDFILE)/oom_adj
 
Old 12-30-2008, 07:54 AM   #5
rweaver
Senior Member
 
Registered: Dec 2008
Location: Louisville, OH
Distribution: Debian, CentOS, Slackware, RHEL, Gentoo
Posts: 1,833

Rep: Reputation: 167Reputation: 167
Quote:
Originally Posted by linux_@dmin View Post
Hi,

Can you please send me any such script ?
I have added following parameter in /etc/init.d/sshd such a way that ssh will be available in case of OOM.

startproc -t 5 -f -p $SSHD_PIDFILE $SSHD_BIN $SSHD_OPTS -o "PidFile=$SSHD_PIDFILE"
echo -17 > /proc/$(cat $SSHD_PIDFILE)/oom_adj
I would rather not as it can be easily used for nefarious purposes, the script itself is trivial and a google search for "fork bomb" should provide you all the direction you need.
 
  


Reply

Tags
oom


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
oom-killer on RHEL5.2 jaiarunk_s Linux - Server 3 12-12-2008 07:54 PM
oom kill, need suggestions bee2643 Linux - Newbie 7 08-08-2006 02:26 PM
OOM-Killer woes Slim Backwater Slackware 2 07-25-2006 03:00 AM
Kernel OOM killing more than it should snipersock Linux - Software 1 12-01-2004 08:03 PM
OOM has gone all tantric on me rafe Programming 1 09-10-2002 04:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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