[pve-devel] [PATCH manager 8/9] report: add info about (un)used memory slots
Alexander Zeidler
a.zeidler at proxmox.com
Fri Mar 22 19:05:09 CET 2024
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
>
> # 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
>
> + '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
Size: 16 GB Part Number: 18ASF2G72PZ-2G6D1
Size: 16 GB Part Number: 18ASF2G72PZ-2G6D1
Size: 16 GB Part Number: 18ASF2G72PZ-2G6D1
Size: No Module Installed
Size: No Module Installed
Size: No Module Installed
Size: No Module Installed
More information about the pve-devel
mailing list