From 16b8ab2789a61f7d4c7ece7a2c2e0583f03cd2c6 Mon Sep 17 00:00:00 2001 From: hadaq Date: Thu, 29 Jan 2009 13:04:08 +0000 Subject: [PATCH] debugging. Sergey. --- plugins/check_lustre.pl | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/plugins/check_lustre.pl b/plugins/check_lustre.pl index 56d2056..db50c41 100755 --- a/plugins/check_lustre.pl +++ b/plugins/check_lustre.pl @@ -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"; } } -- 2.43.0