From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id E83E31FF37F for ; Thu, 18 Apr 2024 12:24:46 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 9E8D91A785; Thu, 18 Apr 2024 12:24:47 +0200 (CEST) Message-ID: Date: Thu, 18 Apr 2024 12:24:45 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: pve-devel@lists.proxmox.com References: <20240418091650.51366-1-a.zeidler@proxmox.com> <20240418091650.51366-5-a.zeidler@proxmox.com> Content-Language: en-US From: Mira Limbeck In-Reply-To: <20240418091650.51366-5-a.zeidler@proxmox.com> X-SPAM-LEVEL: Spam detection results: 0 AWL 0.296 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [report.pm, proxmox.com] Subject: Re: [pve-devel] [PATCH manager 5/7] report: overhaul `dmidecode` related output X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" On 4/18/24 11:16, Alexander Zeidler wrote: > While using keywords (-t bios,...) would be possible, depending on the > server it also bloats the report with uninteresting information, > hiding the relevant. > > Therefore the non-grouped, specific number types are used. Where we > only need specific information, not serial numbers etc., we print the > information from /sys/... which is the same source that dmidecode uses > per default. > > New output includes: > > sys_vendor: HP > product_name: ProLiant DL380p Gen8 > product_version: Not specified Would it be possible to align these correctly, or just use a single space between type and value? >> and > > board_vendor: ASUSTeK COMPUTER INC. > board_name: Z13PP-D32 Series > board_version: 60SB09M0-SB0G11 > > also because there are not always both data blocks available. > > `-t 0`: > (like the previous "BIOS" output, but without "BIOS Language" block) > > `-t 3`: > Chassis Information > Manufacturer: HP > Type: Rack Mount Chassis > Boot-up State: Critical > Power Supply State: Critical > Thermal State: Safe > Number Of Power Cords: 2 > (...) > > and > > `-t 32`: > System Boot Information > Status: Firmware-detected hardware failure > > which can hint to Proxmox-independant issues, debug-able via IPMI. > > Signed-off-by: Alexander Zeidler > --- > v2: > * reformat and extend board output > * add product output > * adapt dmidecode output > > v1: https://lists.proxmox.com/pipermail/pve-devel/2024-March/062350.html > > > PVE/Report.pm | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/PVE/Report.pm b/PVE/Report.pm > index 1ed91c8e..9d1b9b27 100644 > --- a/PVE/Report.pm > +++ b/PVE/Report.pm > @@ -110,7 +110,9 @@ my $init_report_cmds = sub { > hardware => { > order => 70, > cmds => [ > - 'dmidecode -t bios', > + 'cd /sys/devices/virtual/dmi/id; grep -HT "" sys_vendor product_name product_version', > + 'cd /sys/devices/virtual/dmi/id; grep -HT "" board_vendor board_name board_version', I'd prefer explicit commands like: cat /sys/devices/virtual/dmi/id/sys_vendor cat /sys/devices/virtual/dmi/id/product_name cat /sys/devices/virtual/dmi/id/product_version This results in a few more lines in the report, since we have the following structure: # # ... Adding at least one additional newline per file read, but there would be no need for cd-ing, printing the filename with grep and trying to align the output. > + 'dmidecode -t 0,3,32', > 'lspci -nnk', > ], > }, _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel