1834156 Members
2262 Online
110064 Solutions
New Discussion

Tail termination

 
dude70_1
Advisor

Tail termination

Hi Guys,

I have a process(executed in script no. 1) which after starting writes messages to a log file. I have another script(script 2) at the end of script 1 continuously tailing the log file. The tailing starts and in a while gets terminated. what could be the problem? The log file name remains same and it is not swapped and all!

Thanks.
2 REPLIES 2
Todd McDaniel_1
Honored Contributor

Re: Tail termination

Is your input file for the tail a continuous stream of data? Are their gaps of time where no data flows? I believe I remember a timeout for tail after a certain period.

I know tail -f has a 1 second delay if there is no data read in.

Also, tail has a buffer. If you are using pipes here is a warning from the man page...

quote
" Therefore, be wary of the results when
piping output from other commands into tail."

Unix, the other white meat.
G. Vrijhoeven
Honored Contributor

Re: Tail termination

Hi,

If i understand correct script 1 starts script2 so script 2 will be the child of script one. Script 2 will erminated when its perant dies. To aviod this start the tail in a with a nohup.

Gideon