aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Iurt/Process.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Iurt/Process.pm')
-rw-r--r--lib/Iurt/Process.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Iurt/Process.pm b/lib/Iurt/Process.pm
index 6982a65..ca649b7 100644
--- a/lib/Iurt/Process.pm
+++ b/lib/Iurt/Process.pm
@@ -104,7 +104,7 @@ sub perform_command {
$opt{freq} ||= 24;
$opt{type} ||= 'shell';
- plog('DEBUG', "Timeout $opt{timeout}");
+ plog('DEBUG', "Using timeout of $opt{timeout} seconds.");
my ($output, $fulloutput, $comment);
my ($kill, $pipe);
@@ -154,7 +154,7 @@ sub perform_command {
exit();
}
my $df = df $opt{log};
- if ($df->{per} == 100) {
+ if ($df->{per} >= 99) {
plog('WARN', "WARNING: killing current command because running out of disk space (only $df->{bavail}KB left)");
kill 14, "-$parent_pid";
exit();
@@ -190,6 +190,8 @@ sub perform_command {
};
$err = $?;
+ # <mrl> Log it before any changes on it.
+ plog ('DEBUG', "Command exited with $err.");
$err = 0 if any { $_ == $err } @{$opt{error_ok}};
# kill pid watching log file size