in reply to Re^2: invoke shell with `` failed
in thread invoke shell with `` failed
sub detect_disk { my ($flag, $dir) = @_; my $available_space = `df $dir`; my @array = split(/\s+/, $available_space); $available_space = $array[10]; if ($flag eq 'entry' and $available_space < 6000000) { print ("NOTICE: The left space of $dir is $available_space (KB +), please make sure enough space is available for the regresssion.\n\ +n"); } elsif ($flag eq 'routine' and ($available_space < 1000000)) { print ("NOTICE: The left space of $dir is $available_space (KB +), regression will waiting!\n"); sleep 60; while ($available_space < 1000000) { # send_mail($mail_list, $report_title, $report_file); $available_space = `df $dir`; @array = split(/\s+/, $available_space); $available_space = $array[10]; sleep 60; } } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: invoke shell with `` failed
by Porculus (Hermit) on Apr 15, 2009 at 08:38 UTC |