Set memory limit on service systemd
Apply cgroup limits without editing unit file
systemctl set-property myapp.service MemoryMax=512M CPUQuota=50%
more systemd
all 26 commands →
Show service resource usage
systemctl status myapp.service | grep -E 'Memory:|CPU:|Tasks:'
List all socket units
systemctl list-units --type=socket --all
Mask a service
systemctl mask snapd.service
Show environment of service
systemctl show myapp.service -p Environment
Boot critical chain
systemd-analyze critical-chain <unit>