Update systemd process supervision authored by Jameson Rollins's avatar Jameson Rollins
...@@ -7,16 +7,25 @@ The AdvLigoRTS now includes [systemd](https://freedesktop.org/wiki/Software/syst ...@@ -7,16 +7,25 @@ The AdvLigoRTS now includes [systemd](https://freedesktop.org/wiki/Software/syst
For RCG models it is recommended to use the `rtcds` command line interface that comes with the `advligorts-rcg` package for building and installing real-time modules, and enabling/starting/stopping the module processes. For RCG models it is recommended to use the `rtcds` command line interface that comes with the `advligorts-rcg` package for building and installing real-time modules, and enabling/starting/stopping the module processes.
Under the hood, the `rtcds` CLI is just issuing commands to systemd to manage things. For general usage it's easier to just use `rtcds`. The following describes what's going on under the hood. Under the hood, the `rtcds` CLI is just issuing commands to systemd to manage things. For general usage it's easier to just use `rtcds`. The following describes what's going on under the hood.
The RTS systemd units use systemd templates. Template units are indicated by the `@` symbol in the unit name. The top The RTS systemd units use systemd templates. Template units are indicated by the `@` symbol in the unit name. Template units allow arbitrary units to be constructed by name on the fly, by providing the template name after the `@` symbol (e.g. `rts@.target` would become: `rts@h1lsc.target`.
* [`rts@.target`](https://git.ligo.org/cds/advligorts/-/blob/master/support/systemd/rts@.target): top level "target" template for an RTS model. This is the primary unit one would interact with, and it makes sure the following dependent units are in the correct state. Here are the suite of template services for a single front end model:
* [`rts@.target`](https://git.ligo.org/cds/advligorts/-/blob/master/support/systemd/rts@.target): top level "target" template for an RTS model. Manages the following:
* [`rts-module@.service`](https://git.ligo.org/cds/advligorts/-/blob/master/support/systemd/rts-module@.service): unit that actually loads/unloads the RTS kernel module * [`rts-module@.service`](https://git.ligo.org/cds/advligorts/-/blob/master/support/systemd/rts-module@.service): unit that actually loads/unloads the RTS kernel module
* [`rts_module_ctrl`](https://git.ligo.org/cds/advligorts/-/blob/master/support/bin/rts_module_ctrl): wrapper script to load/unload kernel module * [`rts_module_ctrl`](https://git.ligo.org/cds/advligorts/-/blob/master/support/bin/rts_module_ctrl): wrapper script to load/unload kernel module
* [`rts-epics@.service`](https://git.ligo.org/cds/advligorts/-/blob/master/support/systemd/rts-epics@.service): EPICS IOC service * [`rts-epics@.service`](https://git.ligo.org/cds/advligorts/-/blob/master/support/systemd/rts-epics@.service): EPICS IOC service, calls:
* [`rts_epics_exec`](https://git.ligo.org/cds/advligorts/-/blob/master/support/bin/rts_epics_exec): wrapper script to exec EPICS IOC process * [`rts_epics_exec`](https://git.ligo.org/cds/advligorts/-/blob/master/support/bin/rts_epics_exec): wrapper script to exec EPICS IOC process
* [`rts-awgtpman@.service`](https://git.ligo.org/cds/advligorts/-/blob/master/support/systemd/rts-awgtpman@.service): awgtpman service * [`rts-awgtpman@.service`](https://git.ligo.org/cds/advligorts/-/blob/master/support/systemd/rts-awgtpman@.service): awgtpman service, calls:
* [`rts_awgtpman_exec`](https://git.ligo.org/cds/advligorts/-/blob/master/support/bin/rts_awgtpman_exec): wrapper script to exec awgtpman process * [`rts_awgtpman_exec`](https://git.ligo.org/cds/advligorts/-/blob/master/support/bin/rts_awgtpman_exec): wrapper script to exec awgtpman process
The `rts@target` is the primary unit to interact with. If you want to start the `h1lsc` model you would execute:
```shell
# sudo systemctl start rts@h1lsc.target
```
That would then start the `rts-module@h1lsc.service` to load the kernel module, the `rts-epics@h1lsc.service` to start the EPICS IOC process, and the `rts-awgtpman@h1lsc.service` to start the awgtpman process.
## DAQD ## DAQD
The DAQD components are managed directly with systemd via `systemctl`. Here are the various available services. The DAQD components are managed directly with systemd via `systemctl`. Here are the various available services.
... ...
......