public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Kaiyang Wu <wukaiyang2003@gmail.com>
To: pve-devel@lists.proxmox.com
Cc: Kaiyang Wu <wukaiyang@loongfans.cn>
Subject: [PATCH pve-manager] pveperf: make bogomips regular expression case insensitive
Date: Tue,  4 Aug 2026 21:54:44 +0800	[thread overview]
Message-ID: <20260804135444.31822-1-wukaiyang@loongfans.cn> (raw)

'pveperf' prints 0 BogoMIPS on arm64 due to the key in '/proc/cpuinfo'
being named "BogoMIPS" instead of "bogomips". Make the regular
expression case insensitive to match both "bogomips" on x86-64 and
"BogoMIPS" on arm64.

Signed-off-by: Kaiyang Wu <wukaiyang@loongfans.cn>
---
 bin/pveperf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/pveperf b/bin/pveperf
index 39b020e0..0ef4dbd7 100755
--- a/bin/pveperf
+++ b/bin/pveperf
@@ -28,7 +28,7 @@ sub test_bogomips {
     open(TMP, "/proc/cpuinfo");
 
     while (my $line = <TMP>) {
-        if ($line =~ m/^bogomips\s*:\s*(\d+\.\d+)\s*$/) {
+        if ($line =~ m/^bogomips\s*:\s*(\d+\.\d+)\s*$/i) {
             $bogomips += $1;
         }
     }
-- 
2.55.0




                 reply	other threads:[~2026-08-04 13:55 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20260804135444.31822-1-wukaiyang@loongfans.cn \
    --to=wukaiyang2003@gmail.com \
    --cc=pve-devel@lists.proxmox.com \
    --cc=wukaiyang@loongfans.cn \
    /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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal