I have the following problem. When my logs are rotated something like that is procuded

-rw-r--r--    1 root admin 169K Sep 24 12:15 messages
-rw-r--r--    1 root admin    0 Sep 24 04:03 messages.1
-rw-r--r--    1 root admin    0 Sep 19 04:02 messages.11
-rw-r--r--    1 root admin   20 Aug 22 04:03 messages.1.gz
-rw-r--r--    1 root admin    0 Sep 23 04:02 messages.3
-rw-r--r--    1 root admin   20 Aug 21 04:02 messages.3.gz
-rw-r--r--    1 root admin    0 Sep 22 04:02 messages.5
-rw-r--r--    1 root admin   20 Aug 20 04:02 messages.5.gz
-rw-r--r--    1 root admin    0 Sep 21 04:02 messages.7
-rw-r--r--    1 root admin   20 Aug 19 04:03 messages.7.gz
-rw-r--r--    1 root admin    0 Sep 20 04:02 messages.9
-rw-r--r--    1 root admin   20 Aug 18 18:02 messages.9.gz

As you can see the even numbers are not compress, but the odd are. Any the most important is that there is not log kept !

My logrotate is the following ...

Blah Blah {
rotate 12

/bin/kill -HUP `cat /var/run/rsyslogd.pid 2> /dev/null` 2> /dev/null || true


What could be wrong ?

  • What do type -a logrotate and sudo file $(type -P logrotate) tell you? Sep 24, 2010 at 13:58
  • Huh? There are no even-numbered log files listed. The log files are a month apart and something may have changed in the interveneing time because the config stanza has "nocompress" now. Sep 24, 2010 at 19:55
  • logrotate is /usr/sbin/logrotate /usr/sbin/logrotate: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped The problem is that even now (with the configuration above) the logs are nullified !!!!!!! Sep 27, 2010 at 8:29

2 Answers 2


At last the problem is solved. The problem was that some of the directories were links to other directories, thus they were rotated twice. !!!!!!! It had as a result the produced files to be null !


This looks like a redhat based distro. In which case you might want to check whether that particular pid file does actually exist and which daemon really is used to log into messages.

On fedora (as an example) the actual pid file is /var/run/syslogd.pid. This varies with distro (and the individual configuration of the server).

  • I checked it, but nothing. The pid appears, and more over when i change the signal from HUP to KILL the application is killed as expected. Sep 24, 2010 at 12:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .