[pve-devel] [PATCH ksm-control-daemon] ksmtuned: fix large number processing

Stefan Lendl s.lendl at proxmox.com
Thu Feb 29 16:16:11 CET 2024


Roland <devzero at web.de> writes:

> oh, and shouldn't we also add that to total and free_memory calculation,
> even chances are less that the limit is hit there ?
>
> total=`awk '/^MemTotal:/ {print $2}' /proc/meminfo`

total does not require the printf fix because it does not do any
calculation.
The "print $2" operates on string level and prints the 2nd ($2) part of
the string after splitting at whitespaces.




More information about the pve-devel mailing list