Show live memory of a unit
Read live cgroup metrics from systemd without ps; MemoryCurrent includes page cache, so it is not pure RSS
systemctl show -p MainPID,MemoryCurrent,TasksCurrent <unit>
- tool
- systemd26 commands
More systemd commands
-
systemctl reset-failed && systemctl list-units --state=failedReset failure counters so units can start again after StartLimitBurst, then list what is still failed
-
systemd-run --on-calendar='*-*-* 03:00:00' --unit=backup /usr/local/bin/backup.shRun backup.sh every day at 03:00 without writing unit files; the timer is gone after reboot
-
systemctl set-property --runtime <unit> MemoryMax=512M CPUQuota=50%Apply cgroup limits now without a restart; --runtime makes them temporary, so they are gone after reboot
-
systemctl list-jobsShow running start/stop jobs to debug a hung boot or a unit stuck in activating
-
systemctl enable --now myapp.serviceTurn on start at boot and start the service now with one command