LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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

Reply
 
Search this Thread
Old 05-12-2003, 06:49 PM   #1
Li-Wen
LQ Newbie
 
Registered: Mar 2003
Location: Townsville, Australia
Distribution: Red Hat 9.0, 'doze xp
Posts: 11

Rep: Reputation: 0
Which process is eating up my memory?


Hi
I have been running a Red Hat box for about a year running apache httpd, mysql, ffsearch, unreal-ircd, and a counter-strike server with hlstats, and have never once had any problems. Just about 2 weeks ago, the system started doing this:

Quote:
May 10 15:00:44 mayfair kernel: Out of Memory: Killed process 8134 (httpd).
May 10 15:10:08 mayfair kernel: Out of Memory: Killed process 21447 (mozilla-bin).
May 10 15:15:55 mayfair kernel: Out of Memory: Killed process 7275 (httpd).
May 10 15:26:42 mayfair kernel: Out of Memory: Killed process 6740 (httpd).
May 10 15:32:42 mayfair ntpd[773]: time reset 0.188020 s
May 10 15:32:42 mayfair ntpd[773]: synchronisation lost
May 10 15:48:05 mayfair kernel: Out of Memory: Killed process 8530 (mysqld).
Its done it probably half a dozen times over the last 2 weeks. Usually if I let it sit there it keeps killing all the httpd processes every time somone (tries to) access the webserver. Usually I can't log in at the console or via ssh, and the only thing that seems to keep working is the irc server. I looked back through the counter-strike server logs, and players on the server were whinging about serious lag about 5 minutes before the system actually started killing processes.
I have recently upgraded a lot of various things, and it looks to me like a memory leak in one of my programs, but I have no idea which one it could be. Is there any way of figuring out which process eating up all my memory?
I'm pretty sure there are no hardware problems, as I did a clean install of win2k on another hard drive and ran a hardware burn in test for 60 hrs, and I ran the Western Digital hdd diagnostics on the hard drive.

Any help would be greatly appreciated
 
Old 05-12-2003, 07:05 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,978
Blog Entries: 11

Rep: Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879
You could run a cron-job
every thirty minutes redirecting the output
to a file in roots home, and check which
process(es) gains memory ...

Code:
su -
crontab -e
30 * * * * top b n1 >> ~/mem.hog 2>&1
Cheers,
Tink
 
Old 05-12-2003, 07:06 PM   #3
Crashed_Again
Senior Member
 
Registered: Dec 2002
Location: Atlantic City, NJ
Distribution: Ubuntu & Arch
Posts: 3,503

Rep: Reputation: 57
There is a program called Valgrind that can help debugg memory leaks.
 
Old 05-12-2003, 07:08 PM   #4
Li-Wen
LQ Newbie
 
Registered: Mar 2003
Location: Townsville, Australia
Distribution: Red Hat 9.0, 'doze xp
Posts: 11

Original Poster
Rep: Reputation: 0
cheers, ill give those a try
 
Old 05-12-2003, 07:11 PM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,978
Blog Entries: 11

Rep: Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879
crashed ... Sorry ... got that all wrong :D

Cheers,
Tink

Last edited by Tinkster; 05-12-2003 at 07:16 PM.
 
Old 05-12-2003, 07:14 PM   #6
Li-Wen
LQ Newbie
 
Registered: Mar 2003
Location: Townsville, Australia
Distribution: Red Hat 9.0, 'doze xp
Posts: 11

Original Poster
Rep: Reputation: 0
Hey tink, ive never really understood this.... what does the 2>&1 actually do?

I set up that cronjob, now I just have to wait for it to crash again.

cheers
 
Old 05-12-2003, 07:18 PM   #7
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,978
Blog Entries: 11

Rep: Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879
Quote:
what does the 2>&1 actually do?
Redirects both stdout and stderr into the same file/stream,
so you don't miss out on any output ...

Code:
man bash
/REDIRECT
Cheers,
Tink
 
Old 05-12-2003, 07:20 PM   #8
Li-Wen
LQ Newbie
 
Registered: Mar 2003
Location: Townsville, Australia
Distribution: Red Hat 9.0, 'doze xp
Posts: 11

Original Poster
Rep: Reputation: 0
cheers
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Etch is eating up memory! Ptrs!OP Debian 22 07-16-2005 05:25 PM
Something is eating my memory benne Linux - Software 15 11-25-2004 06:02 AM
Linux is eating to much memory!!! alwin Linux - Networking 2 01-12-2003 10:32 PM
Need help with logrotate process eating 99.9% CPU glock19 Linux - General 5 12-30-2002 08:02 PM
How do I see what's eating all my memory? thomas.nichols Linux - General 1 09-05-2001 09:19 AM


All times are GMT -5. The time now is 09:04 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration