Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 02-18-2012, 09:45 PM   #1
Registered: Oct 2005
Posts: 325

Rep: Reputation: 32
rsyslog not logging to a correct file

I remember before I encountered this was I add logrotate to /etc/cron.dail with the ff contents:

[root@mails cron.daily]# cat logrotate 

/usr/sbin/logrotate /etc/logrotate.conf >/dev/null 2>&1
if [ $EXITVALUE != 0 ]; then
    /usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]"
exit 0

[root@mails cron.daily]# ls -l logrotate 
-rwxr-xr-x 1 root root 197 2012-02-16 20:58 logrotate
Now, after I week I notice that there is no log in all log files. Instead, it was log in a file with appended date

[root@mails log]# ls -ltr | grep messages
-rw------- 1 root      root          184626 2009-11-16 09:21 messages-20091115
-rw------- 1 root      root          364645 2009-11-24 15:27 messages-20091122
-rw------- 1 root      root         5404369 2012-02-19 10:42 messages-20120216
-rw------- 1 root      root               0 2012-02-19 10:45 messages
-rw------- 1 root      root            1001 2012-02-19 11:10 messages-20120219
Sample above. All messages is being log in messages-20120219 instead on messages. Any hint on how I could revert it back to normal logging and just rotate per week. Below is my /etc/rsyslog.conf

 Log anything (except mail) of level info or higher.
# Don't log private authentication messages!
*.info;mail.none;authpriv.none;cron.none                /var/log/messages

# The authpriv file has restricted access.
authpriv.*                                              /var/log/secure

# Log all the mail messages in one place.
mail.*                                                  -/var/log/maillog

# Log cron stuff
cron.*                                                  /var/log/cron

# Everybody gets emergency messages
*.emerg                                                 *

# Save news errors of level crit and higher in a special file.
uucp,news.crit                                          /var/log/spooler

# Save boot messages also to boot.log
local7.*                                                /var/log/boot.log
Old 02-19-2012, 05:40 AM   #2
Registered: May 2001
Posts: 29,409
Blog Entries: 55

Rep: Reputation: 3582Reputation: 3582Reputation: 3582Reputation: 3582Reputation: 3582Reputation: 3582Reputation: 3582Reputation: 3582Reputation: 3582Reputation: 3582Reputation: 3582
There is nothing in /etc/rsyslog.conf or /etc/cron.daily/logrotate (both contain default values) that suggest rotating log files according to some non-standard scheme. Search /etc/logrotate.d/ for that.
Old 03-10-2012, 08:11 AM   #3
Registered: Oct 2005
Posts: 325

Original Poster
Rep: Reputation: 32
Ok. Got a free time so if someone stumble to this post, then you might just scratch your head.

I got a wrong entry on my logrotate.conf. My kill -HUP syslogd should be kill -HUP rsyslogd



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
rsyslog logging tftpd-hpa logs to mysql realnoname Linux - General 0 11-06-2011 11:12 AM
[SOLVED] syslog remote logging with rsyslog server Chenchu Linux - Newbie 3 09-17-2011 01:34 PM
[SOLVED] How to create a separate logfile for host sending logging to rsyslog rytec Linux - Server 4 02-17-2011 11:03 AM
Rsyslog not logging routers messages dman777 Linux - Software 9 01-31-2011 05:08 AM
LXer: Enhanced Logging With rsyslog On Debian Etch And phpLogcon For Viewing LXer Syndicated Linux News 0 10-03-2007 07:40 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:16 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration