06-19-2008, 09:30 AM
|
#1 (permalink)
|
|
The Contributor
Join Date: Feb 2008
Location: Pretoria, South Africa
Posts: 42
Thanks: 1
|
Samba log parser
Hey guys
Im looking to write a script to parse my samba logs and insert the data into a database. Problem is the text file samba writes, records arent placed on one line so it could go from 2 to 3 to even 5 lines per record. Each record is different so a similar exploding point isnt possible. Please give me some ideas of how one would seperate this data.
Example Records:
[2008/04/10 08:09:44, 0] lib/util_sock.c:get_peer_addr(1229)
getpeername failed. Error was Transport endpoint is not connected
[2008/04/30 11:51:36, 0] smbd/server.c:main(847)
smbd version 3.0.23d-6-1083-SUSE-SL10.2 started.
Copyright Andrew Tridgell and the Samba Team 1992-2006
Any input is appreciated :)
__________________
virtueCart v1.0.5 developed by WebDevSA
|
|
|