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.
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 |
![]() |
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).