Score:0

systemd show the maximum memory a .service has used

bg flag

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.

HBruijn avatar
in flag
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 https://github.com/prometheus-community/systemd_exporter for example
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.