[pve-devel] [PATCH common 0/1] Add cpu core count to node status API
Mike Beattie
mike at ethernal.org
Fri May 29 12:58:51 CEST 2020
This is useful for when collecting data for Guest OS licensing (Microsoft)
where physical core count matters, not socket or thread count.
The "cpus" value counts threads when Hyperthreading is enabled.
Math could be carried out based on the existence of " ht " in the flags
entry, but that would entail a cpu model map to threads/core. It is
simpler to just sum the 'cpu cores' line from each unique physical cpu
in /proc/cpuinfo, which this patch does (by slightly abusing the hash
used to count sockets).
Mike Beattie (1):
Add cpu core count to /nodes/{id}/status API result
src/PVE/ProcFSTools.pm | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
--
2.20.1
More information about the pve-devel
mailing list