... | ... | @@ -2,6 +2,13 @@ |
|
|
|
|
|
The AdvLigoRTS now includes [systemd](https://freedesktop.org/wiki/Software/systemd) integration for the RCG modules and the various components of the DAQD system. If you're installing the RTS from native debian packaging systemd support is automatically installed.
|
|
|
|
|
|
One interacts with systemd via the [systemctl](https://www.freedesktop.org/software/systemd/man/systemctl.html) command line interface.
|
|
|
|
|
|
Useful links:
|
|
|
* https://freedesktop.org/wiki/Software/systemd
|
|
|
* https://wiki.archlinux.org/index.php/Systemd
|
|
|
|
|
|
|
|
|
## RTS front end models
|
|
|
|
|
|
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.
|
... | ... | @@ -21,7 +28,7 @@ Here are the suite of template services for a single front end model: |
|
|
|
|
|
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
|
|
|
# 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.
|
|
|
|
... | ... | @@ -38,20 +45,42 @@ The DAQD components are managed directly with systemd via `systemctl`. Here are |
|
|
|
|
|
The services are controlled via `systemctl`:
|
|
|
```shell
|
|
|
$ sudo systemctl enable rts-daqd.service
|
|
|
$ sudo systemctl start rts-daqd.service
|
|
|
$ sudo systemctl stop rts-daqd.service
|
|
|
# systemctl enable rts-daqd.service
|
|
|
# systemctl start rts-daqd.service
|
|
|
# systemctl stop rts-daqd.service
|
|
|
```
|
|
|
|
|
|
### distributed front ends
|
|
|
|
|
|
The various distributed front end transport mechanisms (available in separate `advligorts-transport-*` packages) also include service units. The same package holds both the 'xmit' and 'recv' services and would be installed on both the front end and the data concentrator. On the front end, to enable and start the 'cps' transport sender:
|
|
|
```shell
|
|
|
$ sudo systemctl enable --now rts-cps_xmit.service
|
|
|
# systemctl enable --now rts-cps_xmit.service
|
|
|
```
|
|
|
On the data concentrator run:
|
|
|
```shell
|
|
|
$ sudo systemctl enable --now rts-cps_recv.service
|
|
|
# systemctl enable --now rts-cps_recv.service
|
|
|
```
|
|
|
|
|
|
## config for systemd services
|
|
|
|
|
|
The main advligorts config location is the `/etc/advligorts/env` environment file. This defines environment variables that are picked up and used in the various systemd units.
|
|
|
|
|
|
## customizing units
|
|
|
|
|
|
If for some reason you need to customize a systemd unit, the best way is to use "overrides" or "drop-ins" (don't edit the files provided by the packages). ArchWiki has a nice description of [how to edit provided unit](https://wiki.archlinux.org/index.php/Systemd#Editing_provided_units).
|
|
|
|
|
|
Systemd provides a nice interface to do this using the `systemctl edit` command. To edit unit `unit.service`, run the following command:
|
|
|
```
|
|
|
# systemctl edit unit.serice
|
|
|
```
|
|
|
This will create a "drop-in" override in:
|
|
|
```
|
|
|
/etc/systemd/system/unit.service.d/
|
|
|
```
|
|
|
|
|
|
To completely replace a unit file use `systemctl edit --full`, which creates a replacement unit in `/etc/systemd/system` (e.g. `/etc/systemd/system/unit.service`).
|
|
|
|
|
|
If you've made changes manually, reload systemd:
|
|
|
```shell
|
|
|
# systemctl daemon-reload
|
|
|
``` |
|
|
\ No newline at end of file |