Looking into the recent time logs

Hi Folks,

I have to monitor a several logs file which I do mostly by tails -f command but now I want that when i tail the logs it should show me the logs of 10 mins before as I do not want to see the logs of all the time which are even 1 hour old i, i just want to see the latest logs of 20 mins before below is the snapshot that how the logs are recorded

18-Oct-2013 20:05.58.878 ERROR [NDC=] [BIBCO  (2954357666681)] com.abc.def.ghtimpl There was a problem commiting the resource null

What version of OS ( uname -a ) are you running?
Also what version of awk ( awk -V )?

---------- Post updated at 12:32 PM ---------- Previous update was at 12:00 PM ----------

If you have GNU awk (most modern Linux OS flavours do) then this awk script should give you anything newer than 10mins adjust last line for actual mins you require.

kudos go to ahamed101 for the original solution to a problem very similar to this.

awk '
 BEGIN{
    split("Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec",m);
    for(i=1;i<12;i++) mth[m]=i
 }
 {
  split($1,a,"-");split($2,b,"[:.]");
  sec=mktime(a[3]" "mth[a[2]]" "a[1]" "b[1]" "b[2]" "b[3]);
  diff=(systime()-sec)/60
 }
 diff<11' file.log