Package: logrotate
Version: 3.8.6-1
Severity: important

I just happened to notice that /var/log/syslog had not been rotated
in almost 1 month:

  % ls -l /var/log/syslog*
  -rw-r----- 1 root adm 16588618 Jan  9 14:21 /var/log/syslog
  -rw-r----- 1 root adm   336215 Dec 11 15:37 /var/log/syslog.1

Indeed, when I run logrotate, nothing happens:

  % sudo logrotate -d /etc/logrotate.d/rsyslog 2>&1 | grep -A2 syslog
  reading config file /etc/logrotate.d/rsyslog

  Handling 2 logs
  --
  rotating pattern: /var/log/syslog
  after 1 days (7 rotations)
  empty log files are not rotated, old logs are removed
  considering log /var/log/syslog
    log does not need rotating

Here is the status file, indicating that something's wrong:

  % grep syslog /var/lib/logrotate/status
  "/var/log/syslog" 2014-1-9-10:41:57

And indeed, logrotate *thinks* it's rotating, but it actually does not:

  % sudo logrotate --force -d /etc/logrotate.d/rsyslog
  reading config file /etc/logrotate.d/rsyslog

  Handling 2 logs

  rotating pattern: /var/log/syslog
  forced from command line (7 rotations)
  empty log files are not rotated, old logs are removed
  considering log /var/log/syslog
    log needs rotating
  rotating log /var/log/syslog, log->rotateCount is 7
  dateext suffix '-20140109'
  glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
  compressing log with: /bin/gzip
  renaming /var/log/syslog.7.gz to /var/log/syslog.8.gz (rotatecount 7, 
logstart 1, i 7), 
  renaming /var/log/syslog.6.gz to /var/log/syslog.7.gz (rotatecount 7, 
logstart 1, i 6), 
  renaming /var/log/syslog.5.gz to /var/log/syslog.6.gz (rotatecount 7, 
logstart 1, i 5), 
  renaming /var/log/syslog.4.gz to /var/log/syslog.5.gz (rotatecount 7, 
logstart 1, i 4), 
  renaming /var/log/syslog.3.gz to /var/log/syslog.4.gz (rotatecount 7, 
logstart 1, i 3), 
  renaming /var/log/syslog.2.gz to /var/log/syslog.3.gz (rotatecount 7, 
logstart 1, i 2), 
  renaming /var/log/syslog.1.gz to /var/log/syslog.2.gz (rotatecount 7, 
logstart 1, i 1), 
  renaming /var/log/syslog.0.gz to /var/log/syslog.1.gz (rotatecount 7, 
logstart 1, i 0), 
  renaming /var/log/syslog to /var/log/syslog.1
  running postrotate script
  running script with arg /var/log/syslog: "
      invoke-rc.d rsyslog rotate > /dev/null
  "
  removing old log /var/log/syslog.8.gz
  error: error opening /var/log/syslog.8.gz: No such file or directory

Nothing has actually changed.

-- Package-specific info:
Contents of /etc/logrotate.d
total 100
-rw-r--r-- 1 root root 434 Jun  8  2013 apache2
-rw-r--r-- 1 root root 173 Aug 25  2010 apt
-rw-r--r-- 1 root root  79 Mar 13  2010 aptitude
-rw-r--r-- 1 root root  69 Jun 18  2011 backupninja
-rw-r--r-- 1 root root 279 Jun 15  2012 bmc-watchdog
-rw-r--r-- 1 root root 135 May 20  2011 consolekit
-rw-r--r-- 1 root root 430 Jun  4  2013 cups-daemon
-rw-r--r-- 1 root root 112 Oct 12 23:04 cupt
-rw-r--r-- 1 root root 232 Jul 31  2010 dpkg
-rw-r--r-- 1 root root  94 Dec 20  2009 hibernate
-rw-r--r-- 1 root root 151 Sep 13  2009 iptraf
-rw-r--r-- 1 root root 135 Oct  5  2012 iptraf-ng
-rw-r--r-- 1 root root 165 Jul 24  2011 libvirtd
-rw-r--r-- 1 root root 162 Jul 24  2011 libvirtd.lxc
-rw-r--r-- 1 root root 163 Jul 24  2011 libvirtd.qemu
-rw-r--r-- 1 root root 162 Jul 24  2011 libvirtd.uml
-rw-r--r-- 1 root root 157 Mar 19  2010 pm-utils
-rw-r--r-- 1 root root 234 May 16  2013 polipo
-rw-r--r-- 1 root root 173 Dec  6  2011 postgresql-common
-rw-r--r-- 1 root root  94 Dec  1  2008 ppp
-rw-r--r-- 1 root root 515 May 31  2011 rsyslog
-rw-r--r-- 1 root root 117 Aug 18 02:48 salt-common
-rw-r--r-- 1 root root 298 Apr 20  2011 stunnel4
-rw-r--r-- 1 root root 190 Apr 13  2011 tor
-rw-r--r-- 1 root root 276 Mar 14  2010 xdm


-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.11-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_NZ, LC_CTYPE=en_NZ.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages logrotate depends on:
ii  anacron             2.3-20
ii  base-passwd         3.5.29
ii  cron [cron-daemon]  3.0pl1-124
ii  libacl1             2.2.52-1
ii  libc6               2.17-97
ii  libpopt0            1.16-8
ii  libselinux1         2.2.1-1

Versions of packages logrotate recommends:
ii  heirloom-mailx [mailx]  12.5-2

logrotate suggests no packages.

-- no debconf information


-- 
 .''`.   martin f. krafft <madduck@d.o>      Related projects:
: :'  :  proud Debian developer               http://debiansystem.info
`. `'`   http://people.debian.org/~madduck    http://vcs-pkg.org
  `-  Debian - when you have better things to do than fixing systems

Attachment: digital_signature_gpg.asc
Description: Digital signature (see http://martin-krafft.net/gpg/sig-policy/999bbcc4/current)

Reply via email to