Skip to content

Instantly share code, notes, and snippets.

@mttjohnson
Created December 9, 2016 19:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mttjohnson/0398519752580b8a3559197cde4701d3 to your computer and use it in GitHub Desktop.
Save mttjohnson/0398519752580b8a3559197cde4701d3 to your computer and use it in GitHub Desktop.
Managing SystemD
# CentoOS 7 - Systemctl
# https://www.digitalocean.com/community/tutorials/how-to-use-systemctl-to-manage-systemd-services-and-units
# https://www.digitalocean.com/community/tutorials/understanding-systemd-units-and-unit-files
# Enabled user space units
/etc/systemd/system/multi-user.target.wants/varnish.service
# System library of available units
/usr/lib/systemd/system/varnish.service
# override system unit
systemctl edit varnish
systemctl start varnish
systemctl status varnish
# --- Monitoring / Debugging
# see the status of all varnish units managed by systemctl
systemctl list-unit-files
systemctl list-unit-files | grep "varnish"
# find default target
systemctl get-default
# watch the systemctl journel for any varnish service activity or error messages
journalctl -f -u varnish
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment