shell script that can create, monitor the log files and report the issues for matching pattern

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!

  1. The problem statement, all variables and given/known data:

Write an automated shell program(s) that can create, monitor the log files and report the issues for matching pattern.

(i) Conditions for creating log files.
Log file is created with date (example 2010_03_27.log). If the log file size is 10 Mb for a particular day then automatically the log file will be rotated with sequence number (example, on a particular day if the log file crossed 10 MB while the data insert ii n progress, the program should rotate the log file with a sequence number YYYY_MM_DD_sequence_number.log)

(ii) Condition for reading the data for pattern matching
The report with matched pattern should be reported at the earliest for effective business decision. The data that is already processed shouldn't be considered for analysis for pattern matching.

Example file with sample data and mattching patterns

file01.log
2010-03-18 24:50:50:500: WorkingThread-1:User_Authorization_Failed session-id-10002033
2010-03-18 24:50:50:550: WorkingThread-1:User_Authentication_Failed session-id-10002033
2010-03-18 24:52:50:500: WorkingThread-1:User_Access_Locked session-id-10002033

Analyze the log for following pattern's:

  1. Report number of 'User_Authorization_Failed'

  2. Report number of 'User_Authentication_Failed'

  3. Report number of 'User_Access_Locked'

  4. Relevant commands, code, scripts, algorithms:

  5. The attempts at a solution (include all code and scripts):

  6. Complete Name of School (University), City (State), Country, Name of Professor, and Course Number (Link to Course):

University of pune, pune, india, sheshan, 312 Unix

Note: Without school/professor/course information, you will be banned if you post here! You must complete the entire template (not just parts of it).