Hello again,
I have a problem with the logs on the server of my work, the log semm to be just keep going, the logrotate have no effect on it.
2 moutns now and it just don't rotate.
ls -l of the /var/log is this
Code:
-rw-r----- 1 root root 2871 Jan 26 2003 acpid
-rwxr-xr-x 1 root root 19925 Jan 4 2003 anaconda.log
-rwxr-xr-x 1 root root 43907 Jan 4 2003 anaconda.syslog
-rw------- 1 root root 129072 Feb 6 16:06 boot.log
-rw------- 1 root root 2890 Jan 19 2003 boot.log.1
-rw------- 1 root root 10303 Jan 12 2003 boot.log.2
-rw------- 1 root root 8134 Jan 5 2003 boot.log.3
-rw------- 1 root root 330494 Feb 6 16:44 cron
-rw------- 1 root root 337529 Jan 19 2003 cron.1
-rw------- 1 root root 337811 Jan 12 2003 cron.2
-rw------- 1 root root 53242 Jan 5 2003 cron.3
drwxr-xr-x 2 lp sys 4096 Jan 19 2003 cups
-rw-r--r-- 1 root root 10668 Feb 6 14:09 dmesg
drwx------ 2 root root 4096 Oct 15 2004 httpd
drwx------ 2 root root 4096 Jul 31 2003 iptraf
-r-------- 1 root root 19136220 Feb 6 14:14 lastlog
drwxr-xr-x 2 root root 4096 Jan 4 2003 mail
-rw------- 1 root root 8761 Jan 26 2003 maillog
-rw------- 1 root root 8359 Jan 19 2003 maillog.1
-rw------- 1 root root 10454 Jan 12 2003 maillog.2
-rw------- 1 root root 3160 Jan 5 2003 maillog.3
-rw------- 1 root root 17164698 Feb 6 16:58 messages
-rw------- 1 root root 558666 Jan 19 2003 messages.1
-rw------- 1 root root 620166 Jan 12 2003 messages.2
-rw------- 1 root root 143473 Jan 5 2003 messages.3
drwx------ 2 root root 4096 Nov 2 2004 ppp
-rw-r--r-- 1 root root 12958 Jan 25 2003 prelink.log
-rw-r--r-- 1 root root 3365 Jan 4 2003 prometheus
-rw-r--r-- 1 root root 10813 Jan 25 2003 rpmpkgs
-rw-r--r-- 1 root root 10813 Jan 18 2003 rpmpkgs.1
-rw-r--r-- 1 root root 10813 Jan 11 2003 rpmpkgs.2
-rw-r--r-- 1 root root 10813 Jan 4 2003 rpmpkgs.3
drwx------ 2 root root 4096 Oct 19 2004 samba
-rw------- 1 root root 5400367 Feb 6 14:30 secure
-rw------- 1 root root 248 Jan 18 2003 secure.1
-rw------- 1 root root 992 Jan 11 2003 secure.2
-rw------- 1 root root 672 Jan 4 2003 secure.3
-rw------- 1 root root 0 Jan 19 2003 spooler
-rw------- 1 root root 0 Jan 12 2003 spooler.1
-rw------- 1 root root 0 Jan 5 2003 spooler.2
-rw------- 1 root root 0 Jan 4 2003 spooler.3
drwxr-x--- 2 squid squid 4096 Aug 3 2003 squid
drwxr-xr-x 2 root root 4096 Oct 5 2004 vbox
-rw-rw-r-- 1 root utmp 1546368 Feb 6 14:14 wtmp
-rwxr-xr-x 1 root root 265 Aug 1 2003 yum.log
as you can see, messeges and secure logs are just going and going with the zise.
my logrotate.conf
Code:
# see "man logrotate" for details
# rotate log files weekly
weekly
# keep 4 weeks worth of backlogs
rotate 4
# create new (empty) log files after rotating old ones
create
# uncomment this if you want your log files compressed
#compress
# RPM packages drop log rotation information into this directory
include /etc/logrotate.d
# no packages own wtmp -- we'll rotate them here
/var/log/wtmp {
monthly
create 0664 root utmp
rotate 1
}
# system-specific logs may be also be configured here.
i need the log to restart rotating, if posible every 2 weeks, and just keep 4 backlogs for 4 weeks and the erase the older one.
Is it posible?
Thanks in advance