Zymonic Daemon: Difference between revisions

From Zymonic
Content added Content deleted
(Created page with "=Zymonic Daemon= 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 w...")
 
No edit summary
Line 14: Line 14:
If it does not exist it should be created. This file can contains settings for all daemon modules run by Zymonic.
If it does not exist it should be created. This file can contains settings for all daemon modules run by Zymonic.


{| class="wikitable"
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.
!Name !!Type !!Required !!Default !!Description
log_directory string No /var/log/zymonic_daemon Used to specify which directory log field should go to.
|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.
In additional to the general settings above, each module will have it's own settings.


==Locking==
==Locking==
{| class="wikitable"
Name Type Required Default Description
|-
locking_type string Yes N/A Used 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.
!Name !!Type !!Required !!Default !!Description
locking_host string Yes N/A Used to specify which machine to start locking process running on.
|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_port int Yes N/A Used to specify which port to start locking process running on.
|-
|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==
==Messaging==
{| class="wikitable"
Name Type Required Default Description
|-
messaging_systems comma-separated list Yes N/A List of system names which use messaging.
!Name !!Type !!Required !!Default !!Description
outgoing_message_process_wait int No 1 How long to wait between checks for outgoing messages, in seconds.
|-
|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:
An example config file is:
<pre>

modules=Locking,Messaging
modules=Locking,Messaging
locking_type=Redis
locking_type=Redis
Line 37: Line 52:
message_systems=system1,system2
message_systems=system1,system2
outgoing_message_process_wait=2
outgoing_message_process_wait=2
</pre>


==Running==
==Running==
To run the daemon simply run:
To run the daemon simply run:
<pre>

sudo perl /usr/local/bin/zymonic_daemon.pl & disown
sudo perl /usr/local/bin/zymonic_daemon.pl & disown
</pre>


==Stopping==
==Stopping==
To safely stop the running daemon run:
To safely stop the running daemon run:
<pre>

kill -SIGTERM [daemon process id]
kill -SIGTERM [daemon process id]
</pre>

This will correctly cleanup and stop the daemon.
This will correctly cleanup and stop the daemon.

Revision as of 09:15, 28 September 2022

Zymonic Daemon

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

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

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

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

To run the daemon simply run:

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

Stopping

To safely stop the running daemon run:

kill -SIGTERM [daemon process id]

This will correctly cleanup and stop the daemon.