---
name: "basefork.pm"
section: "1"
platform: "linux"
package: "smokeping"
version: "1.6-2"
release: "Debian 3.0 (Woody)"
platforms: ["linux"]
url: "https://new.carta.tech/basefork.pm"
---

# basefork.pm(1)

Yet Another Base Class for implementing SmokePing Probes

## NAME

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

## OVERVIEW

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

## SYNOPSYS

```
 *** Probes ***
```

```
 + MyForkingProbe
 # run this many concurrent processes
 forks = 10
```

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

## DESCRIPTION

Not all pinger programs support testing multiple hosts in a single go like *fping*(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 concurrently. This module defines the **ping** method that forks the requested number of concurrent  processes and calls the **pingone** method that derived classes must provide.

The **pingone** method is called with one argument: a hash containing the target that is to be measured. The contents of the hash are described in *probes::basevars*(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.

## AUTHOR

Niko Tyni \<ntyni@iki.fi\>

## BUGS

Doesn't signal failures in child processes, partly because SmokePing  hasn't any logging features after daemonization.

## SEE ALSO

probes::basevars(3pm), probes::EchoPing(3pm)
