Changeset 3430

Show
Ignore:
Timestamp:
03/16/10 21:21:21 (5 months ago)
Author:
feiner.tom
Message:

podify sensors_ plugin

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/plugins/node.d.linux/sensors_.in

    r3429 r3430  
    11#!@@PERL@@ -w 
    22# -*- perl -*- 
    3 # Wildcard plugin to monitor sensors. 
    4 
    5 # Requirements: 
    6 #       - i2c and lm_sensors modules installed and loaded 
    7 #       - sensors program installed and in path 
    8 
    9 # Note: 
    10 #       - Sensor names are read from the output of the sensors program. 
    11 #         Change them in /etc/sensors.conf if you don't like them. 
    12 
    13 # Parameters supported: 
    14 
    15 #       config 
    16 #       autoconf 
    17 #       suggest 
    18 
    19 # Configurable variables 
    20 
    21 #       sensors           - Override default program 
    22 #       ignore_temp<n>    - Temperature <n> will not be plotted 
    23 #       ignore_fan<n>     - Fan <n> will not be plotted 
    24 #       ignore_volt<n>    - Voltage <n> will not be plotted 
    25 #       fan_warn_percent  - Percentage over mininum for warning 
    26 #       volt_warn_percent - Percentage over mininum/under maximum for warning 
    27 #                           Narrow the voltage bracket by this. 
    28 
    29 # Magic markers: 
    30 #%# family=manual 
    31 #%# capabilities=autoconf suggest 
    32  
     3=head1 NAME 
     4 
     5sensors_ - Wildcard-plugin to monitor information from temperature, voltage, 
     6           and fan speed sensors. 
     7 
     8=head1 CONFIGURATION 
     9 
     10The plugins needs the following components configured:  
     11 
     12        - i2c and lm_sensors modules installed and loaded. 
     13        - sensors program installed and in path. 
     14 Note: 
     15        - Sensor names are read from the output of the sensors program. 
     16          Change them in /etc/sensors.conf if you don't like them. 
     17 
     18  [sensors_*] 
     19      env.sensors           - Override default sensors program path 
     20      env.ignore_temp<n>    - Temperature <n> will not be plotted 
     21      env.ignore_fan<n>     - Fan <n> will not be plotted 
     22      env.ignore_volt<n>    - Voltage <n> will not be plotted 
     23      env.fan_warn_percent  - Percentage over mininum for warning 
     24      env.volt_warn_percent - Percentage over mininum/under maximum for warning 
     25 
     26=head1 VERSION 
     27 
     28$Id$ 
     29 
     30=head1 AUTHOR 
     31 
     32Unknown author 
     33 
     34=head1 LICENSE 
     35 
     36Unknown license 
     37 
     38=head1 MAGIC MARKERS 
     39 
     40 #%# family=manual 
     41 #%# capabilities=autoconf suggest 
     42 
     43=cut 
    3344use strict; 
    3445 
     
    3748my $SENSORS = $ENV{'sensors'} || 'sensors'; 
    3849 
    39 =text 
    40 Example outputs from sensors & matching regex parts: 
    41  
    42 Fan output example from sensors:  
    43 -------------------------------- 
    44 Case Fan:   1268 RPM  (min = 3750 RPM, div = 8)  ALARM 
    45 CPU Fan:       0 RPM  (min = 1171 RPM, div = 128)  ALARM 
    46 Aux Fan:       0 RPM  (min =  753 RPM, div = 128)  ALARM 
    47 fan4:       3375 RPM  (min =  774 RPM, div = 8) 
    48 fan5:          0 RPM  (min = 1054 RPM, div = 128)  ALARM 
    49  
    50 ^^^^        ^^^^             ^^^^       
    51  $1          $2               $3 
    52  
    53 -------------------------------- 
    54  
    55 Temperature output example from sensors: 
    56 * Note that the iso-8859-1 degree character is not printed, as we are running 
    57   with LC_ALL=C & LANG=C. 
    58 --------------------------------------- 
    59 Sys Temp:    +41.0 C  (high = -128.0 C, hyst = +24.0 C)  ALARM  sensor = thermistor 
    60 CPU Temp:    +40.5 C  (high = +80.0 C, hyst = +75.0 C)  sensor = thermistor 
    61 AUX Temp:    +39.0 C  (high = +80.0 C, hyst = +75.0 C)  sensor = thermistor 
    62  
    63 ^^^^^^^^      ^^               ^^              ^^ 
    64   $1          $2               $3              $4 
    65  
    66 --------------------------------------- 
    67  
    68 Voltage output example from sensors: 
    69 ------------------------------------ 
    70  
    71 VCore:       +1.09 V  (min =  +0.00 V, max =  +1.74 V) 
    72 in1:        +12.14 V  (min = +10.51 V, max =  +2.38 V)   ALARM 
    73  
    74 ^^^         ^^^              ^^^              ^^ 
    75 $1          $2               $3               $4 
    76  
    77  
    78 ------------------------------------ 
    79 =cut 
     50# Example outputs from sensors & matching regex parts: 
     51 
     52# Fan output example from sensors:  
     53# -------------------------------- 
     54# Case Fan:   1268 RPM  (min = 3750 RPM, div = 8)  ALARM 
     55# CPU Fan:       0 RPM  (min = 1171 RPM, div = 128)  ALARM 
     56# Aux Fan:       0 RPM  (min =  753 RPM, div = 128)  ALARM 
     57# fan4:       3375 RPM  (min =  774 RPM, div = 8) 
     58# fan5:          0 RPM  (min = 1054 RPM, div = 128)  ALARM 
     59#  
     60# ^^^^        ^^^^             ^^^^       
     61#  $1          $2               $3 
     62#  
     63# -------------------------------- 
     64#  
     65# Temperature output example from sensors: 
     66# * Note that the iso-8859-1 degree character is not printed, as we are running 
     67#   with LC_ALL=C & LANG=C. 
     68# --------------------------------------- 
     69# Sys Temp:    +41.0 C  (high = -128.0 C, hyst = +24.0 C)  ALARM  sensor = thermistor 
     70# CPU Temp:    +40.5 C  (high = +80.0 C, hyst = +75.0 C)  sensor = thermistor 
     71# AUX Temp:    +39.0 C  (high = +80.0 C, hyst = +75.0 C)  sensor = thermistor 
     72#  
     73# ^^^^^^^^      ^^               ^^              ^^ 
     74#   $1          $2               $3              $4 
     75#  
     76# --------------------------------------- 
     77#  
     78# Voltage output example from sensors: 
     79# ------------------------------------ 
     80#  
     81# VCore:       +1.09 V  (min =  +0.00 V, max =  +1.74 V) 
     82# in1:        +12.14 V  (min = +10.51 V, max =  +2.38 V)   ALARM 
     83#  
     84# ^^^         ^^^              ^^^              ^^ 
     85# $1          $2               $3               $4 
     86#  
     87#  
     88# ------------------------------------ 
    8089 
    8190