This is the second in a series of posts about how we can mange hardware resources under Linux. This post would focus on understanding the CPU. The central processing unit ( CPU, sometimes called the processor) is the “brain” of a computer system – it does most of the computer’s actual computing. If you have a working Linux system, it is very important to learn a great deal about your CPU.
CPUs process data in binary (base 2), meaning that numbers are represented using only two digits—0 and 1. CPUs have limits to the sizes of the numbers they can process, though, and those limits are described in terms of the number of binary digits, or bits , that the CPU can handle. A 32-bit CPU, for instance, can process numbers that contain up to 32 binary digits. Expressed as positive integers, this means that numbers can range in size from 0 to 232 – 1 (4,294,967,295 in the base 10 that people generally use).
To get the CPU information using ubuntu’s default GUI application go to the system tray (by pressing the super/Windows key ) and the type in ‘system monitor’ – without the quotes of course. From the option select system monitor. Then select the “resource” tab to reveal CPU information.
From the CPU History, you can see some activity of the CPU being recorded in a graph form. Below that the number of CPU is listed (in different colours of orange, red, green and blue) with the percentage of each of the CPUs being used.
Using the command-line
A more detail description of your CPU could be acquired by using three text-mode commands:
:~$ lscpu
Architecture: i686
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0-3
Thread(s) per core: 2
Core(s) per socket: 2
Socket(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 37
Stepping: 5
CPU MHz: 931.000
BogoMIPS: 4787.52
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 3072K
Though output seem a little technical (like every other command we’d be looking at here), most of the important information about the CPU like the make , architecture, or ‘number of cores’ are printed in bold fonts here.
The Architecture line suggests an x86 CPU (i.e. the i686 variant), but the CPU op-mode(s) line indicates that the CPU supports both 32-bit and 64-bit operation. That means I can install a 32-bit or 64-bit Linux distribution on the computer system (and I am currently running on a 32-bit Ubuntu distro on this system which has a 64-bit architecture).
Another command that gives a similar output is this (take note the output is a little long screen-wise):
:~$ cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 37
model name : Intel(R) Core(TM) i3 CPU M 370 @ 2.40GHz
stepping : 5
microcode : 0x2
cpu MHz : 1463.000
cache size : 3072 KB
physical id : 0
siblings : 4
core id : 0
cpu cores : 2
apicid : 0
initial apicid : 0
fdiv_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 11
wp : yes
…
To get the specific model information of the CPU:
:~$ cat /proc/cpuinfo | grep ‘model name’ | uniq
model name: Intel(R) Core(TM) i3 CPU M 370 @ 2.40GHz
You can add some comment in the section below.
Happy Linux’NG!
- Time complexity analysis: How to calculate running time - April 1, 2024
- Sovereign Tech Fund Invests €1M In GNOME’s Open-Source Project - November 19, 2023
- Google’s Bard AI: ChatGPT Rival or The Next Frontier in AI and NLP Technology - February 8, 2023