summaryrefslogtreecommitdiff
path: root/cron
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2020-04-16 00:24:39 +0200
committerErich Eckner <git@eckner.net>2020-04-16 00:24:39 +0200
commitecb99fa08f92ce5ff6ae7ecc2d5e7193be3f34ed (patch)
treebd656734d80c30ad3ec7c22e7b008537802e2a22 /cron
parent0c7942d700be27e72f0a8adac4e38cd5526dc6fe (diff)
downloadlogwatch-overrides-ecb99fa08f92ce5ff6ae7ecc2d5e7193be3f34ed.tar.xz
minimal stuff from fileserver
Diffstat (limited to 'cron')
-rw-r--r--cron10
1 files changed, 8 insertions, 2 deletions
diff --git a/cron b/cron
index abe0e9b..c5b1830 100644
--- a/cron
+++ b/cron
@@ -47,7 +47,8 @@ while (defined($ThisLine = <STDIN>)) {
# Ignore
} elsif (
($ThisLine =~ s/^([^ ]+) \([^ ]+\)\s+//) or
- ($ThisLine =~ s/^\S+\s+\S+\s+..:..:..\s+\S+\s+\S+\[(\d+)\]:\s+\((\S+)\)\s+//)
+ ($ThisLine =~ s/^\S+\s+\S+\s+..:..:..\s+\S+\s+\S+\[(\d+)\]:\s+\((\S+)\)\s+//) or
+ ($ThisLine =~ s/^\S+\s+\S+\s+..:..:..\s+\S+\s+\S+\[\d+\]:\s+//)
) {
$PID = $1;
$User = $2;
@@ -55,7 +56,12 @@ while (defined($ThisLine = <STDIN>)) {
if ($ThisLine =~ s/^CMD \((.+)\)\s*$/$1/) {
$Runs->{$User}->{$ThisLine}++;
$ExecutedCommand{$PID} = {command=>$ThisLine, user=>$User};
- } elsif ($ThisLine =~ s/^CMD FINISH \((.+)\)\s*$/$1/) {
+ } elsif ($ThisLine =~ s/^FILE .+ USER (\S+) PID (\d+) //) {
+ $PID = $2;
+ $User = $1;
+ $Runs->{$User}->{$ThisLine}++;
+ $ExecutedCommand{$PID} = {command=>$ThisLine, user=>$User};
+ } elsif ($ThisLine =~ s/^CMD FINISH \((.+)\)\s*$/$1/) {
$Runs->{$User}->{$ThisLine}++;
} elsif ($ThisLine =~ s/^(END|CMD START) \((.+)\)\s*$/$1/) {
#Ignore for now, NetBSD users could get tricky with