LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-11-2008, 04:55 PM   #1
m2azer
Member
 
Registered: Sep 2004
Location: USA
Distribution: red hat, fedora & centos
Posts: 202

Rep: Reputation: 30
How to keep system resources free and identify suspicious/offending users and scripts


Hello all,

How to deal with:
High I/O that slows down and eat system resources
infinite loops mistakenly run by users
figuring out high system load/high memory usage

I had a situation where a mail server, sendmail on rhel4 with 6G memory , became very slow to the point imap connections were timed out as well the over all system response. TOP, showed high load that reached 22 and higher

If an infinite loop script was to run by a user how would I discover it and how can I identify the offending user/limit number of process that could be run by users?


Thank you so much
 
Old 12-11-2008, 05:10 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,342

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
You can limit the amount of resources that a user can hog with the ulimit command. Here is an explanation of what ulimit can do:

http://certcities.com/editorial/colu...itorialsID=214

-------------------------
Steve Stites
 
Old 12-11-2008, 05:17 PM   #3
dv502
Member
 
Registered: Sep 2006
Location: USA - NYC
Distribution: Whatever icon you see!
Posts: 642

Rep: Reputation: 57
There is a file called /etc/security/limits.conf

This file is use to control a how much memory, CPU time, processes and other resources a user can use. See the man page for limits.conf

Code:
man limits.conf
Use top to monitor high CPU and memory usage. Investigate the process before killing it. A user could be using a program that uses lots of CPU usage and not be aware of it.

Optional: Install rkhunter or chkrootkit and clamav. The first two are rootkit checkers and clamav is a anti-virus scanner.
Clamav can integrated in mail servers and other services.

Last edited by dv502; 12-12-2008 at 08:07 PM.
 
Old 12-16-2008, 09:34 AM   #4
m2azer
Member
 
Registered: Sep 2004
Location: USA
Distribution: red hat, fedora & centos
Posts: 202

Original Poster
Rep: Reputation: 30
Thank you for your replies. 2 quick questions
What do you think about "csf" as firewall 'without cpanel'? any other recommendations?
Is there a complete, A2Z, docs/guide on how to protect/secure linux?

Thanks
 
  


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
Is it true: too many fcgi scripts eat all the resources? isync Linux - Server 1 06-22-2007 08:19 PM
Free Online resources for LPI test cucolin@ Linux - Certification 2 06-08-2006 02:30 PM
Free Software resources Cam.Thompson General 2 10-12-2005 09:44 AM
bash scripts which go bump in the night and the system resources who hate them dehuszar Programming 16 07-08-2004 03:24 PM
Give certain users more access to resources tearinox Slackware 2 05-21-2004 02:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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