From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id ED7C9BB1ED for ; Fri, 22 Mar 2024 19:05:11 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id CCBB5A1F2 for ; Fri, 22 Mar 2024 19:05:11 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Fri, 22 Mar 2024 19:05:10 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 9327B41A91 for ; Fri, 22 Mar 2024 19:05:10 +0100 (CET) Message-ID: <315511a06b1178a20bfde4c4cbd34a1a111be679.camel@proxmox.com> From: Alexander Zeidler To: pve-devel@lists.proxmox.com Date: Fri, 22 Mar 2024 19:05:09 +0100 In-Reply-To: <20240322135933.164404-8-a.zeidler@proxmox.com> References: <20240322135933.164404-1-a.zeidler@proxmox.com> <20240322135933.164404-8-a.zeidler@proxmox.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.4-2 MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.106 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 Subject: Re: [pve-devel] [PATCH manager 8/9] report: add info about (un)used memory slots 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: , X-List-Received-Date: Fri, 22 Mar 2024 18:05:12 -0000 On Fri, 2024-03-22 at 14:59 +0100, Alexander Zeidler wrote: > * to see if a RAM upgrade is slot/capacity-wise possible > * to spot added/replaced RAM that may now be causing issues >=20 > # dmidecode -t memory ... > Maximum Capacity: 2 TB > Number Of Devices: 8 > Size: 16 GB Micron Technology 18ASF2G72PZ-2G6D1 > Size: 16 GB Micron Technology 18ASF2G72PZ-2G6D1 > Size: 16 GB Micron Technology 18ASF2G72PZ-2G6D1 > Size: 16 GB Micron Technology 18ASF2G72PZ-2G6D1 > Size: No Module Installed > Size: No Module Installed > Size: No Module Installed > Size: No Module Installed >=20 > + 'dmidecode -t memory | grep -E "Capacity|Devices|Size|Manu|Part" | sed= -Ez "s/\n\t(M|P)[^:]*: (\S*)/\t\2/g" | sort', Thank you Mira for pointed out, that the regex is not strict enough on your system. Originally, I limited the strictness as a trade-off to the command length. However, by slightly modifying the output, the command line can be shortened and a higher level of strictness can be achieved: dmidecode -t16,17 | grep -P "^\t(Max[^:]*city|Size|Part)" | sed -Ez "s/\n(\= tP[^\n]*)/\1/g" | sort Maximum Capacity: 2 TB Size: 16 GB Part Number: 18ASF2G72PZ-2G6D1 =20 Size: 16 GB Part Number: 18ASF2G72PZ-2G6D1 =20 Size: 16 GB Part Number: 18ASF2G72PZ-2G6D1 =20 Size: 16 GB Part Number: 18ASF2G72PZ-2G6D1 =20 Size: No Module Installed Size: No Module Installed Size: No Module Installed Size: No Module Installed