diff -up logwatch-7.3.6/scripts/services/init.pom logwatch-7.3.6/scripts/services/init --- logwatch-7.3.6/scripts/services/init.pom 2006-12-20 16:25:09.000000000 +0100 +++ logwatch-7.3.6/scripts/services/init 2008-08-26 12:58:15.000000000 +0200 @@ -34,6 +34,9 @@ while (defined($ThisLine = <STDIN>)) { chomp ($ThisLine); $ReExecInit++; } + elsif ( ($Name,$Cause) = ($ThisLine =~ /(.*) main process \([0-9]*\) killed by (.*) /)) { + $ProcessKilled{"$Name,$Cause"}++; + } else { # report any unmatched entries push @OtherList,$ThisLine; @@ -45,10 +48,19 @@ if ((keys %RunLevel) and ($Detail >= 10) print " Entered or switched to runlevel " . $Level . ": " . $RunLevel{$Level} . " Time(s)\n"; } } + if ($ReExecInit) { print "\n\nRe-execs of init: $ReExecInit times\n"; } +if ((keys %ProcessKilled) and ($Detail >=10)) { + print "\nKilled processses:\n"; + foreach (keys %ProcessKilled) { + my ($Name,$Cause)=split ","; + print " Process " . $Name. " killed by " . $Cause . ": " . $ProcessKilled{"$Name,$Cause"} . " Time(s)\n"; + } +} + if ($#OtherList >= 0) { print "\n**Unmatched Entries**\n"; print @OtherList;