#!/usr/bin/perl # # LMCGI - A CGI Script for LM_Sensors # # (C)opyright 1999 Steve Gare # # You May use this code to create your own script as long as you give me # some credit and gimme a copy of whatever you create. # # Suggestions? Bugs? ---> admin@digitald.uk.com # Flames? Hate Mail? ---> /dev/null # # http://www.digitald.uk.com # # SETUP ------------------------------------------------------------------ # ------------------------------------------------------------------------ # Your Chipset Directory (as found in '/proc/sys/dev/sensors') ----------- # ------------------------------------------------------------------------ $chipset = "as99127f-i2c-0-2d"; # ------------------------------------------------------------------------ # Sensors ---------------------------------------------------------------- # ------------------------------------------------------------------------ # This Format: # "FileName , Type , Text Description, Correction (See README)" # Types are: # T for Tempreture # F for Fan # V for Voltage @temps = ( "temp1,T,CPU Temp,0", "temp2,T, Mainboard Temp,0", "fan1,F,CPU Fan,0", "fan2,F,Chassis Fan,0", "in0,V,V Core,0", "in1,V,IO Core,0", "in2,V,3.3V Supply,0", "in3,V,5V Supply,1.68", "in4,V,12V Supply,3.8", "in5,V,12V Return,3.48", "in6,V,5V Return,1.505" ); # ----------------------------------------------------------------------- # Font ------------------------------------------------------------------ # ----------------------------------------------------------------------- $font = "Arial,Helvetica"; $fontsize = "2"; $headersize = "3"; # ----------------------------------------------------------------------- # Text (Don't forget to escape quote's etc (IE bgcolor=\"#fffff\") ------ # ----------------------------------------------------------------------- $refresh = "20"; $title = "Hardware Status"; $sensor = "Sensor"; $value = "Value"; # ----------------------------------------------------------------------- # Files (Must be accessable by user 'nobody in most cases --------------- # ----------------------------------------------------------------------- $header = "/home/httpd/cgi-bin/lmcgi.header"; # ----------------------------------------------------------------------- # Colours --------------------------------------------------------------- # ----------------------------------------------------------------------- $bgcolor = "000000"; $text = "B8A7E1"; $link = "885EF8"; $ok = "B8A7E1"; $warn = "FFFF00"; $panic = "FF0000"; # ----------------------------------------------------------------------- # SETUP Ends Here ------------------------------------------------------- # ----------------------------------------------------------------------- $ver = "1.01"; print "Content-Type: text/html
| $sensor | $value |
| $label | $out |