LinuxQuestions.org
Visit Jeremy's Blog.
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, 05: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, 06:10 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Jessie, Linux Mint 17
Posts: 7,750

Rep: Reputation: 271Reputation: 271Reputation: 271
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, 06: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 09:07 PM.
 
Old 12-16-2008, 10: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


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


All times are GMT -5. The time now is 04:32 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration