I can see the current memory usage of a systemd
service with systemctl show -p MemoryCurrent update-data.service
(after I've set MemoryAccounting=yes
).
Is there anyway to see, from systemd, the maximum amount of memory a service has used in it's lifetime?
This service is called from a .timer
to update, and process, some data, and then stop. I'd like to know the maximum amount of memory each run of the service has used. I don't want to limit the memory, just report the maximum that MemoryCurrent
has ever had.
systemd version v245 on ubuntu linux focal (20.04) or later.