homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
Forum Library, Charter, Moderators: bakedjake

Linux, Unix, and *nix like Operating Systems Forum

Linux server resources monitoring
How to monitor server resources before they affect server uptime

10+ Year Member

Msg#: 3613687 posted 7:46 pm on Mar 28, 2008 (gmt 0)

Hello All,

I was wondering if anyone knew of a good script or app that would monitor our vital metrics such as cpu and memory usage on our Red Hat Enterprise Linux ES 4 server.

We would like to set some thresholds so that a monitoring system alerts us (email, SMS) before the server goes down because of a process using too much memory or cpu.

It should be a really simple script, nothing with too many features, just the basics, but have the ability to log and alert several email addresses.

Thanks a bunch,




WebmasterWorld Senior Member 10+ Year Member

Msg#: 3613687 posted 8:50 pm on Mar 28, 2008 (gmt 0)

This can be done with a relatively simple perl script and cron job, but you'd have to hire someone to write that custom.
Another thing to consider is more tightly integrating this monitoring into the software running on the machine. I.e. if resources hit a certain point not only send an email but do things like throw up a 'We are experiencing a heavy load, please try your query again in a few minutes' notice, killing database queries that have been open for 'too long', and then logging and possibly emailing the situation might be even more effective.


WebmasterWorld Senior Member jtara us a WebmasterWorld Top Contributor of All Time 5+ Year Member

Msg#: 3613687 posted 3:48 pm on Mar 31, 2008 (gmt 0)

There are a bunch of packages to do this - one or more is probably included in your Linux distribution.

One popular one is called Nagios. There are plenty of others.

Here's the category listing on Wikipedia:


These typically use a "mangement server" running on some Linux system (but sometimes Windows is supported as well) which really shouldn't be one of the systems under management. An either mandatory or optional client ("agent") may be installed on each system under management. They usually also do some monitoring (such as pings) that doesn't require anything installed on the managed systems. In some cases, they don't use a client, but simply make an SSH connection and a command shell.


WebmasterWorld Senior Member lammert us a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

Msg#: 3613687 posted 10:26 pm on Mar 31, 2008 (gmt 0)

Rather than monitor the server and manually try to prevent disasters, I would try to restrict the processes themselves. Apache and MySQL have settings to control the numbers of subprocesses, memory usages etc. Linux itself has also many options to limit the amount of virtual and phyisical memory occupied by processes, the maximum number of processes running under a specific username, allowed number of open files per process and system wide etc.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved