SLB |
|
Simple Load Balancer |
Sergey Poznyakoff |
SLB User Manual (split by section): | ? |
The most important daemon parameters are the operation mode and wakeup interval. You are not required to explicitly configure them, but you may want to do so, if their default values don't suit you.
There are two operation modes: ‘standalone’ and
‘cron’. In standalone mode, slb
detaches itself from
the controlling terminal and continues operation in the background, as
a daemon. It will periodically wake up, poll the servers,
compute load table and format it to the output file or pipe. This
is the default operation mode.
In cron mode, slb
starts, polls the servers, computes
and formats load table and exits when done. This mode is designed
for use from crontabs, hence its name. It has some limitation,
compared to the standalone mode. Most notably, the d()
function (derivative) is not available in this mode.
If you wish to explicitly set the operation mode, use the ‘standalone’ configuration statement. The statement:
standalone yes; |
configures the standalone mode, whereas the statement:
standalone no; |
configures cron mode. The later can also be requested from the command line, using the ‘--cron’ option.
When operating in standalone mode, the wakeup interval specifies
the amount of time, in seconds, between successive polls. The default
value is 5 minutes. To set another value, use the ‘wakeup’
statement. For example, the following configures slb
to do
a poll each minute:
wakeup 60; |
SLB User Manual (split by section): | ? |
Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.