Univention Bugzilla – Bug 48268
Show CPU over-commitment in UVMM
Last modified: 2023-06-28 10:46:08 CEST
Customer wants to see the CPU over-commitment in UVMM.
Number of host CPUs: # <https://libvirt.org/html/libvirt-libvirt-host.html#virNodeInfo> python -c 'import libvirt;c=libvirt.open("qemu:///system");print(c.getInfo()[2])' Number of currently used vCPUs: # <https://libvirt.org/html/libvirt-libvirt-domain.html#virDomainInfo> python -c 'import libvirt;c=libvirt.open("qemu:///system");print(sum(d.info()[3] for d in c.listAllDomains() if d.isActive()))' Number of maximum assigned vCPUs: python -c 'import libvirt;c=libvirt.open("qemu:///system");print(sum(d.info()[3] for d in c.listAllDomains()))' RAM [KiB] on host: python -c 'import libvirt;c=libvirt.open("qemu:///system");print(c.getInfo()[1] * 1024)' # BUG in libvirt-python, which does an extra '>>10' and thus return MiB instead of KiB; patch submitted upstream Current RAM [KiB] allocated for running VMs: (current << maximum RAM due to ballooning) python -c 'import libvirt;c=libvirt.open("qemu:///system");print(sum(d.info()[2] for d in c.listAllDomains() if d.isActive()))' Maximum RAM [KiB] required to run all VMs: python -c 'import libvirt;c=libvirt.open("qemu:///system");print(sum(d.info()[1] for d in c.listAllDomains()))'
Created attachment 9769 [details] [PATCH libvirt-python] virNodeInfo.memory is in KiB
This issue has been filed against UCS 4.3. UCS 4.3 is out of maintenance and many UCS components have changed in later releases. Thus, this issue is now being closed. If this issue still occurs in newer UCS versions, please use "Clone this bug" or reopen it and update the UCS version. In this case please provide detailed information on how this issue is affecting you.