supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
* Bigbrother in supervised mode
@ 2004-06-17 12:43 Asif Iqbal
  2004-06-24  7:09 ` Asif Iqbal
  0 siblings, 1 reply; 3+ messages in thread
From: Asif Iqbal @ 2004-06-17 12:43 UTC (permalink / raw)


Hi All

Has anyone ever setup bigbrother (http://www.bb4.com) in supervise mode?

I will need some help starting bigbrother as supervised

Thanks

-- 
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
There's no place like 127.0.0.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Bigbrother in supervised mode
  2004-06-17 12:43 Bigbrother in supervised mode Asif Iqbal
@ 2004-06-24  7:09 ` Asif Iqbal
  2004-06-24 14:01   ` Paul Jarc
  0 siblings, 1 reply; 3+ messages in thread
From: Asif Iqbal @ 2004-06-24  7:09 UTC (permalink / raw)


Asif Iqbal wrote:
> Hi All
> 
> Has anyone ever setup bigbrother (http://www.bb4.com) in supervise mode?
> 
> I will need some help starting bigbrother as supervised
> 
> Thanks
> 

Some details on how the bigbrother daemon script runbb.sh starts

Here is how it gets called. Adding the start argument is *optional*. You
need to send stop signal to stop it


su - bbro /export/home/bbro/bb/runbb.sh $1

# cat runbb.sh
[...]
$BBHOME/bin/bbd >> $BBOUT 2>&1
[...]
{ sleep 30; nohup $BBHOME/bin/bbrun $BBHOME/bin/bb-network.sh ;} >> $BBOUT 2>&1 &
[...]
{ sleep 90; nohup $BBHOME/bin/bbrun -a $BBHOME/bin/bb-display.sh ;} >> $BBOUT 2>&1 &
[...]
{ sleep $EXTSTARTSLEEP; nohup $BBHOME/bin/bbrun -a $BBHOME/ext/$file ;} >> $BBOUT 2>&1 &
[...]
{ nohup $BBHOME/bin/bbrun -a $BBHOME/bin/bb-local.sh ;} >> $BBOUT 2>&1 &

In the above script bbrun is designed to run every 300 secs

Here is where I need help

my bbd run script is

#!/bin/sh
exec 2>&1
exec setuidgid bbro /export/home/bbro/bb/runbb.sh

and my bbd log run script is

#!/bin/sh
exec multilog t /var/log/bbd

I noticed it is keep calling the runbb.sh script. Here is what the log
says

tail -f /var/log/bbd/current

@4000000040da7c0017658e2c Starting the Big Brother System & Network monitor
@4000000040da7c0035a085f4 Big Brother is already running, aborting start procedure
@4000000040da7c032d33192c Starting the Big Brother System & Network monitor
@4000000040da7c0422d6b95c Big Brother is already running, aborting start procedure
[..repeating..]

svstat /service/bbd shows running 1-4 secs then 0 and the 1-4 secs again
svstat /service/bbd/log shows running fine with secs adding gradually

Basically I do not want more that one runbb.sh to run and start it if
someone just kill the process using kill -9 or similar signal. I want it
to not start another runbb.sh if one is running already. Also when I svc
-d /service/bbd I want it to kill the runbb.sh and all the processes
called by it

Is it possible through supervised way?

Thanks for all the help

> -- 
> Asif Iqbal
> PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
> There's no place like 127.0.0.1

-- 
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
There's no place like 127.0.0.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Bigbrother in supervised mode
  2004-06-24  7:09 ` Asif Iqbal
@ 2004-06-24 14:01   ` Paul Jarc
  0 siblings, 0 replies; 3+ messages in thread
From: Paul Jarc @ 2004-06-24 14:01 UTC (permalink / raw)


Asif Iqbal <iqbala-supervision@qwestip.net> wrote:
> @4000000040da7c0017658e2c Starting the Big Brother System & Network monitor
> @4000000040da7c0035a085f4 Big Brother is already running, aborting start procedure
> @4000000040da7c032d33192c Starting the Big Brother System & Network monitor
> @4000000040da7c0422d6b95c Big Brother is already running, aborting start procedure
> [..repeating..]
>
> svstat /service/bbd shows running 1-4 secs then 0 and the 1-4 secs again

It seems that runbb.sh puts itself in the background.  This means
that, as far as supervise can tell, the service has gone down, and so
supervise tries to restart it.

If there's a way to configure bb to stay in the foreground, do that.
(Otherwise, you'll have to use fghack.)  Ideally, it should run in the
same process that was originally the ./run script, without leaving a
shell or anything in between.  (If runbb.sh ends with "something &",
you could try changing that to "exec something".)  If a shell process
is left there, or if you have to use fghack, then you won't be able to
use svc -d, although you will get automatic restarts when bb really
does go down.

> Also when I svc -d /service/bbd I want it to kill the runbb.sh and
> all the processes called by it

All it will do directly is kill the top-level process.  Hopefully, bb
will react to that by killing all the processes it started before it
exits.


paul


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-06-24 14:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-17 12:43 Bigbrother in supervised mode Asif Iqbal
2004-06-24  7:09 ` Asif Iqbal
2004-06-24 14:01   ` Paul Jarc

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).