Howdy, everyone. Back in October 2003, we set up a Squid 2.4(?) proxy, and thought it was quite nice. It turns out, however, that we never set up a rule for logging and log rotation. Our "store.log" file is gargantuan, and darn near filling up the HD space we have left.
Good lord, you were lucky. I'd fill up my disk in about 10 days.
I want to gamble, and say that we don't need the information in either access.log or store.log. If I were to close out squid this afternoon, and I were to delete those files, would I cause any significant problems to the system?
If you stopped squid, no, no danger. When it started up again it would simply recreate them.
I don't think I have enough time (or swap space) to do the "kill -USR1" solution, and nothing happened when I entered "squid -k rotate", so I'd just like to kill the files altogether and start over. Will this hurt?
It's odd that nothing happened when you asked it to rotate. Do you have the logfile_rotate parameter set to something? Did you perform a squid -k reconfigure to tell squid to pick it up?
What you should see is a slew of lines in cache.log that go something like:
2005/03/01 00:01:09| storeDirWriteCleanLogs: Starting... 2005/03/01 00:01:10| 65536 entries written so far. 2005/03/01 00:01:11| 131072 entries written so far. [...] 2005/03/01 00:01:15| 1900544 entries written so far. 2005/03/01 00:01:15| 1966080 entries written so far. 2005/03/01 00:01:15| Finished. Wrote 1974087 entries. 2005/03/01 00:01:15| Took 5.2 seconds (382552.3 entries/sec). 2005/03/01 00:01:15| logfileRotate: /var/squid/store.log 2005/03/01 00:01:15| logfileRotate: /var/squid/access.log
... and afterwards the logs are rotated. Once this works you can add a crontab entry and forget about for the next two years :)
Thanks
Eric Geater egeater at mscoinc dot com