thanks for your reply.

odds enough, on both aforementioned boxes, MemoryAccounting is set to no:

    $ systemctl show crond | grep MemoryAccounting
    MemoryAccounting=no

besides, I found that box B could also output a correct TasksCurrent value,
but with setting `TasksAccounting=no`:

    $ systemctl show crond | grep Tasks
    TasksCurrent=1
    TasksAccounting=no
    TasksMax=18446744073709551615

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.

Regards,

Xie Shi
http://xerr.net/


On Tue, Jul 24, 2018 at 8:33 PM, Lennart Poettering <[email protected]>
wrote:

> On Di, 24.07.18 20:12, George Xie ([email protected]) wrote:
>
> > on box A, systemctl show outputs an incorrect value for unit memory
> usage:
> >
> >     [box A] $ systemctl show crond | grep MemoryCurrent
> >     MemoryCurrent=18446744073709551615
> >
> > 18446744073709551615 == UINT64_MAX, this must be incorrect.
>
> This is returned if memory accounting is not enabled for the unit.
>
> Set MemoryAccounting=yes in the unit to enable it.
>
> Lennart
>
> --
> Lennart Poettering, Red Hat
>
_______________________________________________
systemd-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to