diff options
author | Marcelo Leitner <mrl@mandriva.com> | 2007-11-12 09:36:39 +0000 |
---|---|---|
committer | Marcelo Leitner <mrl@mandriva.com> | 2007-11-12 09:36:39 +0000 |
commit | 3f28445fdfa9a063db48a022a100b365429d666f (patch) | |
tree | 49396851b4659bb294d67e7e57614e107bf0bde8 /lib/Iurt/Process.pm | |
parent | d5cf6dd9c5a5e191f2e6b6e2c4f7ec0f77c77647 (diff) | |
download | iurt-3f28445fdfa9a063db48a022a100b365429d666f.tar iurt-3f28445fdfa9a063db48a022a100b365429d666f.tar.gz iurt-3f28445fdfa9a063db48a022a100b365429d666f.tar.bz2 iurt-3f28445fdfa9a063db48a022a100b365429d666f.tar.xz iurt-3f28445fdfa9a063db48a022a100b365429d666f.zip |
- Put some more debugging into command execution process.
- Lowered free disk space tolerance from 100% to 99%, as 100% could be too
late.
Diffstat (limited to 'lib/Iurt/Process.pm')
-rw-r--r-- | lib/Iurt/Process.pm | 6 |
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 |