Cao, Lixia wrote: > Hello, > > I have a question on the -tail option when using sec.pl. > > If I have the log file open, now run the sec.pl script, the script will > wait for input. Modify the log file, say, append a line at the end of > file, then run sec.pl again, the output will show the following: > > Input file /apollo/staging/router/scripts/automation/test.log has been > recreated > Shuffled /apollo/staging/router/scripts/automation/test.log, reopening > and processing from the start > > Then it will write all matches of the entire file. > > Question: > > Shouldn't the script only output what's been added? Meaning, why it > thinks the file has been recreated?
SEC reopens the log file and processes it from the start only if the i-node number of the file has changed. I-node number should never change for a file that has not been removed first and then recreated -- even if you empty the file truncate(2) system call, the i-node number stays the same. Since the name of your input file begins with '/apollo' which looks like a server name to me, I am suspecting that SEC is processing a log file from a network file system. If so, what's the type of the file system (NFS or something else)? In principle, I could implement an option for SEC that switches off all input file sanity checks -- but then you'd have to force SEC manually to reopen its inputs after each log file rotation. br, risto > > Thanks for any advice, > Alicia > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > Simple-evcorr-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/simple-evcorr-users > ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Simple-evcorr-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/simple-evcorr-users
