0

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.

1
  • 2
    systemd is quite feature heavy already, but I don't think that metrics collection/storage is included yet. I'd go the route of exporting metrics and collecting them in a dedicated solution like prometheus github.com/prometheus-community/systemd_exporter for example
    – HBruijn
    Jul 12 at 15:01

0

You must log in to answer this question.

Browse other questions tagged .