command to find out elapsed time of logfile since last write
Hi, I need to write a script which will continuously monitor a logfile and if nothing is written in that file for 500 miliseconds it will invoke a kill -3 signal to generate core dump. Any help or suggestion to achieve this is highly appreciated.
|
Code:
[schneidz@hyper ~]$ touch mrajdeep.txt |
Thanks for your response, but how do I determine if 500 miliseconds have passed since the file was last modified.
|
maybe the awk command can help check the difference in time... maybe you could convert the yyyy-mm-dd hh:mm:ss.xxxxxxxxx into some sort of unix time ?
|
All times are GMT -5. The time now is 07:47 PM. |