summaryrefslogtreecommitdiffstats
path: root/examples/scripts/eventlog
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2005-11-07 13:43:06 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:05:19 -0500
commitd1e1766c08b48660a021f7e26dc3ca4eebc05563 (patch)
treef595068a50dc3c1a2e2cd3cb66d4346bfa4a86a6 /examples/scripts/eventlog
parent47873110838038a864c964682b3bd200ce977f88 (diff)
downloadsamba-d1e1766c08b48660a021f7e26dc3ca4eebc05563.tar.gz
samba-d1e1766c08b48660a021f7e26dc3ca4eebc05563.tar.xz
samba-d1e1766c08b48660a021f7e26dc3ca4eebc05563.zip
r11548: adding simple script to tail syslog and write to eventlog tdb
(This used to be commit 9337a286c9169e1e0247b5923942eeeb4467d95a)
Diffstat (limited to 'examples/scripts/eventlog')
-rw-r--r--examples/scripts/eventlog/parselog.pl8
1 files changed, 8 insertions, 0 deletions
diff --git a/examples/scripts/eventlog/parselog.pl b/examples/scripts/eventlog/parselog.pl
new file mode 100644
index 00000000000..0a2b5b90dcc
--- /dev/null
+++ b/examples/scripts/eventlog/parselog.pl
@@ -0,0 +1,8 @@
+while(<>) {
+ chomp();
+ @le = split '\s+',$_,5;
+ $ln = $le[4];
+ $cname = $le[3];
+ $outstr = sprintf "TMG: %d\nTMW: %d\nEID: 1000\nETP: INFO\nECT: 0\nRS2: 0\nCRN: 0\nUSL: 0\nSRC: Syslog\nSRN: $cname\nSTR: $ln\nDAT:\n\n",time(),time();
+ print $outstr;
+}