public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH qemu-server] api: vmlist: add plugged cpu count to vmlist table
@ 2025-01-10 17:09 Daniel Kral
  0 siblings, 0 replies; only message in thread
From: Daniel Kral @ 2025-01-10 17:09 UTC (permalink / raw)
  To: pve-devel

Includes the maximum amount of cpu cores in the vmlist as it
semantically fits in with the other properties. This allows for a more
comfortable view of a node's VM configured CPU core counts in general
and by users of "pvereport" without calculating each core count manually
with the respective VM's configuration files.

Suggested-by: Hannes Dürr <h.duerr@proxmox.com>
Signed-off-by: Daniel Kral <d.kral@proxmox.com>
---
 PVE/CLI/qm.pm | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/PVE/CLI/qm.pm b/PVE/CLI/qm.pm
index 4214a7ca..389a97d6 100755
--- a/PVE/CLI/qm.pm
+++ b/PVE/CLI/qm.pm
@@ -1124,12 +1124,13 @@ our $cmddef = {
 	my $vmlist = shift;
 	exit 0 if (!scalar(@$vmlist));
 
-	printf "%10s %-20s %-10s %-10s %12s %-10s\n",
-	qw(VMID NAME STATUS MEM(MB) BOOTDISK(GB) PID);
+	printf "%10s %-20s %-10s %-5s %10s %12s %-10s\n",
+	qw(VMID NAME STATUS CORES MEM(MB) BOOTDISK(GB) PID);
 
 	foreach my $rec (sort { $a->{vmid} <=> $b->{vmid} } @$vmlist) {
-	    printf "%10s %-20s %-10s %-10s %12.2f %-10s\n", $rec->{vmid}, $rec->{name},
+	    printf "%10s %-20s %-10s %-5s %10s %12.2f %-10s\n", $rec->{vmid}, $rec->{name},
 	        $rec->{qmpstatus} || $rec->{status},
+		$rec->{cpus} || 0,
 	        ($rec->{maxmem} || 0)/(1024*1024),
 	        ($rec->{maxdisk} || 0)/(1024*1024*1024),
 	        $rec->{pid} || 0;
-- 
2.39.5



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-01-10 17:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-10 17:09 [pve-devel] [PATCH qemu-server] api: vmlist: add plugged cpu count to vmlist table Daniel Kral

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal