zynq supervisord - ComPair/ComPair-tracker-FPGA GitHub Wiki
Supervisord on the Zynq
We are going to use supervisord to manage long-running processes. This is a simple tutorial on installation, configuration, and usage.
Currently, only silayer_server
is supervised. This means that the server will come up when the zynq is powered on, and if any errors happen that kill the server process, supervisord will automatically restart the server.
Install
Once you have this repo cloned, change into the src/petalinux/apps
directory, and run:
make supervisord
This command will end with something like ==== Supervisord install complete ====
printed.
Configuration
The install process should setup a configuration to run the silayer_server
persistently. The configuration file is found on the zynq at /etc/supervisor/supervisord.conf
. If you want to make changes after supervisord has been installed, this is the file to modify on the zynq.
The source for supervisord.conf
within the repo is at src/petalinux/apps/build-scripts/resources/etc/supervisor/
, if you want to make changes that everyone should abide by.
While silayer_server
is running under supervisord, stdout and stderr are configured to redirect to file. On the zynq, these files are found at /home/root/zynq/log/supervisord/silayer_server.[err|out].log
. The .err.log file is the one with all the action.
Usage
To interact with the supervisor, use the supervisorctl command line tool. In a nutshell:
- Check status:
supervisorctl status
- Stop silayer server:
supervisorctl stop silayer_server
- Stop all supervised processes:
supervisorctl stop all
- Start silayer server:
supervisorctl start silayer_server
- Start all:
supervisorctl start all
- Restart silayer server:
supervisorctl restart silayer_server
- Restart all:
supervisorctl restart all
- Drop to supervisorctl shell:
supervisorctl