|
|
@ -10,8 +10,8 @@ $t = new Proc::ProcessTable; |
|
|
|
foreach $p ( @{$t->table} ){ |
|
|
|
foreach $p ( @{$t->table} ){ |
|
|
|
next unless $p->cmndline =~ m#^/usr/bin/qpsmtpd-forkserver#; |
|
|
|
next unless $p->cmndline =~ m#^/usr/bin/qpsmtpd-forkserver#; |
|
|
|
my $diff = time - $p->start; |
|
|
|
my $diff = time - $p->start; |
|
|
|
# Process is more than 30 minutes old ? |
|
|
|
# Process is more than 1 hour old ? |
|
|
|
if ($diff > 1800){ |
|
|
|
if ($diff > 3600){ |
|
|
|
syslog('info', "Killing PID " . $p->pid . "(" . $p->cmndline . |
|
|
|
syslog('info', "Killing PID " . $p->pid . "(" . $p->cmndline . |
|
|
|
") because it looks like a stalled qpsmtpd process"); |
|
|
|
") because it looks like a stalled qpsmtpd process"); |
|
|
|
$p->kill(9); |
|
|
|
$p->kill(9); |
|
|
|