Passionsblomst
IKT-ret.dk
Home

Projects, overview

Projects Menu

Dynamic log analyzer

Server temperature monitor

Robot detection

Feedback form

Sun server temperature monitor.

This program dates back to the second half of 2002, but for some reason, it is still very popular. One of the reasons might be, that it uses existing hardware and software. In fact, if your Sun server has Perl and the GD library installed, you should be able to install the monitor in less than 30 minutes.

Did you know, that the summer of 2006-2007 was very hot in Australia? Yes, the number of requests from that part of the World was up by 30% in January 2007.

What's Hot?

Temperature monitoring on Solaris servers

System requirements:

The program is designed to monitor the CPU temperature on one or more Sun/Solaris servers. You must have Perl installed, including the GD module. GD could be quite challenging on earlier Solaris versions, but I believe that has been fixed.

The /usr/platform/platform-name/sbin/prtdiag -v command on a Sun/Solaris box will output detailed hardware information.
It is extremely machine dependent, even on two almost identical Enterprise 450 servers, the format used to describe the CPU's was different.

To monitor more than one server, you create a shell script on each server, that pipes the output of prtdiag -v to a text file, then transfers that file to your web server, using FTP. Let cron execute the script at regular intervals, eg. every 15 minutes. Since you'll have to use the "here" document, including the password in plain text, to make the connection to the web server, make sure that FTP account is blocked from writing to anything but a single directory and that it has no valid shell.

The web server itself runs a similar script, but instead of the FTP commands, the script calls the Perl program, which handles the extraction of data and generation of images.

In this example, only the CPU temperature is measured. The prtdiag -v can, (depending on the hardware), give you information about disk status, error LEDs, fan speed, power supplies, etc. You will have to modify the regular expressions of the program accordingly.

The really cool thing is the dynamic generation of the graphics. This is done by the GD::pm module, written by Lincoln D. Stein.

The images below are static examples of the output from the whatshot.pl script:

www.cbs.dk
CBS main web server.
CPU temperature in celcius
hermes.lib.cbs.dk
CBS library system
CPU temperature in celcius
linux2.lib.cbs.dk
(You don't want to know)
CPU temperature in celcius
Each tick on the X-axis represents one hour, the yellow line indicates the most recent data
Each tick on the Y-axis represents 5 degrees celsius, the base is 30 degrees, max is 70 degrees (the servers should shut down at 65)

The script is not available for download. As stated on the projects page, you will have to ask me, if you are interested in a copy. (The word "please" should appear somewhere in your letter).