Linux Command Check Memory Slots

4/15/2022by admin

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

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

Memory

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.

Linux Command To Check Memory Slots

Commands to Check Memory Use in Linux cat Command to Show Linux Memory Information Entering cat /proc/meminfo in your terminal opens the /proc/meminfo file. This is a virtual file that reports the amount of available and used memory. Red Hat Enterprise Linux ships a memory test tool called memtest86+. It is a bootable utility that tests physical memory by writing various patterns to it and reading them back. Since memtest86+ runs directly off the hardware it does not require any operating system support for execution. Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un.x-like operating systems. It only takes a minute to sign up. So now you need to install and lookup a command to find out such basic information as the memory type when Linux used to tell you in dmesg and the BSD’s still do. I guess ‘modern’ Linux get’s more like windows every day.

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

Linux command check memory slots slot

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.

Command

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.

Linux Command Check Memory Slots Free

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..

Linux Command Check Memory Slots Slot



Linux Command Check Memory Slots Vegas World

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

Linux Command Check Memory Slots Windows 10

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

Comments are closed.