3/30/2022»»Wednesday

Linux Memory Slots Info

3/30/2022
Linux Memory Slots Info 6,6/10 4759 reviews

It is essential that your Linux system runs at an optimal level. A few simple terminal commands provide access to all relevant information and help you monitor memory statistics. In this tutorial, learn five powerful commands to check memory usage in Linux. I have a BL860c i2 server with HP-UX 11.31 running on it. I want to find out the no of DIMM slots in my servers, Memory module size etc. Is there any such command to get these information Also note that its tuckwila server so cstm doesnt work on it. Any help would be greatly appreciated!!

Got a Nice post by Mr. Rvkumar on his blog, posting it here.. So the Admins can read and take benefit of it.
  • First check the actual memory Info from the either “top” or “free -m” command.
  • Check the “dmidecode” output for the DIMM slot and each RAM size
FREE COMMAND OUTPUT
So the below command shows that we have around 2GB of memory installed in the system.
[root@bravo]# free -m
total used free shared buffers cached
Mem: 2026 1585 440 0 222 551
-/+ buffers/cache: 811 1215
Swap: 4094 0 4094
TOP COMMAND OUTPUT
Let’s verify our understanding of memory available using the TOP command which also shows that we have approx 2GB memory approx.
[root@bravo]# top
top – 13:18:56 up 216 days, 4:12, 3 users, load average: 0.14, 0.11, 0.09
Tasks: 199 total, 1 running, 198 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.8% us, 1.4% sy, 0.0% ni, 97.4% id, 0.3% wa, 0.0% hi, 0.0% si
Mem: 2074900k total, 1623648k used, 451252k free, 227816k buffers
Swap: 4192924k total, 296k used, 4192628k free, 565160k cached
DMIDECODE COMMAND
Run the DMIDECODE command and look for the data where the word “Physical Memory Array” starts and go through each line to get detailed information. In some new systems you can also use the command dmidecode –s memory and dmidecode –t 17 , where “s” means string and “t” means type. Let’s just use dmidecode here for now.
Summary of the memory data
——————————————————————————————-
Maximum memory that the ON BOARD memoryslots can accept is= 8GB
Type of memory = DDR
Error Correction Type: Single-bit ECC
Size of each DIMM = 1024 MB (1GB)
DIMM Speed = 333 MHz (3.0 ns)
Number of DIMM slots = Total4 DIMM slots and only 2 DIMM slots are filled with 1GB memory each
Note: where ever the Memory module is not installed the “Size” would show as “Size: No Module Installed”
——————————————————————————————-
[root@bravo]# dmidecode more
So here is the summary of the Info that we are looking from the Important Information we have from the dmidecode data
Handle 0×1000
DMI type 16, 15 bytes.
LinuxPhysical Memory Array
Location: System Board Or Motherboard
Use: System Memory
Error Correction Type: Single-bit ECC
Maximum Capacity: 8 GB
Error Information Handle: Not Provided
Number Of Devices: 4
Handle 0×1100
DMI type 17, 23 bytes.
Memory Device
Array Handle: 0×1000
Error Information Handle: Not Provided

Linux Free Memory

Total Width: 72 bits
Data Width: 64 bitsLinux Memory Slots Info
Size: 1024 MB
Form Factor: DIMM

GetSet: 1

Linux Get Memory Slot Info


Locator: DIMM 01
Bank Locator: Not Specified
Type: DDR
InfoType Detail: Synchronous
Speed: 333 MHz (3.0 ns)
Handle 0×1101
DMI type 17, 23 bytes.
Memory Device
Array Handle: 0×1000
Error Information Handle: Not Provided
Total Width: 72 bits
Data Width: 64 bits
Size: 1024 MB
Form Factor: DIMM
Set: 1
Locator: DIMM 02
Bank Locator: Not Specified
Type: DDR
Type Detail: Synchronous
Speed: 333 MHz (3.0 ns)
Handle 0×1102
DMI type 17, 23 bytes.
Memory Device
Array Handle: 0×1000
Error Information Handle: Not Provided
Total Width: 72 bits
Data Width: 64 bits
Size: No Module Installed
Form Factor: DIMM
Set: 2
Locator: DIMM 03
Bank Locator: Not Specified
Type: DDR
Type Detail: Synchronous
Speed: 333 MHz (3.0 ns)
Handle 0×1103
DMI type 17, 23 bytes.
Memory Device
Array Handle: 0×1000
Error Information Handle: Not Provided
Total Width: 72 bits
Data Width: 64 bits
Size: No Module Installed
Form Factor: DIMM
Set: 2
Locator: DIMM 04
Bank Locator: Not Specified
Type: DDR
Type Detail: Synchronous
Speed: 333 MHz (3.0 ns)
So here is my learning for the day. So I am signing of for the day looking forward to learn something new tomorrow. Infact there are couple of things that I have learnt today and I would try to either share it today or tomorrow in my new post.
Also, one thing that I started believing these days is that there is no job which is small or waste of time. We just have to look at the learning that we can grab from it. I am sure every job teaches us something might not be technical always but I am sure we would have some thing to learn from it directly or in directly.

lspci stands for list pci. Think of this command as “ls” + “pci”.

This will display information about all the PCI bus in your server.

Apart from displaying information about the bus, it will also display information about all the hardware devices that are connected to your PCI and PCIe bus.

For example, it will display information about Ethernet cards, RAID controllers, Video cards, etc.
lspci utility is part of the pciutils package.

If you don’t have pciutilis, install it on your system as shown below.

1. Default Usage

By default it will display all the device information as shown below. The first field is the slot information in this format: [domain:]bus:device.function

In this example, since all the domain are 0, lspci will not display the domain.

Note: In all the examples below, we’ll be showing only partial output by picking couple of devices from the above list.

2. Dump PCI Info in Different Format

If you want to pass the output of the lspci command to a shell script, you may want to use -m option (or -mm option) as shown below.

This option is also helpful when you want to view the subsystem information. For example, for the RAID controller, the default output just says that is is using LSI Logic RAID controller. But, the following output displays the subsystem, which is DELL PERC H700 Integrated RAID controller system.

3. Output in Tree Format

The -t option will display the output in tree format with information about bus, and how devices are connected to those buses as shown below. The output will be only using the numerical ids.

4. Detailed Device Information

If you want to look into details of a particular device, use -v to get more information. This will display information about all the devices. The output of this command will be very long, and you need to scroll down and view the appropriate section.

For additional level for verbosity, you can use -vv or -vvv.

In the following example, I’ve given output of only the RAID controller device.

5. Display Device Codes in the Output

If you want to display the PCI vendor code, and the device code only as the numbers, use -n option. This will not lookup the PCI file to get the corresponding values for the numbers.

If you want to display both the description and the number, use the option -nn as shown below.

6. Lookup a Specific Device

When you know the slot number in the domain:bus:slot.func format, you can query for a particular device as shown below. In the following example, we didn’t specify the domain number, as it is 0, which can be left out.

When you know the device number in the vendor:device format, you can query for a particular device as shown below.

If you know only either the vendor id, or the device id, you can omit the other id. For example, both the following command will return the same output as the above.

7. Display Kernel Drivers

This is very helpful when you like to know the name of the kernel module that will be handling the operations of a particular device. Please note that this option will work only on Kernel 2.6 version and above.

> Add your comment

If you enjoyed this article, you might also like..



Next post: What is Cloud Computing? Introduction to Cloud Service Models

Previous post: How to Combine Ping and Traceroute On Linux Using MTR Command Examples