Good Day,
We have the following log file. At certain intervals, we want to ensure that three engines are referred to in this log file. So I thought of tailing the log file and search for these three strings – "for engine 0", "for engine 1" and "for engine 2".
Is there an elegant way to write the grep logic?
10/12/2009 11:43:53 [1] ChildID=707908 IndexID=4775801 for engine 0, cmd /DREADDDATA?DREDBNAME=autowire
10/12/2009 11:43:53 [3] [2] Time to send command 0.00 secs.
10/12/2009 11:43:53 [3] ChildID=708433 IndexID=4775801 for engine 2, cmd /DREADDDATA?DREDBNAME=autowire
10/12/2009 11:43:53 [2] [1] Time to send command 0.00 secs.
10/12/2009 11:43:53 [2] ChildID=707899 IndexID=4775801 for engine 1, cmd /DREADDDATA?DREDBNAME=autowire
10/12/2009 11:44:09 [0] Index command from 10.240.81.248 allowed
10/12/2009 11:44:09 [0] Streamed 5.03 kB (5153 bytes) to disk in 0.00 secs. Rate 11718.75 kB/s.
10/12/2009 11:44:09 [0] Index Queue Command: /DREADDDATA?DREDBNAME=pr
10/12/2009 11:44:09 [0] Saved command file to disk. IndexID=4775802.
10/12/2009 11:44:09 [1] [0] Time to send command 0.00 secs.
10/12/2009 11:44:09 [1] ChildID=707909 IndexID=4775802 for engine 0, cmd /DREADDDATA?DREDBNAME=pr
10/12/2009 11:44:09 [3] [2] Time to send command 0.00 secs.
10/12/2009 11:44:09 [3] ChildID=708434 IndexID=4775802 for engine 2, cmd /DREADDDATA?DREDBNAME=pr
10/12/2009 11:44:09 [2] [1] Time to send command 0.00 secs.
10/12/2009 11:44:09 [2] ChildID=707900 IndexID=4775802 for engine 1, cmd /DREADDDATA?DREDBNAME=pr
Regards,
Dan
We have the following log file. At certain intervals, we want to ensure that three engines are referred to in this log file. So I thought of tailing the log file and search for these three strings – "for engine 0", "for engine 1" and "for engine 2".
Is there an elegant way to write the grep logic?
10/12/2009 11:43:53 [1] ChildID=707908 IndexID=4775801 for engine 0, cmd /DREADDDATA?DREDBNAME=autowire
10/12/2009 11:43:53 [3] [2] Time to send command 0.00 secs.
10/12/2009 11:43:53 [3] ChildID=708433 IndexID=4775801 for engine 2, cmd /DREADDDATA?DREDBNAME=autowire
10/12/2009 11:43:53 [2] [1] Time to send command 0.00 secs.
10/12/2009 11:43:53 [2] ChildID=707899 IndexID=4775801 for engine 1, cmd /DREADDDATA?DREDBNAME=autowire
10/12/2009 11:44:09 [0] Index command from 10.240.81.248 allowed
10/12/2009 11:44:09 [0] Streamed 5.03 kB (5153 bytes) to disk in 0.00 secs. Rate 11718.75 kB/s.
10/12/2009 11:44:09 [0] Index Queue Command: /DREADDDATA?DREDBNAME=pr
10/12/2009 11:44:09 [0] Saved command file to disk. IndexID=4775802.
10/12/2009 11:44:09 [1] [0] Time to send command 0.00 secs.
10/12/2009 11:44:09 [1] ChildID=707909 IndexID=4775802 for engine 0, cmd /DREADDDATA?DREDBNAME=pr
10/12/2009 11:44:09 [3] [2] Time to send command 0.00 secs.
10/12/2009 11:44:09 [3] ChildID=708434 IndexID=4775802 for engine 2, cmd /DREADDDATA?DREDBNAME=pr
10/12/2009 11:44:09 [2] [1] Time to send command 0.00 secs.
10/12/2009 11:44:09 [2] ChildID=707900 IndexID=4775802 for engine 1, cmd /DREADDDATA?DREDBNAME=pr
Regards,
Dan