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.
The configuration file for the zymonic daemon can be found at:
If it does not exist it should be created. This file can contains settings for all daemon modules run by Zymonic.
|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_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_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 messaging_systems=system1,system2 outgoing_message_process_wait=2
Checking for Crashes
In the log files there should be a message like this:
Started outgoing message handling process for system ztsm: 8379
The number at the end is a system PID. This can be checked to see if its running like this:
$ ps 8379 PID TTY STAT TIME COMMAND 8379 pts/2 S 0:00 perl /usr/local/bin/zymonic_daemon.pl
If there is nothing listed then the process has crashed. Restart the daemon. The PID specific log files should then have further details as to what went wrong.
To run the daemon simply run:
sudo perl /usr/local/bin/zymonic_daemon.pl & disown
To safely stop the running daemon run:
kill -SIGTERM [daemon process id]
This will correctly cleanup and stop the daemon.