Scientific Linux Forum.org



  Reply to this topicStart new topicStart Poll

> [WORKING but not solved] Logrotate not working after recent update?
JPruenteAtRA
 Posted: Nov 17 2017, 05:30 PM
Quote Post


SLF Newbie


Group: Members
Posts: 2
Member No.: 3950
Joined: 17-November 17









Logrotate is skipping some of my logs during it's rotate schedule. I can't tell if this is due to logrotate, rsyslog, or something else. Before I get too far into spelunking this, is anyone else noticing some logs getting skipped after updating logrotate/rsyslog recently?
PMEmail Poster
^
tux99
 Posted: Nov 19 2017, 01:12 AM
Quote Post


SLF Moderator
********

Group: Moderators
Posts: 1277
Member No.: 224
Joined: 28-May 11









Which logs aren't being rotated?
Which version of SL are you using?

--------------------
My personal SL6 repository, specialized in audio/video software: http://pkgrepo.linuxtech.net/el6/
(can be used together with EPEL and ELRepo repositories) - repository mirror: http://linuxsoft.cern.ch/linuxtech/el6/
PM
^
JPruenteAtRA
 Posted: Nov 22 2017, 03:50 PM
Quote Post


SLF Newbie


Group: Members
Posts: 2
Member No.: 3950
Joined: 17-November 17









Basically any log I had configured in my /etc/logrotate.d/rsyslog.conf file wasn't rotating. The system is running SL 7.4 and was fully updated on Nov 05, and rebooted to run the kernel update. I noticed many files weren't rotating on the 15th. I messed with the logrotate configs for a few days and manually rotated the largest ones (+1G/day each) when they got unwieldy. The only significant change I did was to change the postrotate command from
CODE
/bin/kill -HUP `cat /var/run/rsyslogd.pid 2> /dev/null` 2> /dev/null || true

to
CODE
systemctl restart rsyslog

and restarted rsyslog and manually ran logrotate with the regular options as in /etc/cron.daily/logrotate and also as a forced rotate run. It still didn't rotate all of the files in the rsyslog.conf. This sat for a few days over the weekend and still did not rotate the files with cron runs.

Yesterday I had an opportunity to reboot the server and took it. Last night the rotate worked on all files as expected. I'm not sure what would have changed in the running system just from a reboot that wouldn't have already been refreshed when restarting the rsyslog service.

I'd like to edit the topic to WORKING but not SOLVED, but I don't see where I can do that.
PMEmail Poster
^
burakkucat
 Posted: Nov 22 2017, 03:58 PM
Quote Post


SLF Administrator
****

Group: Admins
Posts: 208
Member No.: 14
Joined: 10-April 11









QUOTE (JPruenteAtRA @ Nov 22 2017, 03:50 PM)

I'd like to edit the topic to WORKING but not SOLVED, but I don't see where I can do that.

Just catch the eye of a moderator or administrator . . . as you have so done. wink.gif

--------------------
user posted image 100% Linux and, previously, Unix. Co-founder of the ELRepo Project.
PMUsers Website
^
inittux
 Posted: Today at 10:17 am
Quote Post


SLF Geek
****

Group: Members
Posts: 307
Member No.: 953
Joined: 20-October 11









Have you tried running a logrotate file in debug mode, I've had that provide some useful output this last week when I had a problem with logrotate.

logrotate -d /etc/logrotate.d/httpd

--------------------
PM
^
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

Topic Options Reply to this topicStart new topicStart Poll