From: Fiona Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH common 1/2] procfs tools: cpuinfo: also return CPU vendor and family
Date: Mon, 19 Jan 2026 17:01:03 +0100 [thread overview]
Message-ID: <20260119160122.177390-2-f.ebner@proxmox.com> (raw)
In-Reply-To: <20260119160122.177390-1-f.ebner@proxmox.com>
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
src/PVE/ProcFSTools.pm | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/PVE/ProcFSTools.pm b/src/PVE/ProcFSTools.pm
index a37a4bd..18a159d 100644
--- a/src/PVE/ProcFSTools.pm
+++ b/src/PVE/ProcFSTools.pm
@@ -28,6 +28,8 @@ sub read_cpuinfo {
my $res = {
user_hz => $clock_ticks,
+ vendor => 'unknown',
+ family => 0,
model => 'unknown',
mhz => 0,
cpus => 1,
@@ -46,6 +48,10 @@ sub read_cpuinfo {
$count++;
} elsif ($line =~ m/^model\s+name\s*:\s*(.*)\s*$/i) {
$res->{model} = $1 if $res->{model} eq 'unknown';
+ } elsif ($line =~ m/^vendor_id\s*:\s*(\S*)\s*$/i) {
+ $res->{vendor} = $1 if $res->{vendor} eq 'unknown';
+ } elsif ($line =~ m/^cpu family\s*:\s*(\d+)\s*$/i) {
+ $res->{family} = $1 if !$res->{family};
} elsif ($line =~ m/^cpu\s+MHz\s*:\s*(\d+\.\d+)\s*$/i) {
$res->{mhz} = $1 if !$res->{mhz};
} elsif ($line =~ m/^flags\s*:\s*(.*)$/) {
--
2.47.3
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next prev parent reply other threads:[~2026-01-19 16:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-19 16:01 [pve-devel] [PATCH common/qemu-server 0/2] vm start: catch outdated Zen 5 firmware Fiona Ebner
2026-01-19 16:01 ` Fiona Ebner [this message]
2026-01-19 16:01 ` [pve-devel] [PATCH qemu-server 2/2] " Fiona Ebner
2026-01-19 16:36 ` [pve-devel] [PATCH common/qemu-server 0/2] " Markus Frank
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260119160122.177390-2-f.ebner@proxmox.com \
--to=f.ebner@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox