Gentoo Archives: gentoo-user

From: Arnau Bria <arnau@×××××××××.net>
To: gentoo-user@l.g.o
Subject: [gentoo-user] logrotate not working
Date: Tue, 25 Sep 2007 10:22:17
Message-Id: 20070925120609.46ea691c@lx-arnau.pic.es
1 Hi,
2
3 I have this in my logroate.d/apache
4 # Apache2 logrotate snipet for Gentoo Linux
5 # Contributes by Chuck Short
6 #
7 /var/log/apache2/*log {
8 daily
9 missingok
10 notifempty
11 size 5M
12 sharedscripts
13 postrotate
14 /etc/init.d/apache2 reload > /dev/null 2>&1 || true
15 endscript
16 }
17
18 And my logs are:
19
20 # ls -lsah blog_log_access_common
21 20M -rw-r--r-- 1 root root 20M sep 25 12:04 blog_log_access_common
22 196K -rw-r--r-- 1 apache apache 190K feb 18 2007 blog_log_access_common.10.gz
23 152K -rw-r--r-- 1 apache apache 147K feb 16 2007 blog_log_access_common.11.gz
24 128K -rw-r--r-- 1 apache apache 122K feb 13 2007 blog_log_access_common.12.gz
25 236K -rw-r--r-- 1 apache apache 232K feb 10 2007 blog_log_access_common.13.gz
26 208K -rw-r--r-- 1 apache apache 203K feb 3 2007 blog_log_access_common.14.gz
27 188K -rw-r--r-- 1 apache apache 182K ene 30 2007 blog_log_access_common.15.gz
28 168K -rw-r--r-- 1 apache apache 163K mar 11 2007 blog_log_access_common.1.gz
29 196K -rw-r--r-- 1 apache apache 190K mar 9 2007 blog_log_access_common.2.gz
30 160K -rw-r--r-- 1 apache apache 156K mar 7 2007 blog_log_access_common.3.gz
31 164K -rw-r--r-- 1 apache apache 159K mar 5 2007 blog_log_access_common.4.gz
32 252K -rw-r--r-- 1 apache apache 245K mar 3 2007 blog_log_access_common.5.gz
33 152K -rw-r--r-- 1 apache apache 148K mar 1 2007 blog_log_access_common.6.gz
34 172K -rw-r--r-- 1 apache apache 166K feb 26 2007 blog_log_access_common.7.gz
35 168K -rw-r--r-- 1 apache apache 162K feb 23 2007 blog_log_access_common.8.gz
36 208K -rw-r--r-- 1 apache apache 201K feb 21 2007 blog_log_access_common.9.gz
37
38
39 I run it:
40
41 afrodita apache2 # /usr/sbin/logrotate /etc/logrotate.conf
42 afrodita apache2 #
43
44 And again:
45 20M -rw-r--r-- 1 root root 20M sep 25 12:04 blog_log_access_common
46 196K -rw-r--r-- 1 apache apache 190K feb 18 2007 blog_log_access_common.10.gz
47 152K -rw-r--r-- 1 apache apache 147K feb 16 2007 blog_log_access_common.11.gz
48 128K -rw-r--r-- 1 apache apache 122K feb 13 2007 blog_log_access_common.12.gz
49 236K -rw-r--r-- 1 apache apache 232K feb 10 2007 blog_log_access_common.13.gz
50 208K -rw-r--r-- 1 apache apache 203K feb 3 2007 blog_log_access_common.14.gz
51 188K -rw-r--r-- 1 apache apache 182K ene 30 2007 blog_log_access_common.15.gz
52 168K -rw-r--r-- 1 apache apache 163K mar 11 2007 blog_log_access_common.1.gz
53 196K -rw-r--r-- 1 apache apache 190K mar 9 2007 blog_log_access_common.2.gz
54 160K -rw-r--r-- 1 apache apache 156K mar 7 2007 blog_log_access_common.3.gz
55 164K -rw-r--r-- 1 apache apache 159K mar 5 2007 blog_log_access_common.4.gz
56 252K -rw-r--r-- 1 apache apache 245K mar 3 2007 blog_log_access_common.5.gz
57 152K -rw-r--r-- 1 apache apache 148K mar 1 2007 blog_log_access_common.6.gz
58 172K -rw-r--r-- 1 apache apache 166K feb 26 2007 blog_log_access_common.7.gz
59 168K -rw-r--r-- 1 apache apache 162K feb 23 2007 blog_log_access_common.8.gz
60 208K -rw-r--r-- 1 apache apache 201K feb 21 2007 blog_log_access_common.9.gz
61
62 And logroate.conf:
63 # cat /etc/logrotate.conf |grep .|grep -v "^#"
64 weekly
65 rotate 4
66 create
67 compress
68 include /etc/logrotate.d
69 notifempty
70 nomail
71 noolddir
72 /var/log/wtmp {
73 monthly
74 create 0664 root utmp
75 rotate 1
76 }
77
78 # eix -c logrotate
79 [I] app-admin/logrotate (3.7.2@12/03/07): Rotates, compresses, and mails system logs
80
81 Any clue on what's happening?¿
82 TIA
83
84 --
85 Arnau Bria
86 http://blog.emergetux.net
87 Bombing for peace is like fucking for virginity
88 --
89 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] logrotate not working Neil Bothwick <neil@××××××××××.uk>