What I need to do is parse that log file every 5 minutes and find out if within the past 30 minutes there was at least 1 STATUS = SUCCESS line, and at least 1 line containing a non-zero value in a "Found 0 items to send to Media Manager" string. I can't really think of a good way / logic to parse specifically last 30 minutes of that log file.. My logic goes something like: get current date at the time the script's ran subtract 30 minutes from it, and find the line in the log file that corresponds to that timestamp .... how do i go forward on from there? i know regular expressions, thats not the problem, i just dont know how to tell the script to start looking only from that 1 line forward Any ideas ? :)2007-02-28 15:24:52,374 INFO [MMSRequestSender] Found 0 items to send + to Media Manager 2007-02-28 15:24:54,221 INFO [MMSResponseListener] MOVING RECORD WITH + OCCURRENCEID: 382228162 TO MEDIAREQUESTQHISTORY. STATUS = FAILURE 2007-02-28 15:24:55,209 INFO [MMSResponseListener] MOVING RECORD WITH + OCCURRENCEID: 382228170 TO MEDIAREQUESTQHISTORY. STATUS = FAILURE 2007-02-28 15:24:56,362 INFO [MMSResponseListener] MOVING RECORD WITH + OCCURRENCEID: 382169066 TO MEDIAREQUESTQHISTORY. STATUS = FAILURE 2007-02-28 15:24:57,496 INFO [MMSResponseListener] MOVING RECORD WITH + OCCURRENCEID: 382221366 TO MEDIAREQUESTQHISTORY. STATUS = FAILURE 2007-02-28 15:24:58,540 INFO [MMSResponseListener] MOVING RECORD WITH + OCCURRENCEID: 382208089 TO MEDIAREQUESTQHISTORY. STATUS = FAILURE 2007-02-28 15:24:59,629 INFO [MMSResponseListener] MOVING RECORD WITH + OCCURRENCEID: 382208089 TO MEDIAREQUESTQHISTORY. STATUS = FAILURE 2007-02-28 15:25:00,933 INFO [MMSResponseListener] MOVING RECORD WITH + OCCURRENCEID: 382237543 TO MEDIAREQUESTQHISTORY. STATUS = FAILURE 2007-02-28 15:25:04,037 INFO [MMSResponseListener] MOVING RECORD WITH + OCCURRENCEID: 381722093 TO MEDIAREQUESTQHISTORY. STATUS = FAILURE 2007-02-28 15:25:06,987 INFO [MMSResponseListener] MOVING RECORD WITH + OCCURRENCEID: 381722093 TO MEDIAREQUESTQHISTORY. STATUS = FAILURE 2007-02-28 15:25:41,545 INFO [MMSResponseListener] MOVING RECORD WITH + OCCURRENCEID: 382246716 TO MEDIAREQUESTQHISTORY. STATUS = SUCCESS 2007-02-28 15:25:52,375 INFO [MMSRequestSender] Found 4 items to send + to Media Manager 2007-02-28 15:26:08,050 INFO [MMSResponseListener] MOVING RECORD WITH + OCCURRENCEID: 382237436 TO MEDIAREQUESTQHISTORY. STATUS = SUCCESS
In reply to Parsing a specific section of a log file by vxp
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |