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



NNAAMMEE
       probes::basefork - Yet Another Base Class for implementing
       SmokePing Probes

OOVVEERRVVIIEEWW
       Like probes::basevars, but supports the probe-specific
       property `forks' to determine how many processes should be
       run concurrently. The targets are pinged one at a time,
       and the number of pings sent can vary between targets.

SSYYNNOOPPSSYYSS
        *** Probes ***

        + MyForkingProbe
        # run this many concurrent processes
        forks = 10
        # how long does a single 'ping' take
        timeout = 10
        # how many pings to send
        pings = 10

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

        *** Targets ***

        menu = First
        title = First
        host = firsthost
        probe = MyForkingProbe

        menu = Second
        title = Second
        host = secondhost
        probe = MyForkingProbe
        +PROBE_CONF
        pings = 20

DDEESSCCRRIIPPTTIIOONN
       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 ppiinngg method that forks the
       requested number of concurrent processes and calls the
       ppiinnggoonnee method that derived classes must provide.

       The ppiinnggoonnee 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.

       The timeout in which each child has to finish is set to 5
       seconds multiplied by the maximum number of 'pings' of the
       targets. You can set the base timeout differently if you
       want to, using the timeout property of the probe in the
       master config file (this again will be multiplied by the
       maximum number of pings). The probe itself can also over-
       ride the default by providing a TimeOut method which
       returns an integer.

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

       The number of pings sent can be specified in the probe-
       specific variable 'pings', and it can be overridden by
       each target in the 'PROBE_CONF' section.

AAUUTTHHOORR
       Niko Tyni <ntyni@iki.fi>

BBUUGGSS
       The timeout code has only been tested on Linux.

SSEEEE AALLSSOO
       _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.35pre1                    2005-01-04        probes::basefork(3)
