Simple Load Balancer
|SLB User Manual (split by chapter):||?|
The format of
slb invocation is:
slb options args
where options are command line options and args are non-optional arguments.
Non-optional arguments are allowed only if either ‘--test’ or ‘--eval’ option is used in options.
Use file instead of the default configuration file.
Start in cron mode. Normally
slb operates in
daemon mode, in which it polls the monitored servers at fixed
intervals and outputs the resulting load table. In contrast, when in
slb performs a single poll, outputs the table
and exits. This mode is useful when starting
slb from cron,
hence its name.
Notice that the function ‘d’ (derivative, see derivative) does not work in this mode.
Run in foreground mode and print to the standard output what would have otherwise been printed to the output file. This option implies ‘--stderr --debug snmp.1 --debug output.1’. Use additional ‘--debug’ options to get even more info.
The ‘pidfile’ configuration statement is ignored in dry run mode (see pidfile).
Evaluate the named expression name, print its result and exit. Arguments for the expression can be supplied in the form of assignments in the command line, e.g.:
slb --eval=loadavg la1=10 x=18
See section eval, for a detailed discussion of the expression evaluation mode.
Test mode. Instead of polling servers via SNMP,
data from the file given as the first non-option argument on the
command line (or from the standard input, if no arguments are given).
The output is directed to the standard output, unless the
‘--output-file’ option is also given.
See section Test Mode, for a detailed information about the test mode, including a description of the input format.
slb --test input.slb
Show preprocessed configuration and exit.
Parse configuration file, report any errors on the standard error and exit with code 0, if the syntax is OK, and with code 1 otherwise.
Remain in the foreground. Useful for debugging purposes. See foreground statement.
Direct output to file. This option overrides the ‘output-file’ setting in the configuration file. See output-file, for a discussion of file syntax.
Log to the standard error.
Log all diagnostics to syslog.
Define the preprocessor symbol name as having value, or empty. See section Preprocessor.
Add dir to include search path.
See section #include.
Disable preprocessor. see section Preprocessor.
Use command instead of the default preprocessor. see section Preprocessor.
Sets debugging level for the category cat.
Category is a string that designates a part of the program from which the additional debugging information is requested. See below for a list of available categories.
Level is a decimal number between 0 and 100 which indicates how much additional information is required. The level of 0 means ‘no information’ and effectively disables the category in question. The level of 100 means maximum amount of information available. If level is omitted, 100 is assumed.
The following table lists categories available in version 1.0:
Main program block.
Expression grammar and parser.
Expression lexical analyzer.
SNMP request-reply loop.
Configuration file grammar.
Configuration file lexer.
Show configuration syntax summary.
Print a concise usage summary and exit.
Print a summary of command line syntax and exit.
Print the program version and exit.
Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.