Linux Get Memory Slot Info
We have a lot of servers. There are different type of vendors and products. Tracking them about theirs hardware is hard work. For example to get ram information by opening all cases of servers is impossible. Here comes Linux magic. Linux provides a lot of commands. We can use dmidecode like below.
- Get Cpu Info Linux
- Linux Get Memory
- Pc Memory Slot
- Linux Get Free Memory
- Linux Get Memory Slot Info Free
- Linux Get Memory Slot Info App
dmidecode is very useful command which can provide information about hardware of the system. dmidecode will list a lot of information about CPU, Memory, Mainboard, Devices, Network etc. by default without providing any option. We will use --type 17 option in order to print detailed Memory or RAM information like below.
An article explaining how to check physical memory (RAM) in the Linux server. 4 different commands to get memory information from the Linux server. Checking physical memory (RAM) In this article we will see basic commands to check physical memory on a server in Linux.
- Jan 27, 2013 Finding RAM size details in Linux for a System admin is very easy task. We can use free command to check how much RAM is present in our system. But when you want to find how many RAM/Memory sa lots are present in your system is bit tricky one. One way to do open your system and check what sa lots are there and how much RAM.
- I would like to get the available memory reported as a percentage using a Linux command line. I used the free command, but that is only giving me numbers, and there is no option for percentage.
We can see that the system has 2048 MB RAM and multiple RAM slots.
As we have seen that dmidecode will print a lot of information about the RAM but if we want to strictly filter the RAM size we can use grep command like below by providing Size term.
Like RAM size we can also print the frequency of the RAM with grep command. As frequency is expressed with MHz we will provide Speed to the grep command.
Memory/RAM has physically different form factors. Currently DIMM or SODIMM is very popular. We can get this information with the following command.
There are a number of ways you can get information about the processor on your Linux system. I’ll show you my favorite tool for this task along with a few additional ways to check CPUs in Linux.
Get CPU info with lscpu command
This is the simplest command that shows the CPU information in a simple and concise output.
You can see the architecture of your system, number of processors, vendor information, cache information, processor speed etc.
It’s easier to remember as well because it is similar to the ls command. You can think of it as ‘list cpu’.
Well… that’s the processor information for my system and it should look somewhat similar for your Linux system as well.
As you can see, the most important information is that my system has Intel i5-7200U processor. I can go and search on the web for this model number to get more information.
But what does other fields in the output mean? What information do you really have about the processor here? Let me explain it to you. The information is too technical so you should have some basic understanding of the terms here.
lscpu command output explanation
The architecture for my system is 64-bit. Which means it’s a 64-bit processor.
The CPU op-mods are 32 bit and 64 bit meaning that it can operate both as a 32-bit and 64-bit processor. In other words, you can install both 32-bit and 64-bit operating systems on it.
Byte order is Little Endian. Which means that bytes are arranged as per Little Endian order.
The next 4 lines tells you about the number of processors, CPUs/cores and threads. I would suggest reading this article to understand a bit about processors. This picture from Intel also helps in visualizing what socket, CPU, core, threads mean.

We have to go in the reverse order here. My system has 1 socket here which means it has one single chip for the CPUs.
That one socket has 2 cores. It means that the single chip has two physical CPUs on it. This tells you the number of real cores i.e. the actual physical CPUs.
And as you can see, each core has two threads. Threads are basically logical CPUs. The threads share physical execution resources of the physical core but the operating system sees them as separate cores. Read more on hyper- threading here.
In short, my system has one chip that contains two physical CPUs and each CPU is divided into two logical CPUs. And thus my dual core system is seen as having 4 CPUs by the operating system.
There is one NUMA node, the vendor is Intel and the CPU family is 6.
The CPU model number is 142 (not relevant in my opinion) and the model name is Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz (most important info).
Stepping is a number used by Intel to identify what level of design change a microprocessor was built to.
The current clock speed of my CPU is 900.054 MHz whereas its maximum capacity is 3100 MHz and 400 MHz.
BogoMIPS is “the number of million times per second a processor can do absolutely nothing”.
Virtualization is VT-x and is used to “help accelerate virtual machines created in VirtualBox, VMware, Hyper-V, and other apps”.
The next four entries are about cache. It has L1D (data cache) of 32K, L1I (instruction cache) of 32K, L2 cache of 256K and L3 cache of 3072K. Read this wiki page to get quick info on CPU caches.
Next is NUMA node for each CPU (both logical and physical CPUs).
The last line is the list of feature flags that are manufacturer specific. You may read more about them here.
This picture summarizes the most important processor information you get from the lscpu command.
In my opinion, lscpu command is more than enough to give you all the information you need.
Other commands to check CPU information in Linux
There are other ways to get CPU info in Linux command line. Let me show them one by one. However, I won’t go in detail to explain their output.
1. Check the content of /proc/cpuinfo
If you are aware of the directory structure in Linux, you already know that proc is a special directory in Linux. It’s actually a virtual filesystem that contains runtime system information such as system memory, devices mounted, hardware configuration etc.
If you want CPU information, you can read the content of the cpuinfo file in proc directory.
Get Cpu Info Linux
You would note that cpuinfo file has detailed information on each core of the processor.
For example, the first core of my CPU has the following information:

Linux Get Memory
If you just want to number of CPU cores (including both physical and logical ones), you can use the grep command with the wc command.
2. Use lshw command
lshw stands for ‘list hardware’. Quite obviously, it means to list the hardware information.
Since the lshw command provides information about all the hardware on your system, it will be difficult to find exactly what you are looking for.
Pc Memory Slot

This is why lshw command provides option to narrow down your intended search.
To show only the processor information, you can use the lshw command in the following way:
Linux Get Free Memory
This will show an output like this:
3. Use hwinfo
hwinfo is another command line tool to get hardware information of your Linux system.
You probably have to install hwinfo tool first. On Debian and Ubuntu, you can use the apt command to install it.
Once installed, you can get the CPU details in this way:
You’ll see an output similar to this for each core of the CPU:
4. dmidecode Command
dmidecode is another command to retrieve various kind of hardware information of your Linux system. You can check memory usage in Linux with it. You can also use it to get only the processor information.
This command needs sudo access as well. You’ll see an output like this:
Conclusion
Of course, there are many more tools that provide you hardware information in Linux. You can utilize them to get CPU info as well.
In my opinion, lscpu is the best command if you don’t want to remember anything. You can also rely on /proc/cpuinfo file. Just use these two and you’ll be set.
Linux Get Memory Slot Info Free
Since you learned to check CPU info, maybe you would like to read about checking the disk info in Linux as well.
Linux Get Memory Slot Info App
I hope you liked this tutorial. If you have questions or suggestions, please leave a comment below.
Become a Member for FREE
Join the conversation.