logwatch/logwatch-7.3.6-init.patch
Ivana Varekova 92df6bb9f7 - Resolves: #452044 handle 2.6.25+ audit messages
- add init script logs parsing
2008-06-20 09:47:46 +00:00

34 lines
1.2 KiB
Diff

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-06-20 10:39:00.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)) {
+ 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;