Skip to content
Snippets Groups Projects
Commit 2ece3646 authored by Alexander Soderqvist's avatar Alexander Soderqvist
Browse files

Added systemd service specification to work around problem, see README file.

parent db2bc054
No related branches found
No related tags found
No related merge requests found
----NOTICE----
The lebt emu has an unclear/unidentified issue with running as ioc user.
However a hint may be that a different database behavior was observed when it comes to the signalling of that all detector finished in scanDAQDetTrig.template from scanning module.
This seems to only occur when running as ioc user. The effect is that the scan hangs because the counter record: $(DEVICE):$(DETTRG)-DETCNT in scanDAQDetTrig.template is incremented incorrectly, maybe due to abundant or insufficient number of processing for each point in the inner scan.
The work around is to run the ioc as root user. A special systemd service has been constructed to this without interferring with standard ioc booting procedure.
The systemd service specification should be placed in the root file system under /etc/systemd/system/
To reload systemd services run: systemctl daemon-reload
To start the ioc: systemctl start emu-lebt
[Unit]
Description=IOC: emu-lebt
After=rc-local.service
[Service]
User=root
# Only execute IOC if st.cmd exists
AssertPathExists=/opt/startup/ioc/VME_EMU-iamspecial/emu/st.cmd
# Execute StartPre with root permissions
ExecStartPre=/bin/mkdir -p /var/log/procServ
ExecStartPre=/bin/chown -R ioc:ioc /var/log/procServ
ExecStartPre=/bin/mkdir -p /var/run/procServ/emu
ExecStartPre=/bin/chown -R ioc:ioc /var/run/procServ/emu
EnvironmentFile=/opt/startup/ioc/VME_EMU-iamspecial/emu/env.sh
# Run procServ with user ioc
ExecStart=/usr/bin/procServ --allow -f -L /var/log/procServ/out-emu -i ^C^D -c /var/run/procServ/%i ${PROCSERV_PORT} ${EPICS_MODULES_PATH}/environment/${ENVIRONMENT_VERSION}/${BASE}/bin/${EPICS_HOST_ARCH}/iocsh /opt/startup/ioc/VME_EMU-iamspecial/%i/st.cmd -n emu
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment