<div dir="ltr">thanks for your reply.<div><br></div><div>odds enough, on both aforementioned boxes, MemoryAccounting is set to no:</div><div><br></div><div><div> $ systemctl show crond | grep MemoryAccounting</div><div> MemoryAccounting=no</div></div><div><br></div><div>besides, I found that box B could also output a correct TasksCurrent value, but with setting `TasksAccounting=no`:</div><div><br></div><div> $ systemctl show crond | grep Tasks</div><div> TasksCurrent=1</div><div> TasksAccounting=no</div><div> TasksMax=18446744073709551615 </div><div><br></div><div>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.</div><div><br></div><div>Regards,</div><div class="gmail_extra"><div><div class="gmail-m_8419153338706888828gmail_signature"><div dir="ltr"><div><br>Xie Shi<br><a href="http://xerr.net/" target="_blank">http://xerr.net/</a><br><br></div></div></div></div>
<br><div class="gmail_quote">On Tue, Jul 24, 2018 at 8:33 PM, Lennart Poettering <span dir="ltr"><<a href="mailto:lennart@poettering.net" target="_blank">lennart@poettering.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span>On Di, 24.07.18 20:12, George Xie (<a href="mailto:georgexsh@gmail.com" target="_blank">georgexsh@gmail.com</a>) wrote:<br>
<br>
> on box A, systemctl show outputs an incorrect value for unit memory usage:<br>
> <br>
> [box A] $ systemctl show crond | grep MemoryCurrent<br>
> MemoryCurrent=184467440737095<wbr>51615<br>
> <br>
> 18446744073709551615 == UINT64_MAX, this must be incorrect.<br>
<br>
</span>This is returned if memory accounting is not enabled for the unit.<br>
<br>
Set MemoryAccounting=yes in the unit to enable it.<br>
<span class="gmail-m_8419153338706888828HOEnZb"><font color="#888888"><br>
Lennart<br>
<br>
-- <br>
Lennart Poettering, Red Hat<br>
</font></span></blockquote></div><br></div></div>