2
Copyright 1996-2002 by Brian C. Lane <bcl@brianlane.com>
5
Here are a few useful perl scripts for you to use with DigiTemp. Most of
6
them need customization for your specific circumstances. Some these scripts
7
are old, as I now use the RRD tool to graph and log data.
9
The digitemp_sql.pl script is new, and has not been tested extensivly yet,
10
but should work for users familiar with the MySQL database system.
13
inc_temp Build a file suitable for including into a server side
14
include webpage (or modify it to create the whole webpage.
15
This script operates on a logfile output from digitemp when
16
running with the -l option.
18
rem_temp Create an include file as in inc_temp and then send it to
20
This script operates on a logfile output from digitemp when
21
running with the -l option.
23
maxplot Create a GIF image of the temperature graph.
24
This script operates on a logfile output from digitemp when
25
running with the -l option.
28
This is a NetSaint/Nagios (www.nagios.com) script that uses
29
DigiTemp to check temperatures on monitored machines.
31
digitemp_sql.pl MySQL database logging of temperatures.
33
This is a new script, it logs the serial number and temperature
34
in Fahrenheit to a MySQL database. I assume that you are
35
familiar with the care and feeding of your database so that I
36
can skip over the simple stuff and get to the point:
38
Create a new database named digitemp:
39
mysqladmin create digitemp -u root -p
41
Edit the grant_mysql.sql file and change the password and
42
optionally the username. Grant access to the new database:
44
mysql mysql -u root -p < mysql_grant.sql
46
Create the database table:
48
mysql digitemp -u root -p < make_mysql.sql
50
Edit the digitemp_mysql.pl script. Change the password to the
51
one you used above, optionally change the username.
52
Point the digitemp_rcfile variable to the DigiTemp config file
53
that you have previously created using digitemp -i -c rcfile
55
I recommend using one other than .digitemprc so that it isn't
56
accidently erased when you run digitemp -i from your home
59
Make sure the path to the digitemp binary is correct. It is
60
specified by the $digitemp_binary variable.
62
Setup a cron job to log temperatures to the database at
65
*/5 * * * * /home/brian/bin/digitemp_mysql.pl
67
At this time I have not written any logging or graphing
68
scripts to deal with the MySQL temperature data.