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

index db50c41396699400aa24fda9886974ae8276ddb3..5f528290b10fd2f4a59ad4e0c49fce460a9efc68 100755 (executable)
@@ -34,7 +34,7 @@ if($opt_h){
 
 my $status     : shared = "OK";        #- status reported by Nagios
 my $time_ls    : shared = &getTime();
-my $sleep_time : shared = 10;         #- 10 minutes
+my $sleep_time : shared = 600;         #- 10 minutes
 my $ExitCode   : shared = -1;          #- used to stop threads
 
 our $server_port = '50502';
@@ -105,8 +105,8 @@ sub statusServer{
     my $client_socket;
     my $selector;
 
-    # To decrease a wait time for socket, use 
-    # ReuseAddr with Linux and ReusePort with OpenBSD
+    #- To decrease a wait time for socket, use 
+    #- ReuseAddr with Linux and ReusePort with OpenBSD
     unless (defined( $server_socket =
                      IO::Socket::INET->new( LocalPort => $server_port,
                                             Proto     => 'tcp',
@@ -137,9 +137,7 @@ sub statusServer{
 
                    #--- report the status
                    my $current_time = &getTime();
-                   my $time_diff = abs($current_time - $time_ls);
-                   my $itimediff = int((abs($current_time - $time_ls))/60);
-                   print "curtime: $current_time timels: $time_ls timediff: $time_diff itimediff: $itimediff\n";
+
                    if( abs($current_time - $time_ls) < 3*$sleep_time ){
                        print $client_socket $status;
                    }