On Mon, 3 Nov 2003, Taiwo Akinosho wrote:
> i have a small problem. i noticed that my hard drive is
> running out of space. Now this is what i have:
>
> Filesystem 1K-blocks Used Available Use% Mounted on
> /dev/sda3 11827756 5220456 6006472 47% /
> /dev/sda2 798508 27448 730496 4% /boot
> none 256632 0 256632 0% /dev/shm
> /dev/sda5 3154588 2648484 345860 89% /var
>
>
> i don't know why i decided to install in seperate partitions
> like this but i think it was recommended in an article i read.
The above partitions are generally recommended for a server installation.
However, each kind of server is different in how large the different
partitions needs to be and yours does not seem very balanced for the
purpose..
> my problem is that my access log is on /var which is almost
> out of space.
Then reduce the amount of logs stored, or move them somewhere else.
> i have various logs of access.log in my log. see them listed below.
>
> -rw-r--r-- 1 root root 0 Sep 20 16:35 access1.log
> -rw-r--r-- 1 squid squid 6944238 Nov 3 16:39 access.log
> -rw-r--r-- 1 squid squid 11971779 Nov 2 04:03 access.log.1.gz
> -rw-r--r-- 1 squid squid 12356802 Oct 26 04:02 access.log.2.gz
> -rw-r--r-- 1 squid squid 14609550 Oct 19 04:02 access.log.3.gz
> -rw-r--r-- 1 squid squid 8675025 Oct 12 04:02 access.log.4.gz
> -rw-r--r-- 1 squid squid 5850483 Oct 5 04:02 access.log.5.gz.
>
> my question is that can i safely delete the "access.log.*.gz" files files?
> what's the implication of doing so. i should let u know that i use
> SARG report.
Squid does not care how much logs you save, if any at all. This is
primarily an issue between you, your company policy and your statistics
program (i.e. SARG).
> is there a suggested neater way without manually having to delete access logs at
> intervals. something like a cyclic logging.
The Squid default is to rotate the logs, just keeping the last few days
worth of logs (or whatever log rotation interval you have configured in
your system). If you are using the built in log rotation mechanism in
Squid then the logfile_rotate directive controls how many old log files
will be kept each time "squid -k rotate" is run (usually invoked from
cron). Current log file is kept as access.log, the previous as
access.log.1, the one before that as access.log.2 etc up to logfile_rotate
number of files. The oldest is automatically deleted. Note: If you
manually compress the log files you will disturb this scheme as Squid does
not know about the compressed files and will continue rotating the log
file names as if the compressed files was not there, causing the
compressed log files to stay and waste disk space until manually deleted.
However, many binary Squid distributions are not using the simple built in
log rotation feature of Squid but instead rely on external log rotation
programs, usually the "logrotate" program which exists with the sole
purpose of rotating various log files. This program is far more flexible
than the built in mechanism, and the most notable feature is that it
allows the logs to be automatically compressed when rotated and knows how
to rotate the compressed log files. The logrotate configuration for Squid
is usually found in /etc/logrotate.d/squid and includes among other things
how many logs should be kept and how often the logs should be rotated.
Regards
Henrik
Received on Mon Nov 03 2003 - 09:13:41 MST
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:21:04 MST