On Friday, May 17, 2002, at 03:18 , loan tran wrote: > My question are: > > 1. Is there a way to make search_error.pl continue to > read the errorlog_file after it was pruned without > restarting the script. > > 2. In the situation I have to restart the script (like > in case of machine have been bounced), I dont want the > script starts reading from the beginning of > errorlog_file, I want it skips to the line where it > stopped. How can I make this happens. > > Thanks in advance for your input. > > Loan Tran
[..] What you have here is the classic LogRolling Problem. what you want is a Signal Handler - $SIG{HUP} = \&rollLog; sub rollLog { # our premise is that the log file was already open } an illustration is at: http://www.wetware.com/drieux/pbl/Sys/logRollModel.txt you might want to think about doing this as a real daemon http://www.wetware.com/drieux/pbl/Sys/daemon1.txt I understand that in the last five seconds - a lot of grot can roll in and it may take an arbitrarily long amount of time to get back to grovelling that log file - but have you thought about upping the sleeptime to allow other processes on the host a chance to use the system ??? ciao drieux --- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]