[systemd-devel] systemctl show outputs incorrect MemoryCurrent value

Michal Sekletar msekleta at redhat.com
Wed Jul 25 11:26:48 UTC 2018


On Wed, Jul 25, 2018 at 5:25 AM George Xie <georgexsh at gmail.com> wrote:
>
> thanks for your reply.
>
> odds enough, on both aforementioned boxes, MemoryAccounting is set to no:

There is probably some other service that had MemoryAccounting=yes
which in turn effectively (even though dbus property doesn't reflect
that) enabled MemoryAccounting on all "sibling" services.

> the good news is, after setting `DefaultMemoryAccounting=yes` in /etc/systemd/system.conf, and a `systemctl daemon-reexec`, all units have correct memory usage info.

Tasks and memory accounting is now enabled by default in upstream so I
figure these weird issues are more visible on CentOS where accounting
still defaults to "no".

Michal


More information about the systemd-devel mailing list