Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 08-11-2015, 01:06 AM   #1
LQ Newbie
Registered: Nov 2009
Posts: 12

Rep: Reputation: 0
What happens to the new syslog messages when rsyslogd daemon is stopped?


I tried to search this in many places and also documents/man pages of openlog(), syslog(0, rsyslogd(8) but couldn't find answer for this.

My question is, if rsyslogd is stopped or not yet started, then do the new syslog messages get lost? Or rsyslogd fetches them from /dev/log later when it's enabled?

My test is:

On a running system, rsyslog is running. Now, do the following:
1) logger -p local7.notice "my custom message1"
2) grep message1 | /var/log/messages ----> Success
3) Stop rsyslogd process
4) logger -p local7.notice "My other custom message2"
5) now, start the rsyslogd daemon
6) grep message2 | /var/log/messages ----> FAIL

I understand from openlog(3) and syslog(3) man pages that a socket is opened for /dev/log file and if there is an error while sending the message to syslog (as rsyslogd is not running) then the connection is closed (and message is printed on console/stderror if you have used LOG_CONS/LOG_PERROR).

Could anybody please tell me:
1) Is there any way rsyslogd to get all those messages came in absence of it in syslog file when it comes up?
2) If not by default, is there any syscall, command,etc.etc.way to do that??

Thank you in advance.

Old 08-11-2015, 06:16 PM   #2
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599
I think you're referring to whats called the "kernel syslog ring buffer" which is a configuration option in kernel > 2.6.n. Might try setting the GRUB(2) command line option "log_buf_len=nM" where n > 1?


linux, rsyslog, syslogd

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
rsyslogd crashes while running as rsyslogd(rsyslogd -M /lib/rsyslog running well) vipul prajapati Linux - Server 1 03-22-2014 03:02 AM
syslog daemon problem "rsyslogd was HUPed" qrange Linux - Software 1 09-22-2011 03:22 AM
default syslog daemon cccc Debian 5 07-17-2009 08:12 AM
syslog and firestarter - log messages to another file than messages mule Linux - Newbie 0 08-07-2003 03:35 AM
syslog stopped! tarballedtux Linux - Software 2 08-04-2003 01:20 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:52 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
Open Source Consulting | Domain Registration