LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   daemontools | rsyslog issue & debian (https://www.linuxquestions.org/questions/linux-software-2/daemontools-%7C-rsyslog-issue-and-debian-827046/)

njekto 08-18-2010 12:43 PM

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

business_kid 08-18-2010 02:18 PM

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.

njekto 08-18-2010 04:29 PM

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

business_kid 08-19-2010 03:13 AM

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

njekto 04-13-2011 03:36 PM

Quote:

Originally Posted by business_kid (Post 4070988)
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 :)


All times are GMT -5. The time now is 12:17 PM.