Clear questions and runnable code
get the best and fastest answer
log parserby alex_fatu (Novice)
|on Jun 17, 2013 at 07:36 UTC||Need Help??|
alex_fatu has asked for the
wisdom of the Perl Monks concerning the following question:
hi there, monks!
i am new to Perl.
i am a Java, C/C++/C# programmer, recently i also administrate some servers and i need to make a log parser.
let's say my logs size its aprox 2Go. after some test of parsing a simple text i have the next results:
soft powergrep(windows7) - aprox 5 mins
powershell script made by me (new to powershell also) - aprox 5 min
Perl script - aprox 1 min (maximum) - i think..if i will use regexp it will go to 40 sec..maybe.. (today is the first day using Perl, Powershell, scripts)
what i need from this script. Let's say that my log have errors..like DB error ORA-xxxx etc. If i find ORA-xxxx ..maybe print this in a new log and ..the most important: send an e-mail and a text message on my phone.
I need some ideas, please..best practices..i'm sure that i'm not the only one who needs this script.. maybe one of you have something like this...
any info is very useful
btw..this is the script with 1 min search result: