]> jspc29.x-matter.uni-frankfurt.de Git - hadesicinga.git/commitdiff
debugging. Sergey.
authorhadaq <hadaq>
Thu, 29 Jan 2009 13:04:08 +0000 (13:04 +0000)
committerhadaq <hadaq>
Thu, 29 Jan 2009 13:04:08 +0000 (13:04 +0000)
plugins/check_lustre.pl

index 56d20561598ab950f4fe1be64744d230786610a4..db50c41396699400aa24fda9886974ae8276ddb3 100755 (executable)
@@ -32,10 +32,10 @@ if($opt_h){
     exit(0);
 }
 
-my  $status     : shared = "OK";        #- status reported by Nagios
-our $time_ls    : shared = &getTime();
-my  $sleep_time : shared = 10;         #- 10 minutes
-my  $ExitCode   : shared = -1;          #- used to stop threads
+my $status     : shared = "OK";        #- status reported by Nagios
+my $time_ls    : shared = &getTime();
+my $sleep_time : shared = 10;         #- 10 minutes
+my $ExitCode   : shared = -1;          #- used to stop threads
 
 our $server_port = '50502';
 our $protocol    = 'tcp';
@@ -65,13 +65,12 @@ exit(0);
 
 sub main {
     
-    my $time_ls = &getTime();
+    $time_ls = &getTime();
     my $time_du = 0;
     my $lustre_size = 0;
 
     while (1)
     {
-       print "main: start while\n";
        if( $opt_s && abs($time_du - $time_ls) > 60*60*24 ){
            $lustre_size = &getTotalSize();
            $time_du = &getTime();
@@ -81,7 +80,7 @@ sub main {
        chomp($line);
        
        $time_ls = &getTime();
-       print "main: timels: $time_ls\n";
+
        if ($line eq "/lustre_alpha/hades/user") 
        {
            if($opt_s){
@@ -96,9 +95,7 @@ sub main {
            $status  = "CRITICAL - Lustre mount failure!";
        }
 
-       print "main: before sleep\n";
        sleep $sleep_time; # 10 minutes
-       print "main: after sleep\n";
     }
 }