~ubuntu-branches/debian/jessie/digitemp/jessie

« back to all changes in this revision

Viewing changes to perl/README

  • Committer: Bazaar Package Importer
  • Author(s): Jesus Roncero
  • Date: 2004-09-01 01:34:37 UTC
  • Revision ID: james.westby@ubuntu.com-20040901013437-eicsrrd40dr371u0
Tags: upstream-3.3.2
ImportĀ upstreamĀ versionĀ 3.3.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Digitemp v2.6
 
2
Copyright 1996-2002 by Brian C. Lane <bcl@brianlane.com>
 
3
 
 
4
 
 
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.
 
8
 
 
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.
 
11
 
 
12
 
 
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.
 
17
 
 
18
rem_temp        Create an include file as in inc_temp and then send it to
 
19
                a server via FTP.
 
20
                This script operates on a logfile output from digitemp when
 
21
                running with the -l option.
 
22
 
 
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.
 
26
 
 
27
check_digitemp.pl
 
28
                This is a NetSaint/Nagios (www.nagios.com) script that uses
 
29
                DigiTemp to check temperatures on monitored machines.
 
30
 
 
31
digitemp_sql.pl MySQL database logging of temperatures.
 
32
 
 
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:
 
37
 
 
38
                Create a new database named digitemp:
 
39
                mysqladmin create digitemp -u root -p
 
40
 
 
41
                Edit the grant_mysql.sql file and change the password and
 
42
                optionally the username. Grant access to the new database:
 
43
 
 
44
                mysql mysql -u root -p < mysql_grant.sql
 
45
 
 
46
                Create the database table:
 
47
 
 
48
                mysql digitemp -u root -p < make_mysql.sql
 
49
 
 
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
 
54
 
 
55
                I recommend using one other than .digitemprc so that it isn't
 
56
                accidently erased when you run digitemp -i from your home
 
57
                directory.
 
58
 
 
59
                Make sure the path to the digitemp binary is correct. It is
 
60
                specified by the $digitemp_binary variable.
 
61
 
 
62
                Setup a cron job to log temperatures to the database at
 
63
                regular intervals:
 
64
 
 
65
                */5 * * * *   /home/brian/bin/digitemp_mysql.pl
 
66
 
 
67
                At this time I have not written any logging or graphing
 
68
                scripts to deal with the MySQL temperature data.
 
69
 
 
70