mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-31 05:13:45 +00:00
Whitespace cleanup
* remove trailing whitespace * remove empty lines at the end of files
This commit is contained in:
parent
ef851f0c34
commit
17f784270a
604 changed files with 2927 additions and 2945 deletions
|
@ -1,10 +1,10 @@
|
|||
#!/usr/bin/perl -w
|
||||
##########################################################################################################
|
||||
#
|
||||
# Munin plugin to monitor values reported by a Voltcraft TCM 220 or 320 temperature swicth module
|
||||
# connected to a serial port. A cable needs to be soldered to the module's dedicated data output pads:
|
||||
# pad no. 9 (GND) to pin no. 5 of the serial port, pad no. 17 (DATA_OUT) to pin no. 2 of the serial port
|
||||
# and pad no. 18 (CLOCK) to pin no. 3 of the serial port. For more details, check out the documentation
|
||||
# Munin plugin to monitor values reported by a Voltcraft TCM 220 or 320 temperature swicth module
|
||||
# connected to a serial port. A cable needs to be soldered to the module's dedicated data output pads:
|
||||
# pad no. 9 (GND) to pin no. 5 of the serial port, pad no. 17 (DATA_OUT) to pin no. 2 of the serial port
|
||||
# and pad no. 18 (CLOCK) to pin no. 3 of the serial port. For more details, check out the documentation
|
||||
# that came with your Voltcraft TCM 220/320 temperature swicth module.
|
||||
#
|
||||
# In order to use this plugin, copy it to the munin's plugin directory (eg. /usr/share/munin/plugins)
|
||||
|
@ -15,7 +15,7 @@
|
|||
#
|
||||
# Important: make sure to use the same names in your symlinks and other config places!
|
||||
#
|
||||
# 2. In /etc/munin/plugin-conf.d/munin-node add the following, to be able to contact the modules via
|
||||
# 2. In /etc/munin/plugin-conf.d/munin-node add the following, to be able to contact the modules via
|
||||
# serial ports (obviously replacing these with your own data):
|
||||
#
|
||||
# [voltcraft_tcm220_serverroom1]
|
||||
|
@ -30,11 +30,11 @@
|
|||
#
|
||||
# 3. Restart the munin node by 'service munin-node restart'.
|
||||
#
|
||||
# If all went well, after 5 minutes or so you should have tne new module's graphs listed on the Web
|
||||
# If all went well, after 5 minutes or so you should have tne new module's graphs listed on the Web
|
||||
# Interface of Munin.
|
||||
#
|
||||
# Note: the plugin waits maximum 11 seconds for the module to report the current temperature values to
|
||||
# the serial port. If no value is reported, or the serial cable is unplugged, it returns Undefined to
|
||||
# the serial port. If no value is reported, or the serial cable is unplugged, it returns Undefined to
|
||||
# Munin. According to the documentation, the module can be configured to report values every 2 seconds
|
||||
# instead the 10 seconds default - this can be used to speed up the data acquisition process, however
|
||||
# it can decrease battery life (with default values, two AAA alkaline batteries last cca 2 years).
|
||||
|
@ -119,7 +119,7 @@ my $ch1temp = "U";
|
|||
my $ch2temp = "U";
|
||||
|
||||
if ($response // "") {
|
||||
my $hex = unpack 'H*', $response;
|
||||
my $hex = unpack 'H*', $response;
|
||||
# print "$hex\n"; #$hex should be something like "abc102999babc2017677" for +29.9 and +17.6
|
||||
|
||||
my $ch1sum = substr($hex, 4, 1) + substr($hex, 5, 1) + substr($hex, 6, 1) + substr($hex, 7, 1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue