On 13/6/23 04:30, The Wanderer wrote:
On 2023-06-12 at 16:06, Mick Ab wrote:

I wish to obtain information about the RAM installed on my PC using the
command line. The information needed is :-

Total RAM stored
Number of sticks used and amount of RAM on each stick
Type of RAM e.g. DDR4
Speed of RAM e.g. 3200 MHz
Manufacturer and model number of RAM

I have seen the dmidecode command being used, but the reliability of the
information returned is not reliable.

Is there any command that will reliably give the required RAM information ?

There are probably multiple ways to get it, but the first one that comes
to my mind involves the 'hwinfo' command, from the package of the same
name.

I don't remember exactly how I invoked it, but I have a historical trail
of files listing the hardware specifications of my last few machines as
they've changed over time, each generated from the output of that
command.


If I search the latest such file for "DIMM", I see two entries, each for
a different DIMM (i.e., "RAM stick"), each with multiple data items. The
fact that there are two of them gives you the "number of sticks used"
you asked for.

Those entries are sub-entries of a larger entry called "memory", which
has a data item called "size", which is the "total RAM" you asked for.

One of the data items in each sub-entry is "product", which appears as
if it might be the "model number" you asked for. (It certainly looks
like a model number, anyway.)

Another is "vendor", which appears to be the "manufacturer" you asked
for.

Another is "size", which gives you the "amount of RAM on each stick" you
asked for.

Another is "clock", which is the "speed of RAM" you asked for.

Another is "description", which at least in my case specifies (as part
of what appears to be a freeform string) that the DIMMs I'm looking at
are DDR4. I don't see that information specified anywhere else in the
listing.


From the above, whilst this computer is running Linux Mint Mate 21.1, which is based (?) on Ubuntu 22.04 ("jammy"), rather than Debian, I expect that the same will apply for Debian;

"
Tue Jun 13 04:32:24 bret@bret-Precision-Tower-5810:~$hwinfo
Command 'hwinfo' not found, but can be installed with:
sudo apt install hwinfo
Tue Jun 13 04:32:40 bret@bret-Precision-Tower-5810:~$sudo apt install hwinfo
[sudo] password for bret:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  libhd21 libx86emu3
The following NEW packages will be installed
  hwinfo libhd21 libx86emu3
0 to upgrade, 3 to newly install, 0 to remove and 5 not to upgrade.
Need to get 808 kB of archives.
After this operation, 3,581 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://archive.ubuntu.com/ubuntu jammy/universe amd64 libx86emu3 amd64 3.1-2 [47.8 kB] Get:2 http://archive.ubuntu.com/ubuntu jammy/universe amd64 libhd21 amd64 21.72-1 [742 kB] Get:3 http://archive.ubuntu.com/ubuntu jammy/universe amd64 hwinfo amd64 21.72-1 [18.0 kB]
Fetched 808 kB in 3s (266 kB/s)
Selecting previously unselected package libx86emu3:amd64.
(Reading database ... 540233 files and directories currently installed.)
Preparing to unpack .../libx86emu3_3.1-2_amd64.deb ...
Unpacking libx86emu3:amd64 (3.1-2) ...
Selecting previously unselected package libhd21:amd64.
Preparing to unpack .../libhd21_21.72-1_amd64.deb ...
Unpacking libhd21:amd64 (21.72-1) ...
Selecting previously unselected package hwinfo.
Preparing to unpack .../hwinfo_21.72-1_amd64.deb ...
Unpacking hwinfo (21.72-1) ...
Setting up libx86emu3:amd64 (3.1-2) ...
Setting up libhd21:amd64 (21.72-1) ...
Setting up hwinfo (21.72-1) ...
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for libc-bin (2.35-0ubuntu3.1) ...
Tue Jun 13 04:33:23 bret@bret-Precision-Tower-5810:~$hwinfo
"

and, in the output (lots of it - it outputs alot of details), is

"
P: /devices/virtual/dmi/id
  L: 0
  E: DEVPATH=/devices/virtual/dmi/id
  E: SUBSYSTEM=dmi
E: MODALIAS=dmi:bvnDellInc.:bvrA34:bd10/19/2020:br65.34:svnDellInc.:pnPrecisionTower5810:pvr:rvnDellInc.:rn0K240Y:rvrA02:cvnDellInc.:ct7:cvr:sku0617:
  E: USEC_INITIALIZED=2533353
  E: ID_VENDOR=Dell Inc.
  E: ID_MODEL=Precision Tower 5810
  E: MEMORY_ARRAY_LOCATION=System Board Or Motherboard
  E: MEMORY_ARRAY_EC_TYPE=Multi-bit ECC
  E: MEMORY_ARRAY_MAX_CAPACITY=137438953472
  E: MEMORY_DEVICE_0_TOTAL_WIDTH=72
  E: MEMORY_DEVICE_0_DATA_WIDTH=64
  E: MEMORY_DEVICE_0_SIZE=17179869184
  E: MEMORY_DEVICE_0_FORM_FACTOR=RIMM
  E: MEMORY_DEVICE_0_LOCATOR=DIMM1
  E: MEMORY_DEVICE_0_BANK_LOCATOR=Not Specified
  E: MEMORY_DEVICE_0_TYPE=DDR4
  E: MEMORY_DEVICE_0_TYPE_DETAIL=Synchronous
  E: MEMORY_DEVICE_0_SPEED_MTS=2133
  E: MEMORY_DEVICE_0_MANUFACTURER=Samsung
  E: MEMORY_DEVICE_0_SERIAL_NUMBER=400F4723
  E: MEMORY_DEVICE_0_ASSET_TAG=02081530
  E: MEMORY_DEVICE_0_PART_NUMBER=M393A2G40DB0-CPB
  E: MEMORY_DEVICE_0_RANK=2
  E: MEMORY_DEVICE_0_CONFIGURED_SPEED_MTS=1866
  E: MEMORY_DEVICE_1_TOTAL_WIDTH=72
  E: MEMORY_DEVICE_1_DATA_WIDTH=64
  E: MEMORY_DEVICE_1_SIZE=17179869184
  E: MEMORY_DEVICE_1_FORM_FACTOR=RIMM
  E: MEMORY_DEVICE_1_LOCATOR=DIMM5
  E: MEMORY_DEVICE_1_BANK_LOCATOR=Not Specified
  E: MEMORY_DEVICE_1_TYPE=DDR4
  E: MEMORY_DEVICE_1_TYPE_DETAIL=Synchronous
  E: MEMORY_DEVICE_1_SPEED_MTS=2133
  E: MEMORY_DEVICE_1_MANUFACTURER=Samsung
  E: MEMORY_DEVICE_1_SERIAL_NUMBER=39FDE464
  E: MEMORY_DEVICE_1_ASSET_TAG=020515B1
  E: MEMORY_DEVICE_1_PART_NUMBER=M393A2G40DB0-CPB
  E: MEMORY_DEVICE_1_RANK=2
  E: MEMORY_DEVICE_1_CONFIGURED_SPEED_MTS=1866
  E: MEMORY_DEVICE_2_TOTAL_WIDTH=72
  E: MEMORY_DEVICE_2_DATA_WIDTH=64
  E: MEMORY_DEVICE_2_SIZE=17179869184
  E: MEMORY_DEVICE_2_FORM_FACTOR=RIMM
  E: MEMORY_DEVICE_2_LOCATOR=DIMM3
  E: MEMORY_DEVICE_2_BANK_LOCATOR=Not Specified
  E: MEMORY_DEVICE_2_TYPE=DDR4
  E: MEMORY_DEVICE_2_TYPE_DETAIL=Synchronous
  E: MEMORY_DEVICE_2_SPEED_MTS=2133
  E: MEMORY_DEVICE_2_MANUFACTURER=Samsung
  E: MEMORY_DEVICE_2_SERIAL_NUMBER=400F473D
  E: MEMORY_DEVICE_2_ASSET_TAG=02081530
  E: MEMORY_DEVICE_2_PART_NUMBER=M393A2G40DB0-CPB
  E: MEMORY_DEVICE_2_RANK=2
  E: MEMORY_DEVICE_2_CONFIGURED_SPEED_MTS=1866
  E: MEMORY_DEVICE_3_TOTAL_WIDTH=72
  E: MEMORY_DEVICE_3_DATA_WIDTH=64
  E: MEMORY_DEVICE_3_SIZE=17179869184
  E: MEMORY_DEVICE_3_FORM_FACTOR=RIMM
  E: MEMORY_DEVICE_3_LOCATOR=DIMM7
  E: MEMORY_DEVICE_3_BANK_LOCATOR=Not Specified
  E: MEMORY_DEVICE_3_TYPE=DDR4
  E: MEMORY_DEVICE_3_TYPE_DETAIL=Synchronous
  E: MEMORY_DEVICE_3_SPEED_MTS=2133
  E: MEMORY_DEVICE_3_MANUFACTURER=Samsung
  E: MEMORY_DEVICE_3_SERIAL_NUMBER=39FDD7B6
  E: MEMORY_DEVICE_3_ASSET_TAG=020515B1
  E: MEMORY_DEVICE_3_PART_NUMBER=M393A2G40DB0-CPB
  E: MEMORY_DEVICE_3_RANK=2
  E: MEMORY_DEVICE_3_CONFIGURED_SPEED_MTS=1866
  E: MEMORY_DEVICE_4_TOTAL_WIDTH=72
  E: MEMORY_DEVICE_4_DATA_WIDTH=64
  E: MEMORY_DEVICE_4_SIZE=17179869184
  E: MEMORY_DEVICE_4_FORM_FACTOR=RIMM
  E: MEMORY_DEVICE_4_LOCATOR=DIMM2
  E: MEMORY_DEVICE_4_BANK_LOCATOR=Not Specified
  E: MEMORY_DEVICE_4_TYPE=DDR4
  E: MEMORY_DEVICE_4_TYPE_DETAIL=Synchronous
  E: MEMORY_DEVICE_4_SPEED_MTS=2133
  E: MEMORY_DEVICE_4_MANUFACTURER=Samsung
  E: MEMORY_DEVICE_4_SERIAL_NUMBER=400F4830
  E: MEMORY_DEVICE_4_ASSET_TAG=02081530
  E: MEMORY_DEVICE_4_PART_NUMBER=M393A2G40DB0-CPB
  E: MEMORY_DEVICE_4_RANK=2
  E: MEMORY_DEVICE_4_CONFIGURED_SPEED_MTS=1866
  E: MEMORY_DEVICE_5_TOTAL_WIDTH=72
  E: MEMORY_DEVICE_5_DATA_WIDTH=64
  E: MEMORY_DEVICE_5_SIZE=17179869184
  E: MEMORY_DEVICE_5_FORM_FACTOR=RIMM
  E: MEMORY_DEVICE_5_LOCATOR=DIMM6
  E: MEMORY_DEVICE_5_BANK_LOCATOR=Not Specified
  E: MEMORY_DEVICE_5_TYPE=DDR4
  E: MEMORY_DEVICE_5_TYPE_DETAIL=Synchronous
  E: MEMORY_DEVICE_5_SPEED_MTS=2133
  E: MEMORY_DEVICE_5_MANUFACTURER=Samsung
  E: MEMORY_DEVICE_5_SERIAL_NUMBER=39FDD7CA
  E: MEMORY_DEVICE_5_ASSET_TAG=020515B1
  E: MEMORY_DEVICE_5_PART_NUMBER=M393A2G40DB0-CPB
  E: MEMORY_DEVICE_5_RANK=2
  E: MEMORY_DEVICE_5_CONFIGURED_SPEED_MTS=1866
  E: MEMORY_DEVICE_6_TOTAL_WIDTH=72
  E: MEMORY_DEVICE_6_DATA_WIDTH=64
  E: MEMORY_DEVICE_6_SIZE=17179869184
  E: MEMORY_DEVICE_6_FORM_FACTOR=RIMM
  E: MEMORY_DEVICE_6_LOCATOR=DIMM4
  E: MEMORY_DEVICE_6_BANK_LOCATOR=Not Specified
  E: MEMORY_DEVICE_6_TYPE=DDR4
  E: MEMORY_DEVICE_6_TYPE_DETAIL=Synchronous
  E: MEMORY_DEVICE_6_SPEED_MTS=2133
  E: MEMORY_DEVICE_6_MANUFACTURER=Samsung
  E: MEMORY_DEVICE_6_SERIAL_NUMBER=400F4722
  E: MEMORY_DEVICE_6_ASSET_TAG=02081530
  E: MEMORY_DEVICE_6_PART_NUMBER=M393A2G40DB0-CPB
  E: MEMORY_DEVICE_6_RANK=2
  E: MEMORY_DEVICE_6_CONFIGURED_SPEED_MTS=1866
  E: MEMORY_DEVICE_7_TOTAL_WIDTH=72
  E: MEMORY_DEVICE_7_DATA_WIDTH=64
  E: MEMORY_DEVICE_7_SIZE=17179869184
  E: MEMORY_DEVICE_7_FORM_FACTOR=RIMM
  E: MEMORY_DEVICE_7_LOCATOR=DIMM8
  E: MEMORY_DEVICE_7_BANK_LOCATOR=Not Specified
  E: MEMORY_DEVICE_7_TYPE=DDR4
  E: MEMORY_DEVICE_7_TYPE_DETAIL=Synchronous
  E: MEMORY_DEVICE_7_SPEED_MTS=2133
  E: MEMORY_DEVICE_7_MANUFACTURER=Samsung
  E: MEMORY_DEVICE_7_SERIAL_NUMBER=39FDD7C9
  E: MEMORY_DEVICE_7_ASSET_TAG=020515B1
  E: MEMORY_DEVICE_7_PART_NUMBER=M393A2G40DB0-CPB
  E: MEMORY_DEVICE_7_RANK=2
  E: MEMORY_DEVICE_7_CONFIGURED_SPEED_MTS=1866
  E: MEMORY_ARRAY_NUM_DEVICES=8
"

so, 8 x 16GB = 128GB.

I assume that this is what the original poster sought.

..
Bret Busby
Armadale
West Australia
(UTC+0800)
..............

Reply via email to