[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: depend take 2
From: |
Rory Toma |
Subject: |
Re: depend take 2 |
Date: |
19 Dec 2002 15:30:16 -0800 |
Now I'm completely confused.
If I do a "monit stop sshd" with the following, just sshd stops,
however, when I run "monit start sshd" the following happens:
[PST Dec 19 15:29:19] stop: (xinetd) /etc/rc.d/init.d/xinetd
[PST Dec 19 15:29:20] stop: (gpm) /etc/rc.d/init.d/gpm
[PST Dec 19 15:29:21] start: (sshd) /etc/rc.d/init.d/sshd
[PST Dec 19 15:29:22] start: (xinetd) /etc/rc.d/init.d/xinetd
[PST Dec 19 15:29:22] start: (gpm) /etc/rc.d/init.d/gpm
set daemon 10
set logfile /var/tmp/monit.log
set httpd port 1400
allow localhost
allow localhost.localdomain
check sshd with pidfile /var/run/sshd.pid
start program = "/etc/rc.d/init.d/sshd start"
stop program = "/etc/rc.d/init.d/sshd stop"
check gpm with pidfile /var/run/gpm.pid
start program = "/etc/rc.d/init.d/gpm start"
stop program = "/etc/rc.d/init.d/gpm stop"
depend xinetd
check xinetd with pidfile /var/run/xinetd.pid
start program = "/etc/rc.d/init.d/xinetd start"
stop program = "/etc/rc.d/init.d/xinetd stop"
depend sshd
From the monitrc that is checked in:
# depend -- Must be followed by the name of a process that
depends
# on the process given in the check field. This
process
# will be stopped/started before/after the current
# process
To me, this means that if I have gpm->xinetd->sshd
Where sshd doesn't depend on anything, then my monitrc should have
check sshd
depend xinetd
check xinetd
depend gpm
check gpm
Is this correct?
On Thu, 2002-12-19 at 14:39, Jan-Henrik Haukeland wrote:
> Rory Toma <address@hidden> writes:
>
> > This doesn't seem to work. Here is my monitrc:
> >
> > set daemon 10
> > set logfile /var/tmp/monit.log
> > set httpd port 1400
> > allow localhost
> > allow localhost.localdomain
> >
> > check sshd with pidfile /var/run/sshd.pid
> > start program = "/etc/rc.d/init.d/sshd start"
> > stop program = "/etc/rc.d/init.d/sshd stop"
> > depend xinetd
> >
> > check gpm with pidfile /var/run/gpm.pid
> > start program = "/etc/rc.d/init.d/gpm start"
> > stop program = "/etc/rc.d/init.d/gpm stop"
> >
> > check xinetd with pidfile /var/run/xinetd.pid
> > start program = "/etc/rc.d/init.d/xinetd start"
> > stop program = "/etc/rc.d/init.d/xinetd stop"
> > depend gpm
> >
> >
> > When I run "monit stop sshd" I expect the following:
> >
> > stop->gpm->xinetd->sshd
> >
> > and then when I run start:
> >
> > start->sshd->xinetd->gpm
> >
> > Here is the log output:
> >
> > [PST Dec 19 14:00:55] stop: (sshd) /etc/rc.d/init.d/sshd
> > [PST Dec 19 14:00:56] stop: (xinetd) /etc/rc.d/init.d/xinetd
> > [PST Dec 19 14:00:57] stop: (gpm) /etc/rc.d/init.d/gpm
> > [PST Dec 19 14:01:00] start: (gpm) /etc/rc.d/init.d/gpm
> > [PST Dec 19 14:01:01] start: (xinetd) /etc/rc.d/init.d/xinetd
> > [PST Dec 19 14:01:01] start: (sshd) /etc/rc.d/init.d/sshd
> >
> >
> > It seems that the order is incorrect.
>
>
> No this is correct. Lets start with the start, ssh depends on xinetd
> to run before it starts and xinetd on gpm to run before it starts so
> the start order is correct, the same with stop. Don't you agree?
--
Rory Toma address@hidden
VP of Run Level 5 http://www.trs80.net
Digeo Digital http://www.digeo.com
signature.asc
Description: This is a digitally signed message part
- Re: depend take 2, (continued)
- Re: depend take 2, Jan-Henrik Haukeland, 2002/12/20
- Re: depend take 2, Rory Toma, 2002/12/20
- Re: depend take 2, Rory Toma, 2002/12/20
- Re: depend take 2, Jan-Henrik Haukeland, 2002/12/20
- Re: depend take 2, Rory Toma, 2002/12/20
- Re: depend take 2, Christian Hopp, 2002/12/21
- Re: depend take 2, Jan-Henrik Haukeland, 2002/12/20
- Re: depend take 2,
Rory Toma <=
- Re: depend take 2, Rory Toma, 2002/12/19