I'm trying to figure a way to monitor one of our log files.
A cron job runs every 5 minutes which outputs the following line in a log file:
I'd like something akin to
cat log | grep $DATE $TIME within 10 minutes of $SYSTEMTIME
This log is currently 2MB, so i'm not sure if this is wasting too much resources, not that the server doesn't have lots of extra resources, but cat'ing a 2MB text file seems like a lot of data to parse every 15 minutes.
Suggestions? I've found lots of examples on searching for a specific date/time, but i need the date/time to be relative to when the search is performed.