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';
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();
chomp($line);
$time_ls = &getTime();
- print "main: timels: $time_ls\n";
+
if ($line eq "/lustre_alpha/hades/user")
{
if($opt_s){
$status = "CRITICAL - Lustre mount failure!";
}
- print "main: before sleep\n";
sleep $sleep_time; # 10 minutes
- print "main: after sleep\n";
}
}