LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 08-18-2010, 01:43 PM   #1
njekto
LQ Newbie
 
Registered: Dec 2005
Posts: 14

Rep: Reputation: 0
daemontools | rsyslog issue & debian


Hi folks,
I have a problem running rsyslog on top of daemontools. my run file looks like this

Code:
beta:/service/rsyslogd# cat run
#!/bin/sh
exec /usr/sbin/rsyslogd -c3 -f /etc/rsyslog.conf >/dev/null 2>&1
supervise keeps on restarting rsyslogd
Code:
beta:/service# svstat /service/*
/service/ntpd: down 2646 seconds, normally up
/service/rsyslogd: up (pid 30589) 0 seconds
its always 0-1 seconds up with a different PID. if I stop the service

Code:
beta:/service/rsyslogd/supervise# svc -d /service/rsyslogd/
beta:/service/rsyslogd/supervise# svstat /service/*
/service/ntpd: down 3347 seconds, normally up
/service/rsyslogd: down 4 seconds, normally up

beta:/service/rsyslogd/supervise# ps -ef |grep rsyslog
root     30658 28527  0 19:35 pts/3    00:00:00 supervise /service/rsyslogd
root     30661     1  0 19:35 ?        00:00:00 /usr/sbin/rsyslogd -c3 -f /etc/rsyslog.conf
root     30828 28527  0 19:37 pts/3    00:00:00 grep rsyslog
it just keeps on running while supervise says its down
I also have ntpd 'supervised' with no problems at all.

any ideas why this is happening?
thanks
 
Old 08-18-2010, 03:18 PM   #2
business_kid
Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 6,573

Rep: Reputation: 580Reputation: 580Reputation: 580Reputation: 580Reputation: 580Reputation: 580
I wouldn't run these processes through daemontools at all.

Daemontools knows more about you than you know about it, and I suggest a little reading there to sort that problem out.
The other thing to know is that hardly anyone uses the install directories the eccentric author used, because they are not just mad, they're irritating, and non kosher, etc. so patches are often applied. You might get help on
http://www.lifewithqmail.org

syslogd & ntpd should be running and not mentioned in daemontools, unless you have a good reason to know better. Daemontools is to start a process for each request - so ftpd will be started for each ftp request, that sort of thing.
 
Old 08-18-2010, 05:29 PM   #3
njekto
LQ Newbie
 
Registered: Dec 2005
Posts: 14

Original Poster
Rep: Reputation: 0
thanks for reply business_kid,

I am looking for a way to guard a process so if it dies it gets restarted automatically, e.g. when VM is resumed, time is all screwed up and ntpd wont update - ntpd has died off.
i would like to have some critical processes guarded and eventually restarted if sth like this happens. thats why i want to use daemontools.
do you know about a better solution?
thanks
 
Old 08-19-2010, 04:13 AM   #4
business_kid
Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 6,573

Rep: Reputation: 580Reputation: 580Reputation: 580Reputation: 580Reputation: 580Reputation: 580
ntpd is ok with p[icking up and tuning the time to what it is now, although it doesn't adjust 12 hours in one swoop unless you set it to.

The expected behaviour for ntpd, and syslogd is to get started, to shut up and stay in the background doing things quietly. I would look into why they are quitting. As for restarting them how about something like this run from cron

if pgrep ntpd = ""
then start_ntpd
fi
 
Old 04-13-2011, 04:36 PM   #5
njekto
LQ Newbie
 
Registered: Dec 2005
Posts: 14

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by business_kid View Post
ntpd is ok with p[icking up and tuning the time to what it is now, although it doesn't adjust 12 hours in one swoop unless you set it to.

The expected behaviour for ntpd, and syslogd is to get started, to shut up and stay in the background doing things quietly. I would look into why they are quitting. As for restarting them how about something like this run from cron

if pgrep ntpd = ""
then start_ntpd
fi
well, that is a solution yes, I ended up running ntpdate from cron instead

//just cleaning up old threads, thanks for attention & help
 
  


Reply

Tags
daemontools, restarts


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
Running daemontools gokahd Linux - Software 1 12-02-2008 08:11 AM
rsyslog issue re-iterated ... prakash.akumalla Linux - Newbie 1 06-26-2008 03:30 AM
LXer: Enhanced Logging With rsyslog On Debian Etch And phpLogcon For Viewing LXer Syndicated Linux News 0 10-03-2007 08:40 PM
Debian & Windows dual boot, system time issue Vigacmoe Debian 8 08-31-2006 01:14 AM
debian & hula issue db369 Debian 6 10-21-2005 11:04 PM


All times are GMT -5. The time now is 02:12 AM.

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