Zymonic Daemon

From Zymonic

Zymonic Daemon[edit]

The zymonic daemon is a generic daemon which will handle zymonic functionality which needs to run as a daemon, i.e. as a background process. Currently the only functionality used by it is Locking and Messaging.

If a system it not using Locking or Messaging then there is no need to configure and run the daemon. However, if the system is using Locking or Messaging then the configuration is required and the daemon should be running, otherwise the system will produce errors on usage, e.g. cannot find daemon settings, missing parameters for locking.

IMPORTANT: If using locking, ensure Zymonic Caches are correctly setup and the dependent modules are all installed.

Configuration[edit]

The configuration file for the zymonic daemon can be found at:

/etc/zymonic/daemon.conf

If it does not exist it should be created. This file can contains settings for all daemon modules run by Zymonic.

Name Type Required Default Description
modules comma-separated list Yes N/A Used to specify which modules should be loaded and run by the daemon.
log_directory string No /var/log/zymonic_daemon Used to specify which directory log field should go to.

In additional to the general settings above, each module will have it's own settings.

Locking[edit]

Name Type Required Default Description
locking_type string Yes N/A U sed to specify which locking cache type to use. Current options are Memcached and Redis. See Zymonic Caches. If using Redis then daemon needs to be run as root.
locking_host string Yes N/A Used to specify which machine to start locking process running on.
locking_port int Yes N/A Used to specify which port to start locking process running on.


Messaging[edit]

Name Type Required Default Description
messaging_systems comma-separated list Yes N/A List of system names which use messaging.
outgoing_message_process_wait int No 1 How long to wait between checks for outgoing messages, in seconds.

An example config file is:

modules=Locking,Messaging
locking_type=Redis
locking_host=127.0.0.1
locking_port=7777
message_systems=system1,system2
outgoing_message_process_wait=2

Running[edit]

To run the daemon simply run:

sudo perl /usr/local/bin/zymonic_daemon.pl & disown

Stopping[edit]

To safely stop the running daemon run:

kill -SIGTERM [daemon process id]

This will correctly cleanup and stop the daemon.