LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris and OpenSolaris.
General Sun, SunOS and Sparc related questions also go here.

Notices

Reply
 
Search this Thread
Old 08-14-2006, 01:24 AM   #1
gn00kie
Member
 
Registered: Jan 2006
Posts: 70

Rep: Reputation: 15
How to make sure that syslogd is always running


Hi,
I would like to ask your opinion regarding the syslog daemon. We have one server that is not making any logs at all, the syslog is running although the messages file is 0 bytes. When we try to restart syslogd, it logs again but after sometime stops again. What can we do to make sure that syslog is running all the time and that is logging. TIA.
 
Old 08-14-2006, 03:18 AM   #2
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,506

Rep: Reputation: 360Reputation: 360Reputation: 360Reputation: 360
You can upgrade to Solaris 10, where services are restarted automatically in case of failure (smf).
 
Old 08-14-2006, 03:23 AM   #3
gn00kie
Member
 
Registered: Jan 2006
Posts: 70

Original Poster
Rep: Reputation: 15
are there other options aside from upgrading to solaris 10? upgrade is not an option for us because of hardware limitation.
 
Old 08-14-2006, 03:56 AM   #4
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,506

Rep: Reputation: 360Reputation: 360Reputation: 360Reputation: 360
Another option would be to figure out why syslogd ceases working after a while on your system.

When the root cause is found, fix it, syslogd is designed to run forever, and usually does.
 
Old 08-14-2006, 04:55 AM   #5
gn00kie
Member
 
Registered: Jan 2006
Posts: 70

Original Poster
Rep: Reputation: 15
@jlliagre,I appreciate your reply. Any suggestion on how to do it? TIA.
 
Old 08-14-2006, 10:51 AM   #6
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,506

Rep: Reputation: 360Reputation: 360Reputation: 360Reputation: 360
Ensure your system is up to date regarding patches
Look for syslogd core files
Look for filesystem full situations
Monitor syslogd to find if it crashes at a specific time
...
 
Old 08-14-2006, 09:03 PM   #7
gn00kie
Member
 
Registered: Jan 2006
Posts: 70

Original Poster
Rep: Reputation: 15
Is there an existing tool out there to help me check whether our syslog is no longer logging? Maybe there is an easy way to detect whether logging has stopped rather than checking it manually.
 
Old 08-14-2006, 10:54 PM   #8
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,506

Rep: Reputation: 360Reputation: 360Reputation: 360Reputation: 360
Syslog process id is saved in /var/run/syslog.pid

You can simply check if a process with this pid is running like this:
Code:
if kill -0 $(</var/run/syslog.pid)
then
    echo syslogd is running
else
    echo syslogd is NOT running
fi
You can also enable the mark facility by adding this line in /etc/syslogd.conf:
Code:
mark.debug  /var/adm/messages
Beware that the separator between mark.debug and /var/adm/messages must be a tab, not a space.
Then, modify the /etc/init.d/syslogd script to set the mark interval to for example 5 minutes, by adding the "-m 5" option to the syslogd command:
Code:
/usr/sbin/syslogd -m 5 >/dev/msglog 2>&1 &
After that, you'll see a new line every 5 minutes in the /var/log/messages files like this one:
Code:
Aug 15 05:53:26 bestouan -- MARK --
That will allow you to find out at what time syslogd stops, if it really does.
 
Old 08-14-2006, 11:49 PM   #9
gn00kie
Member
 
Registered: Jan 2006
Posts: 70

Original Poster
Rep: Reputation: 15
great, i'll try these ones.. thanks for your help.
 
  


Reply


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
Error running make Fusspils Linux - Newbie 4 09-14-2005 12:18 PM
General question while running make "make[2]: *** [main.o] Error 1" matazar42 Linux - Software 3 08-15-2005 12:39 PM
Problem when running make? eXor Linux - Software 5 08-13-2003 11:15 AM
Im running syslogd. I also have my PIX firewall logs being written to my linux syslog adamrau Linux - Security 2 12-19-2001 01:38 PM
error when running make punt Linux - General 2 09-24-2001 07:38 PM


All times are GMT -5. The time now is 04:43 PM.

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