System processes like php-fpm, redis and varnish that run under the user account can be managed using systemctl.
You can also list and restart services using our command line tool mnage.
For all mnage options check the mnage page.
# check the status of a service
systemctl status php-fpm@8.3
# reload services
systemctl reload php-fpm@8.3
# restart a service
systemctl restart php-fpm@8.3
You can use journalctl to check on processes running under your account.
# To view logs from a specific date (in YYYY-MM-DD format), use:
journalctl --since="2022-03-01 00:00:00"
# To follow the log (useful for long running services), use:
journalctl -f
# If you know the name of a systemd unit, you can view its logs with:
journalctl -u ${SERVICE}
You can also use systemctl in scripts.
# Get your user id
export XDG_RUNTIME_DIR="/run/user/$(id -u)"
# Run systemctl as the user.
systemctl --user restart ${SERVICE}
systemctl --user reload ${SERVICE}
Was dit artikel nuttig?
Dat is fantastisch!
Hartelijk dank voor uw beoordeling
Sorry dat we u niet konden helpen
Hartelijk dank voor uw beoordeling
Feedback verzonden
We stellen uw moeite op prijs en zullen proberen het artikel te verbeteren