Code Yarns ‍👨‍💻
Tech BlogPersonal Blog


📅 2015-Feb-23 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ cpu, lscpu ⬩ 📚 Archive


There are many GUI tools (like i-Nex) and commandline utilities in Linux to look up system information. To get information about the CPUs in a system at the commandline, I like the lscpu tool. The reason being that its name is the easiest among all tools to remember and it conveniently summarizes the detailed information from /proc/cpuinfo. It shows information about the CPU vendor, architecture and cache sizes.

$ sudo apt install util-linux
$ lscpu
Architecture:                    aarch64                      <<< CPU arch like x86_64
CPU op-mode(s):                  32-bit, 64-bit
Byte Order:                      Little Endian                <<< Not seen Big Endian in many years
CPU(s):                          4                            <<< Number of cores visible to OS
On-line CPU(s) list:             0-3
Thread(s) per core:              1                            <<< This will be 2 for CPUs where hyperthreading is enabled
Core(s) per socket:              4
Socket(s):                       1                            <<< Number of physical sockets on system
Vendor ID:                       ARM
Model:                           4
Model name:                      Cortex-A53                   <<< All important CPU name
Stepping:                        r0p4
CPU max MHz:                     1400.0000
CPU min MHz:                     600.0000
BogoMIPS:                        38.40
Vulnerability Itlb multihit:     Not affected
Vulnerability L1tf:              Not affected
Vulnerability Mds:               Not affected
Vulnerability Meltdown:          Not affected
Vulnerability Spec store bypass: Not affected
Vulnerability Spectre v1:        Mitigation;
Vulnerability Spectre v2:        Not affected
Vulnerability Srbds:             Not affected
Vulnerability Tsx async abort:   Not affected
Flags:                           fp asimd evtstrm crc32 cpuid <<< Vector instructions and other extensions listed out

I have noted some important fields with <<< in the above output.

Note that the fields printed out varies based on the CPU. For example, a x86-64 CPU would have many other fields that are not shown above.

Tried with: Ubuntu 20.04

© 2022 Ashwin Nanjappa • All writing under CC BY-SA license • 🐘📧