<div dir="ltr"><div>on box A, systemctl show outputs an incorrect value for unit memory usage:</div><div><br></div><div>    [box A] $ systemctl show crond | grep MemoryCurrent</div><div>    MemoryCurrent=18446744073709551615</div><div><br></div><div>18446744073709551615 == UINT64_MAX, this must be incorrect.</div><div><br></div><div>another box B with the similar setup could get correct memory usage:</div><div><br></div><div>    [box B] $ systemctl show crond | grep MemoryCurrent</div><div>    MemoryCurrent=1490944</div><div><br></div><div>both machine use CentOS7 and pre-shipped systemd 219:</div><div><br></div><div>    # systemctl --version</div><div>    systemd 219</div><div>    +PAM +AUDIT +SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 -SECCOMP +BLKID +ELFUTILS +KMOD +IDN</div><div><br></div><div>I've traced systemctl.c in SRPM, it looks like the output of `MemoryCurrent` is directly from `property_get_current_memory()` via sdbus,</div><div>which is read from "/sys/fs/cgroup/memory/system.slice/crond.service/memory.usage_in_bytes", box B has this path but box A doesn't. I guess this the root cause, but no idea why there is no such cgroup virtual path.</div><div><br></div><div>how could I make systemctl/systemd get correct memory usage?</div><div><br></div><div><div class="gmail_signature"><div dir="ltr"><div><br>--<br>Xie Shi<br><a href="http://xerr.net/" target="_blank">http://xerr.net/</a><br><br></div></div></div></div>
</div>