Home:ALL Converter>Get memory usage of a unit in journald

Get memory usage of a unit in journald

Ask Time:2016-08-21T21:07:25         Author:motam

Json Formatter

I have some units in systemd that I want that they log the memory usage of themselves in their logs(where I can check them using journald). Is systemd can do this automatically and log the memory usage in a predefined period in journald log file? If not, what is the simple way to do this in ubuntu?

Author:motam,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/39064532/get-memory-usage-of-a-unit-in-journald
yy