I have a daemon service application runing a Ubuntu server(20.04.1). The total phisical memory is 2G, and the swap space is 4G.
Sometime my service was killed by OS quietly, eventhough I add OOMScoreAdjust=-1000
into my systemd service descripting file at /etc/systemd/system/
, but it is a critical app should NOT be killed.
I guess that the reason why it be killed maybe is it used too more memory.
I need to get detail logs about the memory usage of my service, for example, a log entry every minute, so that I can fingure out the max value of that, and adjust the requirements of others services such as postgresql.
It is a daemon app and running a cloud VPS, so I can NOT start a top
command and be watching it continuously.
Is there a way, in which I can generate such a log?
Thanks!