Welcome to WebmasterWorld Guest from

Forum Moderators: bakedjake

Message Too Old, No Replies

Linux server resources monitoring

How to monitor server resources before they affect server uptime

7:46 pm on Mar 28, 2008 (gmt 0)

New User

10+ Year Member

joined:June 19, 2003
posts: 10
votes: 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,


8:50 pm on Mar 28, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Feb 27, 2001
votes: 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.
3:48 pm on Mar 31, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member jtara is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Nov 26, 2005
votes: 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.

10:26 pm on Mar 31, 2008 (gmt 0)

Senior Member from KZ 

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

joined:Jan 10, 2005
posts: 2938
votes: 24

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.