The problem with mon and INIT is the following:

- assuming we are in runlevel 3.
- I start mon by "/etc/init.d/mon start". Then "/usr/sbin/mon" process is
- the I switch to runlevel 5
- when INIT discover that runlevel 5 is reached then reads from

Amon:5:respawn:/usr/sbin/mon -c /etc/mon/
(or sth similar: "startproc /usr/sbin/mon ...")

that it should start "/usr/sbin/mon -c /etc/mon/", but such process
is already running!
INIT does not know it (for some reason) and tries to run its own instance
of mon process.
This fails 10 times since it is not possible to run more than 1 instance
of mon process that listens on 28583 port.
That's why INIT complains every 5 minutes:

INIT: Id "Amon" respawning too fast: disabled for 5 minutes

I changed the way mon is started:
- I turned off mon service by "chkconfig mon off"
- add "/usr/sbin/mon -l -c /etc/mon/ </dev/null > /dev/console 2>&1"
to /etc/inittab
- then just switched to runlevel 5 and mon is started automatically

Now when I kill mon process INIT automatially respawn it.

I believe this is the best solution im my situation...
Thanks for all suggestions!

On Thu, 20 Sep 2007, Jim Trocki wrote:

> On Thu, 20 Sep 2007, Zbigniew Kuzera wrote:
> > Hi,
> >
> > I am using mon utility on SuSE 9.3.
> >
> > I would like you to ask if you know some way to make mon process
> > "unkillable".
> >
> > I start mon by /etc/init.d/mon start.
> > My goal is to make mon respawnable.
> >
> > I tried to add the following entry to /etc/initab:
> > Amon:5:respawn:/usr/sbin/mon -c /etc/mon/ </dev/null >/dev/console
> > 2>&1
> > but then "init" complained about:
> > ipgw0202 mon[28583]: fatal, could not bind TCP server port 2583: Address
> > already in use
> when i add this to /etc/inittab on my SLES10 box, it fires up mon just
> fine, and restarts it when i kill it:
> mon:3:respawn:/usr/sbin/mon -l -c /etc/mon/

mon mailing list

Reply via email to