Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] logrotate does not work
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
tokyoahead
n00b
n00b


Joined: 27 Mar 2004
Posts: 37

PostPosted: Wed Jan 13, 2010 9:16 am    Post subject: [solved] logrotate does not work Reply with quote

Hi,

I used logrotate now for several years and recently discovered that it stopped some months ago to work. the logfiles grew bigger and bigger an now I am trying to figure out whats wrong. I checked the following:

I have in /etc/cron.daily/logrotate.cron

Code:
#! /bin/sh

/usr/sbin/logrotate /etc/logrotate.conf


in

/etc/logrotate.conf

Code:
include /etc/logrotate.d


where I have the file

/etc/logrotate.d/syslog-ng

(please note that I have my /var as a subdirectory of /home since the provider did an initial setup with a partition for /var which became to small. so the folders and filenames are all correct.

Quote:

/home/var/log/mail.log /home/var/log/mail.info /home/var/log/mail.warn /home/var/log/mail.err {
rotate 1
daily
sharedscripts
postrotate
/etc/init.d/syslog-ng reload > /dev/null 2>&1 || true
<------>mv /home/var/log/mail.log.1 /home/backups/logs/mail/incoming/mail_log.`date '+%Y-%m-%d'`.log
<------>mv /home/var/log/mail.info.1 /home/backups/logs/mail/incoming/mail_info.`date '+%Y-%m-%d'`.log
<------>mv /home/var/log/mail.warn.1 /home/backups/logs/mail/incoming/mail_warn.`date '+%Y-%m-%d'`.log
<------>mv /home/var/log/mail.err.1 /home/backups/logs/mail/incoming/mail_err.`date '+%Y-%m-%d'`.log
<------>bzip2 -9 /home/backups/logs/mail/incoming/*.log
endscript
}

/home/var/log/dmesg /home/var/log/messages /home/var/log/syslog /home/var/log/kern.log /home/var/log/cron.log /home/var/log/emerge.log {
rotate 1
daily
sharedscripts
postrotate
/etc/init.d/syslog-ng reload > /dev/null 2>&1 || true
<------>mv /home/var/log/dmesg.1 /home/backups/logs/system/incoming/dmesg.`date '+%Y-%m-%d'`.log
<----->mv /home/var/log/messages.1 /home/backups/logs/system/incoming/messages.`date '+%Y-%m-%d'`.log
<------>mv /home/var/log/syslog.1 /home/backups/logs/system/incoming/syslog.`date '+%Y-%m-%d'`.log
<------>mv /home/var/log/kern.log.1 /home/backups/logs/system/incoming/kern.log.`date '+%Y-%m-%d'`.log
<------>mv /home/var/log/cron.log.1 /home/backups/logs/system/incoming/cron.log.`date '+%Y-%m-%d'`.log
<------>mv /home/var/log/emerge.log.1 /home/backups/logs/system/incoming/emerge.log.`date '+%Y-%m-%d'`.log
<------>bzip2 -9 /home/backups/logs/system/incoming/*.log
endscript
}

/home/var/log/user.log /home/var/log/auth.log /home/var/log/xferlog /home/var/log/daemon.log {
rotate 1
daily
sharedscripts
postrotate
/etc/init.d/syslog-ng reload > /dev/null 2>&1 || true
<------>mv /home/var/log/user.log.1 /home/backups/logs/user/incoming/user.log.`date '+%Y-%m-%d'`.log
<------>mv /home/var/log/auth.log.1 /home/backups/logs/user/incoming/auth.log.`date '+%Y-%m-%d'`.log
<------>mv /home/var/log/xferlog.1 /home/backups/logs/user/incoming/xferlog.`date '+%Y-%m-%d'`.log
<------>mv /home/var/log/daemon.log.1 /home/backups/logs/user/incoming/daemon.log.`date '+%Y-%m-%d'`.log
<------>bzip2 -9 /home/backups/logs/user/incoming/*.log
endscript

}


now when I run this with -d, I get the following:

Code:
# logrotate -d /etc/logrotate.conf
reading config file /etc/logrotate.conf
including /etc/logrotate.d
reading config file apache2
reading config file elog-save-summary
reading config info for /var/log/portage/elog/summary.log
reading config file mysql
reading config info for /var/log/mysql/mysql.err /var/log/mysql/mysql.log /var/log/mysql/mysqld.err
reading config file rsyncd
reading config info for /var/log/rsync.log
reading config file syslog-ng
reading config info for /home/var/log/mail.log /home/var/log/mail.info /home/var/log/mail.warn /home/var/log/mail.err
reading config info for /home/var/log/dmesg /home/var/log/messages /home/var/log/syslog /home/var/log/kern.log /home/var/log/cron.log /home/var/log/emerge.log
reading config info for /home/var/log/user.log /home/var/log/auth.log /home/var/log/xferlog /home/var/log/daemon.log

Handling 6 logs

rotating pattern: /var/log/portage/elog/summary.log  1048576 bytes (no old logs will be kept)
empty log files are rotated, old logs are removed
considering log /var/log/portage/elog/summary.log
  log does not need rotating

rotating pattern: /var/log/mysql/mysql.err /var/log/mysql/mysql.log /var/log/mysql/mysqld.err  after 1 days (1 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/mysql/mysql.err
  log does not need rotating
considering log /var/log/mysql/mysql.log
  log does not need rotating
considering log /var/log/mysql/mysqld.err
  log /var/log/mysql/mysqld.err does not exist -- skipping
not running postrotate script, since no logs were rotated

rotating pattern: /var/log/rsync.log  1048576 bytes (7 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/rsync.log
  log /var/log/rsync.log does not exist -- skipping

rotating pattern: /home/var/log/mail.log /home/var/log/mail.info /home/var/log/mail.warn /home/var/log/mail.err  after 1 days (1 rotations)
empty log files are rotated, old logs are removed
considering log /home/var/log/mail.log
  log does not need rotating
considering log /home/var/log/mail.info
  log does not need rotating
considering log /home/var/log/mail.warn
error: stat of /home/var/log/mail.warn failed: No such file or directory
considering log /home/var/log/mail.err
  log does not need rotating

rotating pattern: /home/var/log/dmesg /home/var/log/messages /home/var/log/syslog /home/var/log/kern.log /home/var/log/cron.log /home/var/log/emerge.log  after 1 days (1 rotations)
empty log files are rotated, old logs are removed
considering log /home/var/log/dmesg
  log does not need rotating
considering log /home/var/log/messages
  log does not need rotating
considering log /home/var/log/syslog
  log does not need rotating
considering log /home/var/log/kern.log
error: stat of /home/var/log/kern.log failed: No such file or directory
considering log /home/var/log/cron.log
  log does not need rotating
considering log /home/var/log/emerge.log
  log does not need rotating

rotating pattern: /home/var/log/user.log /home/var/log/auth.log /home/var/log/xferlog /home/var/log/daemon.log  after 1 days (1 rotations)
empty log files are rotated, old logs are removed
considering log /home/var/log/user.log
  log does not need rotating
considering log /home/var/log/auth.log
  log does not need rotating
considering log /home/var/log/xferlog
error: stat of /home/var/log/xferlog failed: No such file or directory
considering log /home/var/log/daemon.log
  log does not need rotating


Now I first of all do not understand why logrotate thinks they do not need rotating. I tried to force it by putting in a size limit:

[...]
Code:

/home/var/log/dmesg /home/var/log/messages /home/var/log/syslog /home/var/log/kern.log /home/var/log/cron.log /home/var/log/emerge.log {
    rotate 1
    daily
    size 20M
    sharedscripts
    postrotate

[...]

which resulted in this here:

[...]
Code:
rotating pattern: /home/var/log/dmesg /home/var/log/messages /home/var/log/syslog /home/var/log/kern.log /home/var/log/cron.log /home/var/log/emerge.log  20971520 bytes (1 rotations)
empty log files are rotated, old logs are removed
considering log /home/var/log/dmesg
  log does not need rotating
considering log /home/var/log/messages
  log needs rotating
considering log /home/var/log/syslog
  log needs rotating
considering log /home/var/log/kern.log
error: stat of /home/var/log/kern.log failed: No such file or directory
considering log /home/var/log/cron.log
  log does not need rotating
considering log /home/var/log/emerge.log
  log does not need rotating
rotating log /home/var/log/messages, log->rotateCount is 1
dateext suffix '-20100113'
glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
renaming /home/var/log/messages.1 to /home/var/log/messages.2 (rotatecount 1, logstart 1, i 1),
renaming /home/var/log/messages.0 to /home/var/log/messages.1 (rotatecount 1, logstart 1, i 0),
rotating log /home/var/log/syslog, log->rotateCount is 1
dateext suffix '-20100113'
glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
renaming /home/var/log/syslog.1 to /home/var/log/syslog.2 (rotatecount 1, logstart 1, i 1),
renaming /home/var/log/syslog.0 to /home/var/log/syslog.1 (rotatecount 1, logstart 1, i 0),


however, there was still 0 effect. Nothing was rotated, the files were still the same size. no idea what to do.

any help appreciated.


Last edited by tokyoahead on Sun Jan 17, 2010 6:04 am; edited 2 times in total
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21490

PostPosted: Wed Jan 13, 2010 7:20 pm    Post subject: Reply with quote

Based on that last round of output, it appears logrotate tried to rotate and failed, correct? If so, my next step would be to use strace to observe its system calls.
Back to top
View user's profile Send private message
tokyoahead
n00b
n00b


Joined: 27 Mar 2004
Posts: 37

PostPosted: Thu Jan 14, 2010 4:49 am    Post subject: Reply with quote

I tried to do that and got the following:

please note that I deleted a couple of lines of

Code:
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1135, ...}) = 0


I am not sure that to make of this. some files seem to be missing, but I am not sure if this is critical or normal. [/code]

Code:

execve("/usr/sbin/logrotate", ["logrotate", "-f", "/etc/logrotate.conf"], [/* 27 vars */]) = 0
brk(0)                                  = 0x8055000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=25856, ...}) = 0
mmap2(NULL, 25856, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7f69000
close(3)                                = 0
open("/usr/lib/libpopt.so.0", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\220\33\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=38724, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f68000
mmap2(NULL, 41612, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7f5d000
mmap2(0xb7f66000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x8) = 0xb7f66000
close(3)                                = 0
open("/lib/libc.so.6", O_RDONLY)        = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\200h\1\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1315100, ...}) = 0
mmap2(NULL, 1320560, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7e1a000
mmap2(0xb7f57000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x13d) = 0xb7f57000
mmap2(0xb7f5a000, 9840, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7f5a000
close(3)                                = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7e19000
set_thread_area({entry_number:-1 -> 6, base_addr:0xb7e196c0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
mprotect(0xb7f57000, 8192, PROT_READ)   = 0
mprotect(0xb7f66000, 4096, PROT_READ)   = 0
mprotect(0x8053000, 4096, PROT_READ)    = 0
mprotect(0xb7f8d000, 4096, PROT_READ)   = 0
munmap(0xb7f69000, 25856)               = 0
brk(0)                                  = 0x8055000
brk(0x8076000)                          = 0x8076000
open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=80539456, ...}) = 0
mmap2(NULL, 2097152, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7c19000
mmap2(NULL, 4096, PROT_READ, MAP_PRIVATE, 3, 0xbb5) = 0xb7f6f000
close(3)                                = 0
open("/etc/popt", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
stat64("/etc/popt.d", 0xbfb89964)       = -1 ENOENT (No such file or directory)
open("/root/.popt", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
stat64("/etc/logrotate.conf", {st_mode=S_IFREG|0644, st_size=146, ...}) = 0
open("/etc/logrotate.conf", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=146, ...}) = 0
read(3, "# $Header: /var/cvsroot/gentoo-x"..., 146) = 146
close(3)                                = 0
stat64("/etc/logrotate.d", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open(".", O_RDONLY|O_LARGEFILE)         = 3
open("/etc/logrotate.d", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 4
fstat64(4, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
fcntl64(4, F_GETFD)                     = 0x1 (flags FD_CLOEXEC)
getdents64(4, /* 8 entries */, 4096)    = 264
open("/usr/lib/gconv/gconv-modules.cache", O_RDONLY) = 5
fstat64(5, {st_mode=S_IFREG|0644, st_size=26048, ...}) = 0
mmap2(NULL, 26048, PROT_READ, MAP_SHARED, 5, 0) = 0xb7c12000
close(5)                                = 0
getdents64(4, /* 0 entries */, 4096)    = 0
close(4)                                = 0
chdir("/etc/logrotate.d")               = 0
open("elog-save-summary", O_RDONLY|O_LARGEFILE) = 4
fstat64(4, {st_mode=S_IFREG|0644, st_size=310, ...}) = 0
read(4, "# Copyright 1999-2007 Gentoo Fou"..., 310) = 310
close(4)                                = 0
lstat64("/var/log/portage/elog/summary.log", 0xbfb89230) = -1 ENOENT (No such file or directory)
open("mysql", O_RDONLY|O_LARGEFILE)     = 4
fstat64(4, {st_mode=S_IFREG|0644, st_size=769, ...}) = 0
read(4, "# Copyright 1999-2004 Gentoo Fou"..., 769) = 769
close(4)                                = 0
lstat64("/var/log/mysql/mysql.err", {st_mode=S_IFREG|0660, st_size=0, ...}) = 0
lstat64("/var/log/mysql/mysql.log", {st_mode=S_IFREG|0660, st_size=0, ...}) = 0
lstat64("/var/log/mysql/mysqld.err", 0xbfb89230) = -1 ENOENT (No such file or directory)
socket(PF_FILE, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = -1 EINVAL (Invalid argument)
socket(PF_FILE, SOCK_STREAM, 0)         = 4
fcntl64(4, F_SETFL, O_RDWR|O_NONBLOCK)  = 0
connect(4, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
close(4)                                = 0
socket(PF_FILE, SOCK_STREAM, 0)         = 4
fcntl64(4, F_SETFL, O_RDWR|O_NONBLOCK)  = 0
connect(4, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
close(4)                                = 0
open("/etc/nsswitch.conf", O_RDONLY)    = 4
fstat64(4, {st_mode=S_IFREG|0644, st_size=508, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f6e000
read(4, "# /etc/nsswitch.conf:\n# $Header:"..., 4096) = 508
read(4, "", 4096)                       = 0
close(4)                                = 0
munmap(0xb7f6e000, 4096)                = 0
open("/etc/ld.so.cache", O_RDONLY)      = 4
fstat64(4, {st_mode=S_IFREG|0644, st_size=25856, ...}) = 0
mmap2(NULL, 25856, PROT_READ, MAP_PRIVATE, 4, 0) = 0xb7c0b000
close(4)                                = 0
open("/lib/libnss_compat.so.2", O_RDONLY) = 4
read(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\20\16\0\0004\0\0\0"..., 512) = 512
fstat64(4, {st_mode=S_IFREG|0755, st_size=30356, ...}) = 0
mmap2(NULL, 33356, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0xb7c02000
mmap2(0xb7c09000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x6) = 0xb7c09000
close(4)                                = 0
open("/lib/libnsl.so.1", O_RDONLY)      = 4
read(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0p1\0\0004\0\0\0"..., 512) = 512
fstat64(4, {st_mode=S_IFREG|0755, st_size=79540, ...}) = 0
mmap2(NULL, 92136, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0xb7beb000
mmap2(0xb7bfe000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x12) = 0xb7bfe000
mmap2(0xb7c00000, 6120, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7c00000
close(4)                                = 0
mprotect(0xb7bfe000, 4096, PROT_READ)   = 0
mprotect(0xb7c09000, 4096, PROT_READ)   = 0
munmap(0xb7c0b000, 25856)               = 0
open("/etc/ld.so.cache", O_RDONLY)      = 4
fstat64(4, {st_mode=S_IFREG|0644, st_size=25856, ...}) = 0
mmap2(NULL, 25856, PROT_READ, MAP_PRIVATE, 4, 0) = 0xb7c0b000
close(4)                                = 0
open("/lib/libnss_nis.so.2", O_RDONLY)  = 4
read(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\200\31\0\0004\0\0\0"..., 512) = 512
fstat64(4, {st_mode=S_IFREG|0755, st_size=38372, ...}) = 0
mmap2(NULL, 41536, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0xb7be0000
mmap2(0xb7be9000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x8) = 0xb7be9000
close(4)                                = 0
open("/lib/libnss_files.so.2", O_RDONLY) = 4
read(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\20\31\0\0004\0\0\0"..., 512) = 512
fstat64(4, {st_mode=S_IFREG|0755, st_size=38332, ...}) = 0
mmap2(NULL, 41624, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0xb7bd5000
mmap2(0xb7bde000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x8) = 0xb7bde000
close(4)                                = 0
mprotect(0xb7bde000, 4096, PROT_READ)   = 0
mprotect(0xb7be9000, 4096, PROT_READ)   = 0
munmap(0xb7c0b000, 25856)               = 0
open("/etc/passwd", O_RDONLY|O_CLOEXEC) = 4
fcntl64(4, F_GETFD)                     = 0x1 (flags FD_CLOEXEC)
_llseek(4, 0, [0], SEEK_CUR)            = 0
fstat64(4, {st_mode=S_IFREG|0644, st_size=2735, ...}) = 0
mmap2(NULL, 2735, PROT_READ, MAP_SHARED, 4, 0) = 0xb7f6e000
_llseek(4, 2735, [2735], SEEK_SET)      = 0
munmap(0xb7f6e000, 2735)                = 0
close(4)                                = 0
socket(PF_FILE, SOCK_STREAM, 0)         = 4
fcntl64(4, F_SETFL, O_RDWR|O_NONBLOCK)  = 0
connect(4, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
close(4)                                = 0
socket(PF_FILE, SOCK_STREAM, 0)         = 4
fcntl64(4, F_SETFL, O_RDWR|O_NONBLOCK)  = 0
connect(4, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
close(4)                                = 0
open("/etc/group", O_RDONLY|O_CLOEXEC)  = 4
_llseek(4, 0, [0], SEEK_CUR)            = 0
fstat64(4, {st_mode=S_IFREG|0644, st_size=990, ...}) = 0
mmap2(NULL, 990, PROT_READ, MAP_SHARED, 4, 0) = 0xb7f6e000
_llseek(4, 990, [990], SEEK_SET)        = 0
munmap(0xb7f6e000, 990)                 = 0
close(4)                                = 0
open("rsyncd", O_RDONLY|O_LARGEFILE)    = 4
fstat64(4, {st_mode=S_IFREG|0644, st_size=105, ...}) = 0
read(4, "/var/log/rsync.log {\n\tcompress\n\t"..., 105) = 105
close(4)                                = 0
lstat64("/var/log/rsync.log", 0xbfb89230) = -1 ENOENT (No such file or directory)
open("syslog-ng", O_RDONLY|O_LARGEFILE) = 4
fstat64(4, {st_mode=S_IFREG|0644, st_size=2435, ...}) = 0
read(4, "# $Header: /var/cvsroot/gentoo-x"..., 2435) = 2435
close(4)                                = 0
lstat64("/home/var/log/mail.log", {st_mode=S_IFREG|0600, st_size=3461120, ...}) = 0
lstat64("/home/var/log/mail.info", {st_mode=S_IFREG|0600, st_size=3457024, ...}) = 0
lstat64("/home/var/log/mail.warn", 0xbfb89230) = -1 ENOENT (No such file or directory)
lstat64("/home/var/log/mail.err", {st_mode=S_IFREG|0600, st_size=51513, ...}) = 0
lstat64("/home/var/log/dmesg", {st_mode=S_IFREG|0640, st_size=15513, ...}) = 0
lstat64("/home/var/log/messages", {st_mode=S_IFREG|0600, st_size=95090970, ...}) = 0
lstat64("/home/var/log/syslog", {st_mode=S_IFREG|0600, st_size=99819520, ...}) = 0
lstat64("/home/var/log/kern.log", 0xbfb89230) = -1 ENOENT (No such file or directory)
lstat64("/home/var/log/cron.log", {st_mode=S_IFREG|0600, st_size=9322496, ...}) = 0
lstat64("/home/var/log/emerge.log", {st_mode=S_IFREG|0660, st_size=336435, ...}) = 0
lstat64("/home/var/log/user.log", {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
lstat64("/home/var/log/auth.log", {st_mode=S_IFREG|0600, st_size=287567872, ...}) = 0
lstat64("/home/var/log/xferlog", 0xbfb89230) = -1 ENOENT (No such file or directory)
lstat64("/home/var/log/daemon.log", {st_mode=S_IFREG|0600, st_size=29773824, ...}) = 0
fchdir(3)                               = 0
close(3)                                = 0
time(NULL)                              = 1263444247
stat64("/var/lib/logrotate.status", {st_mode=S_IFREG|0644, st_size=708, ...}) = 0
open("/var/lib/logrotate.status", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=708, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f6e000
read(3, "logrotate state -- version 2\n\"/h"..., 4096) = 708
open("/etc/localtime", O_RDONLY)        = 4
fstat64(4, {st_mode=S_IFREG|0644, st_size=1135, ...}) = 0
fstat64(4, {st_mode=S_IFREG|0644, st_size=1135, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f6d000
read(4, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\3\0\0\0\3\0\0\0\0"..., 4096) = 1135
_llseek(4, -7, [1128], SEEK_CUR)        = 0
read(4, "\nHKT-8\n", 4096)              = 7
close(4)                                = 0
munmap(0xb7f6d000, 4096)                = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1135, ...}) = 0
[...repeated lines deteled...]
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1135, ...}) = 0
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0xb7f6e000, 4096)                = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1135, ...}) = 0
stat64("/var/log/portage/elog/summary.log", 0xbfb898d0) = -1 ENOENT (No such file or directory)
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1135, ...}) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1135, ...}) = 0
stat64("/var/log/mysql/mysql.err", {st_mode=S_IFREG|0660, st_size=0, ...}) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1135, ...}) = 0
stat64("/var/log/mysql/mysql.log", {st_mode=S_IFREG|0660, st_size=0, ...}) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1135, ...}) = 0
stat64("/var/log/mysql/mysqld.err", 0xbfb898d0) = -1 ENOENT (No such file or directory)
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1135, ...}) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1135, ...}) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1135, ...}) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1135, ...}) = 0
stat64("/var/log/rsync.log", 0xbfb898d0) = -1 ENOENT (No such file or directory)
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1135, ...}) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1135, ...}) = 0
stat64("/home/var/log/mail.log", {st_mode=S_IFREG|0600, st_size=3461120, ...}) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1135, ...}) = 0
stat64("/home/var/log/mail.info", {st_mode=S_IFREG|0600, st_size=3457024, ...}) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1135, ...}) = 0
stat64("/home/var/log/mail.warn", 0xbfb898d0) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/locale.alias", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=2570, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f6e000
read(3, "# Locale name alias data base.\n#"..., 4096) = 2570
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0xb7f6e000, 4096)                = 0
open("/usr/share/locale/en_US.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
write(2, "error: ", 7)                  = 7
write(2, "stat of /home/var/log/mail.warn "..., 66) = 66
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1135, ...}) = 0
stat64("/home/var/log/mail.err", {st_mode=S_IFREG|0600, st_size=51513, ...}) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1135, ...}) = 0
rename("/home/var/log/mail.log.1", "/home/var/log/mail.log.2") = -1 ENOENT (No such file or directory)
rename("/home/var/log/mail.log.0", "/home/var/log/mail.log.1") = -1 ENOENT (No such file or directory)
access("/home/var/log/mail.log.2", F_OK) = -1 ENOENT (No such file or directory)
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1135, ...}) = 0
rename("/home/var/log/mail.info.1", "/home/var/log/mail.info.2") = -1 ENOENT (No such file or directory)
rename("/home/var/log/mail.info.0", "/home/var/log/mail.info.1") = -1 ENOENT (No such file or directory)
access("/home/var/log/mail.info.2", F_OK) = -1 ENOENT (No such file or directory)
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1135, ...}) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1135, ...}) = 0
rename("/home/var/log/mail.err.1", "/home/var/log/mail.err.2") = -1 ENOENT (No such file or directory)
rename("/home/var/log/mail.err.0", "/home/var/log/mail.err.1") = -1 ENOENT (No such file or directory)
access("/home/var/log/mail.err.2", F_OK) = -1 ENOENT (No such file or directory)
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1135, ...}) = 0
stat64("/home/var/log/dmesg", {st_mode=S_IFREG|0640, st_size=15513, ...}) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1135, ...}) = 0
stat64("/home/var/log/messages", {st_mode=S_IFREG|0600, st_size=95090970, ...}) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1135, ...}) = 0
stat64("/home/var/log/syslog", {st_mode=S_IFREG|0600, st_size=99819520, ...}) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1135, ...}) = 0
stat64("/home/var/log/kern.log", 0xbfb898c0) = -1 ENOENT (No such file or directory)
write(2, "error: ", 7)                  = 7
write(2, "stat of /home/var/log/kern.log f"..., 65) = 65
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1135, ...}) = 0
stat64("/home/var/log/cron.log", {st_mode=S_IFREG|0600, st_size=9322496, ...}) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1135, ...}) = 0
stat64("/home/var/log/emerge.log", {st_mode=S_IFREG|0660, st_size=336435, ...}) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1135, ...}) = 0
rename("/home/var/log/dmesg.1", "/home/var/log/dmesg.2") = -1 ENOENT (No such file or directory)
rename("/home/var/log/dmesg.0", "/home/var/log/dmesg.1") = -1 ENOENT (No such file or directory)
access("/home/var/log/dmesg.2", F_OK)   = -1 ENOENT (No such file or directory)
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1135, ...}) = 0
rename("/home/var/log/messages.1", "/home/var/log/messages.2") = -1 ENOENT (No such file or directory)
rename("/home/var/log/messages.0", "/home/var/log/messages.1") = -1 ENOENT (No such file or directory)
access("/home/var/log/messages.2", F_OK) = -1 ENOENT (No such file or directory)
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1135, ...}) = 0
rename("/home/var/log/syslog.1", "/home/var/log/syslog.2") = -1 ENOENT (No such file or directory)
rename("/home/var/log/syslog.0", "/home/var/log/syslog.1") = -1 ENOENT (No such file or directory)
access("/home/var/log/syslog.2", F_OK)  = -1 ENOENT (No such file or directory)
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1135, ...}) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1135, ...}) = 0
rename("/home/var/log/cron.log.1", "/home/var/log/cron.log.2") = -1 ENOENT (No such file or directory)
rename("/home/var/log/cron.log.0", "/home/var/log/cron.log.1") = -1 ENOENT (No such file or directory)
access("/home/var/log/cron.log.2", F_OK) = -1 ENOENT (No such file or directory)
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1135, ...}) = 0
rename("/home/var/log/emerge.log.1", "/home/var/log/emerge.log.2") = -1 ENOENT (No such file or directory)
rename("/home/var/log/emerge.log.0", "/home/var/log/emerge.log.1") = -1 ENOENT (No such file or directory)
access("/home/var/log/emerge.log.2", F_OK) = -1 ENOENT (No such file or directory)
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1135, ...}) = 0
stat64("/home/var/log/user.log", {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1135, ...}) = 0
stat64("/home/var/log/auth.log", {st_mode=S_IFREG|0600, st_size=287567872, ...}) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1135, ...}) = 0
stat64("/home/var/log/xferlog", 0xbfb898d0) = -1 ENOENT (No such file or directory)
write(2, "error: ", 7)                  = 7
write(2, "stat of /home/var/log/xferlog fa"..., 64) = 64
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1135, ...}) = 0
stat64("/home/var/log/daemon.log", {st_mode=S_IFREG|0600, st_size=29773824, ...}) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1135, ...}) = 0
rename("/home/var/log/user.log.1", "/home/var/log/user.log.2") = -1 ENOENT (No such file or directory)
rename("/home/var/log/user.log.0", "/home/var/log/user.log.1") = -1 ENOENT (No such file or directory)
access("/home/var/log/user.log.2", F_OK) = -1 ENOENT (No such file or directory)
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1135, ...}) = 0
rename("/home/var/log/auth.log.1", "/home/var/log/auth.log.2") = -1 ENOENT (No such file or directory)
rename("/home/var/log/auth.log.0", "/home/var/log/auth.log.1") = -1 ENOENT (No such file or directory)
access("/home/var/log/auth.log.2", F_OK) = -1 ENOENT (No such file or directory)
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1135, ...}) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1135, ...}) = 0
rename("/home/var/log/daemon.log.1", "/home/var/log/daemon.log.2") = -1 ENOENT (No such file or directory)
rename("/home/var/log/daemon.log.0", "/home/var/log/daemon.log.1") = -1 ENOENT (No such file or directory)
access("/home/var/log/daemon.log.2", F_OK) = -1 ENOENT (No such file or directory)
open("/var/lib/logrotate.status", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f6e000
write(3, "logrotate state -- version 2\n\"/h"..., 708) = 708
close(3)                                = 0
munmap(0xb7f6e000, 4096)                = 0
exit_group(1)                           = ?


Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21490

PostPosted: Thu Jan 14, 2010 6:03 pm    Post subject: Reply with quote

Strange. It appears that logrotate is moving aside older logs, but not attempting to move the logs that the debug output in your first post said it wanted to move.
Back to top
View user's profile Send private message
tokyoahead
n00b
n00b


Joined: 27 Mar 2004
Posts: 37

PostPosted: Fri Jan 15, 2010 6:00 am    Post subject: Reply with quote

but it is not even moving one file! nothing changes with the logfiles. I have no idea what to do or how to find out whats wrong!
Back to top
View user's profile Send private message
tokyoahead
n00b
n00b


Joined: 27 Mar 2004
Posts: 37

PostPosted: Sun Jan 17, 2010 3:52 am    Post subject: Reply with quote

any help on this would be very much appreciated!
Back to top
View user's profile Send private message
Mike Hunt
Watchman
Watchman


Joined: 19 Jul 2009
Posts: 5287

PostPosted: Sun Jan 17, 2010 5:10 am    Post subject: Reply with quote

This is what the default file looks like
Code:
# cat /etc/logrotate.d/syslog-ng
# $Header: /var/cvsroot/gentoo-x86/app-admin/syslog-ng/files/syslog-ng.logrotate,v 1.3 2008/10/15 20:46:12 mr_bones_ Exp $
#
# Syslog-ng logrotate snippet for Gentoo Linux
# contributed by Michael Sterrett
#

/var/log/messages {
    missingok
    sharedscripts
    postrotate
        /etc/init.d/syslog-ng reload > /dev/null 2>&1 || true
    endscript
}


And on my box there is /etc/cron.daily/logrotate.cron, /etc/logrotate.conf and these in /etc/logrotate.d
Code:
# ls /etc/logrotate.d/
elog-save-summary  exim  mysql  rsyncd  squid  syslog-ng


Maybe you could move everything (or some of it) out of there, re-emerge logrotate and the packages on your system that use logrotate, and tweak to taste after verifying that it all works as expected, and after making backups of the default config files.
Back to top
View user's profile Send private message
tokyoahead
n00b
n00b


Joined: 27 Mar 2004
Posts: 37

PostPosted: Sun Jan 17, 2010 6:04 am    Post subject: Reply with quote

thanks. the default text works. Now I have to find out the middle between mine and the default.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum