Next Up Previous Contents
Percival Daemons (Services) and Commands

3.2 Percival Daemons (Services) and Commands

There are several daemons that are required for Percival normal operation. The daemons are responsible for data collection, detection of not responding IPs, report generation, web user interface and managing Percival configuration by remote client applications such as Merlin. Every daemon except the webserver must be managed by overlord.pl command.

There are following Percival daemons:

kollector
does all data collection.
thawne.pl
detects not responding network devices.
querymaker.pl
generates all reports
konfigd
provides configuration API to the external clients
httpd
Apache webserver. Needed for Percival Web interface.
Apache is controlled with apachectl command. It is located in /usr/local/avalon/bin. Apache must be managed as user root.

apachectl start
starts apache
apachectl stop
stops apache.
Every other daemon is controlled with overlord.

3.2.1 Controlling Daemons with Overlord

Overlord was developed because amount of Percival daemons2 was increasing rapidly. It was clear that some master daemon is needed to rule them all. You need to know following basic overlord commands:

overlord.pl ping
tells status of each configured daemon
overlord.pl check
tells status of each configured daemon. Restart the daemon if it is not running
overlord.pl list
lists options for each configured daemon
overlord.pl tail <name>
shows last lines of the daemon log
overlord.pl --help
shows all available options and short help
overlord.pl modify <name> <param=value> ...
tweaks daemon options. If you installed from RPM system has very reasonable default values. You should not change them unless you really know what you are doing.

3.2.2 Common Command Line Options

Every Percival process be it a command or daemon understand some common options. These are:

--help
show help message and exit
--version
show version information and exit
--loglevel <level>
controls process output. Level can be either Debug, Info, Warn or Error. Default level is Info. Debug is the most verbose and must not be used in production.
--logfile <file>
controls where to send process output. By default all output goes to STDOUT
Following options are accepted by any process but the process may ignore them. After all it makes no sense to run device configurator command (konfne) as daemon.

--daemon
if specified process becomes a daemon(service)
--interval <seconds>
controls how often daemon should work. For example kollector is run every 120s
Next options are available in Lancelot only. In Percival they will generate an error message.

--cached
turns on Perl based in memory cache. The cache is optimized to be very memory friendly and produces nice speed up. The option is obsoleted.
--hdb
turns on alternative implementation of the configuration database (HDB). HDB database is optimized for speed and provides order of magnitude (and in some cases even more) speedup in comparison with Percival implementation. It is also fully backward compatible with the old database on the API level.

3.2.3 Commands

Percival only has four commands and you already know everything you need about overlord. It leaves three others. One, target.pl, is used for debugging of the configuration database and out of the scope of this chapter. The other, konfne 3, is how you add, update or remove network devices from Percival. In upcoming chapters we will deal with it a lot. The last one, kompile, produces binary database from Percival text based configuration database and downloads device configuration files from device modules. You need to issue this command every time you edit configuration database by hand or if you suspect that Percival database is corrupted.


Next Up Previous Contents