probes::basefork(3)         SmokePing         probes::basefork(3)



NNAAMMEE
       probes::basefork - Yet Another Base Class for implementing
       SmokePing Probes

OOVVEERRVVIIEEWW
       Like probes::basevars, but supports the probe-specific
       property `forks' to determine how many processes should be
       run concurrently.

SSYYNNOOPPSSYYSS
        *** Probes ***

        + MyForkingProbe
        # run this many concurrent processes
        forks = 10

        + MyOtherForkingProbe
        # we don't want any concurrent processes at all for some reason.
        forks = 1

DDEESSCCRRIIPPTTIIOONN
       Not all pinger programs support testing multiple hosts in
       a single go like _f_p_i_n_g(1). If the measurement takes long
       enough, there may be not enough time perform all the tests
       in the time available. For example, if the test takes 30
       seconds, measuring ten hosts already fills up the
       SmokePing default five minute step.

       Thus, it may be necessary to do some of the tests concur-
       rently. This module defines the ppiinngg method that forks the
       requested number of concurrent processes and calls the
       ppiinnggoonnee method that derived classes must provide.

       The ppiinnggoonnee method is called with one argument: a hash
       containing the target that is to be measured. The contents
       of the hash are described in _p_r_o_b_e_s_:_:_b_a_s_e_v_a_r_s(3pm).

       The number of concurrent processes is determined by the
       probe-specific variable `forks' and is 5 by default. If
       there are more targets than this value, another round of
       forks is done after the first processes are finished. This
       continues until all the targets have been tested.

       There is a timeout in which each child has to finish. This
       is determined by the Smokeping global database step and
       the `forks' variable:

        timeout = <step> / ceiling(<# of targets> / <forks>)

       If the child isn't finished when the timeout occurs, it
       will be killed along with any processes it has started.

AAUUTTHHOORR
       Niko Tyni <ntyni@iki.fi>

BBUUGGSS
       The timeout code has only been tested on Linux.

SSEEEE AALLSSOO
       _p_r_o_b_e_s_:_:_b_a_s_e_v_a_r_s(3pm), _p_r_o_b_e_s_:_:_E_c_h_o_P_i_n_g(3pm)



1.30                        2004-03-14        probes::basefork(3)
