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 _______________________________________________ pve-devel mailing list pve-devel@pve.proxmox.com https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel