How long does 'squid -k rotate' take to rotate logs?
I have a small problem with my custom squid log rotation script. In
summary it does a few checks that files and directories exist and then
essentially issues the standard 'squid -k rotate' command to rotate
Immediately after that it''ll check that access.log.0, cache.log.0 and
store.log.0 exists and then tries to rename them to the date and time
stamp. For example:
After which it will compress these logs using gzip. It should be
obvious, but I schedule the script at 23:59 in cron.
What I am finding is that the rotation works so that I get access.log.
0, cache.log.0 and store.log.0 but I get errors in my logs saying that
these file do not exist. Whenever I run this in a test environment
without modifying the script I find it works flawlessly.
It leads me to either rightly or wrongly conclude that perhaps there's
a delay between issuing the 'squid -k rotate' command when when they
are actually rotated to their respective .0 filenames.
What I would like to know is:
1. Is there a delay after the rotate command is issued and the files
are each respectively their .0 versions?
2. How long should I sleep between issuing the rotate command and then
trying to rename them?
3. Does the rotate command cut off existing connections via the
proxies? I'm reading some signs on the Internet newsgroups that this
may be the case, but then in other places I read that 'squid -k
rotate' wont affect existing caching activities.
Thanks in advance.