Author: glen                         Date: Sat Oct 17 10:03:45 2009 GMT
Module: packages                      Tag: HEAD
---- Log message:
- check also temperatures

---- Files affected:
packages/nagios-plugin-check_raid:
   check_raid (1.59 -> 1.60) 

---- Diffs:

================================================================
Index: packages/nagios-plugin-check_raid/check_raid
diff -u packages/nagios-plugin-check_raid/check_raid:1.59 
packages/nagios-plugin-check_raid/check_raid:1.60
--- packages/nagios-plugin-check_raid/check_raid:1.59   Fri Oct 16 21:02:50 2009
+++ packages/nagios-plugin-check_raid/check_raid        Sat Oct 17 12:03:40 2009
@@ -809,16 +809,28 @@
        }
 
        # check first controller
+       print $fh "\r";
+       print $fh "show globals\r";
        print $fh "show this_controller\r";
        print $fh "show other_controller\r";
        # this will issue termination match, ie. invalid command
        print $fh "exit\r";
 
-       my ($c, %c);
+       my ($c, %c, %t);
        while (<$fh>) {
                chomp;
                s/[\n\r]$//;
                last if /Invalid CLI command/;
+
+               # Temperature:
+               # EMU: 23 Celsius,  73 Fahrenheit
+               # PS1: 22 Celsius,  71 Fahrenheit
+               # PS2: 22 Celsius,  71 Fahrenheit
+               if (my($s, $c) = /(\S+): (\d+) Celsius,\s+\d+ Fahrenheit/) {
+                       $t{$s} = int($c);
+                       next;
+               }
+
                # Controller 1 (right controller):
                if (my($s) = /^(Controller \d+)/) {
                        $c = $s;
================================================================

---- CVS-web:
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/nagios-plugin-check_raid/check_raid?r1=1.59&r2=1.60&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to