Contact

admin

About Me · Send mail to the author(s) E-mail · Twitter

At GROSSWEBER we practice what we preach. We offer trainings for modern software technologies like Behavior Driven Development, Clean Code and Git. Our staff is fluent in a variety of languages, including English.

Feed Icon

Tags

Open Source Projects

Archives

Blogs of friends

Now playing [?]

  1. Marilyn Manson – Rock Is Dead
  2. Marilyn Manson – Mechanical Animals
  3. Marilyn Manson – The Dope Show
  4. Marilyn Manson – Great Big White World
  5. Nolan feat. Amber Jolene – Everyday & Everynight (KANT Remix)
Audioscrobbler/Last.fm

ClustrMap

Monitoring Servers

Posted in Networking at Friday, April 06, 2007 5:18 PM W. Europe Daylight Time

In case you own a server that is located in your apartment or is hosted at a professional data center, you might find it interesting to know how the server's tasks and services affect the overall load. Load is what you pay for in regard to the hosting provider and it's desirable to have an eye on the server performance.

Of course you could RDP into the server and start up the task manager or the performance monitor. However, this will only give you an impression of the current load. Perfmon is able to record statistics of various performance counters, but downloading the logs and analyzing them locally is quite a hassle. Also, you will have to repeatedly download and analyze logs in order to get an impression how the counter values evolve over time.

What about a easy solution that leverages standards and renders nice graphs? I use MRTG by Tobi Oetiker to monitor some performance counters of the (two) servers I'm in charge of. MRTG, a mature and free addition to the administrator's toolbox, uses SNMP and is able to generate graphs and web sites. Needless to say that MRTG is not targeted to replace advanced approaches to server management like SMS or MOM.

In order to give you an impression what can be achieved with MRTG, take a look at the following screenshot of a web site. The aggregated graphs you see show the activity of our home server over the last 24 hours.

MRTG Aggregate View

A click on any of daily graphs reveal a detailed view depicting the values of the selected counter up to over the last year. See how memory consumption steadily rises?

MRTG Detail View

MRTG is also good for finding temporary problems with server services. If you monitor HTTP connections and find that they come to a grinding halt, chances are that the web server has been running into problems. Of course, an enterprise-ready server monitoring solution would have sent out a notification about the problem in this case.

As said above, MRTG uses SNMP to get its data. However, finding the right SNMP OIDs for the counters you're interested in can be a complicated task because of the hierarchical nature of OIDs. MRTG can also run custom scripts (Batch, WSH, PowerShell, …) to acquire counter data, so you could query WMI (thus, also Windows performance counters), custom log files or any other data source. In this respect, MRTG is pretty powerful.

Data points are stored in log files that virtually newer grow because old data will be coalesced over time. The files take up about 55 KB for each counter on the machine above. Of course, this results in less accuracy for data from weeks ago, but generating 10000-foot-level graphs from these values is perfectly okay.

One tenable drawback of MRTG is that it's only able to acquire data points in 5-minute intervals. To get a higher temporal resolution choose RRDtool by the same author along with any supported application.

In order to get you started with MRTG here are some useful links for installing MRTG on your server:

Now Playing [?]: KoopKoop IslandsLet's elope

Friday, June 01, 2007 3:02:19 PM (W. Europe Daylight Time, UTC+02:00)
We implemented Nagios at work to monitor our servers, a mixture of Windows and Linux. It is a great solution to also get alerts.
All comments require the approval of the site owner before being displayed.
(will show your gravatar icon)
 
[Captcha]Enter the code shown (prevents robots):

Live Comment Preview