[smokeping-users] slave smokeping spawn problem

Tobias Oetiker tobi at oetiker.ch
Tue Dec 4 23:42:04 CET 2007


Hi Russel,

it did not fix it for me ... I have updated the patch again ...
please check the svn trunk ... to see if it still works for you ...

cheers
tobi

Today Russell Dwarshuis wrote:

> That fixed the problem, thanks!
>
>
>                                           -Russell Dwarshuis
>
> On Sat, 1 Dec 2007, Tobias Oetiker wrote:
>
> > Hi Russell,
> >
> > can you try this patch:
> >
> > Index: lib/Smokeping.pm
> > ===================================================================
> > --- lib/Smokeping.pm    (revision 891)
> > +++ lib/Smokeping.pm    (working copy)
> > @@ -3755,7 +3755,7 @@
> >             shared_secret => $secret,
> >             slave_name => $opt{'slave-name'} || hostname(),
> >         };
> > -        # this should get us a config set from the server
> > +        # this should get us an initial  config set from the server
> >         my $new_conf = Smokeping::Slave::submit_results($slave_cfg,$cfg);
> >         if ($new_conf){
> >             $cfg=$new_conf;
> > @@ -3844,7 +3844,7 @@
> >                 $gothup = 1;
> >         };
> >         while (1) { # just wait for the signals
> > -                sleep;
> > +                sleep; #sleep until we get a signal
> >                 next unless $gothup;
> >                 $reloading = 1;
> >                 $gothup = 0;
> > @@ -3963,13 +3963,8 @@
> >         my %sortercache;
> >         if ($opt{'master-url'}){
> >             my $new_conf = Smokeping::Slave::submit_results
> > $slave_cfg,$cfg,$myprobe,$probes;
> > -            if ($new_conf){
> > -                $cfg=$new_conf;
> > -                $probes = undef;
> > -                $probes = load_probes $cfg;
> > -                $cfg->{__probes} = $probes;
> > -                add_targets($cfg, $probes, $cfg->{Targets},
> > $cfg->{General}{datadir});
> > -                goto RESTART;
> > +            if ($new_conf){
> > +                kill $$, SIGHUP;
> >             }
> >         } else {
> >             update_rrds $cfg, $probes, $cfg->{Targets},
> > $cfg->{General}{datadir}, $myprobe, \%sortercache;
> >
> >
> >
> > cheers
> > tobi
> >
> > Nov 7 Russell Dwarshuis wrote:
> >
> > > I noticed a problem on a slave.  I had too many smokeping processes
> > > running.
> > >
> > > It occurs when I make a change to the config file on the master.  The
> > > changes get accepted by the slave, but I think it also spawns new
> > > smokeping probe processes for each one already running.
> > >
> > > In other words, on an idle slave I'll normally see
> > > ps -Ao 'args'
> > > /usr/bin/perl -w /usr/local/smokeping/bin/smokeping --master-url=blahblah
> > > ./smokeping [Curl]
> > > ./smokeping [FPing]
> > > ./smokeping [DNS]
> > >
> > > But after I make a change to the config file on the master, I get
> > > ps -Ao 'args'
> > > /usr/bin/perl -w /usr/local/smokeping/bin/smokeping --master-url=blahblah
> > > ./smokeping [Curl]
> > > ./smokeping [FPing]
> > > ./smokeping [DNS]
> > > ./smokeping [Curl] [Curl]
> > > ./smokeping [Curl] [FPing]
> > > ./smokeping [Curl] [DNS]
> > > ./smokeping [FPing] [Curl]
> > > ./smokeping [FPing] [FPing]
> > > ./smokeping [FPing] [DNS]
> > > ./smokeping [DNS] [Curl]
> > > ./smokeping [DNS] [FPing]
> > > ./smokeping [DNS] [DNS]
> > >
> > > The work-around is to pkill -QUIT smokeping on the slave and restart
> > > smokeping.
> > >
> > >
> > >                                            -Russell Dwarshuis
> > >
> > > _______________________________________________
> > > smokeping-users mailing list
> > > smokeping-users at lists.oetiker.ch
> > > https://lists.oetiker.ch/cgi-bin/listinfo/smokeping-users
> > >
> > >
> >
> > --
> > Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten
> > http://it.oetiker.ch tobi at oetiker.ch ++41 62 213 9902
> >
>
>

-- 
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten
http://it.oetiker.ch tobi at oetiker.ch ++41 62 213 9902



More information about the smokeping-users mailing list