The lscpu command displays information about the CPU architecture

Lscpu command installation:

-bash: lscpu: command not found #Ubuntu apt-get install util-linux #CentOS yum install util-linux #Fedora dnf install util-linux #OS X  brew install util-linux #Docker docker run cmd.cat/lscpu lscpuCopy the code

Supplementary remarks to the lscpu command:

The lscpu command displays information about the CPU architecture.

Syntax of the lscpu command:

lscpu [-a|-b|-c|-J] [-x] [-y] [-s directory] [-e[=list]|-p[=list]]
lscpu -h|-V
Copy the code

Lscpu command options:

-a, --all Prints online and offline cpus (default: -e) -b, --online Prints only online cpus (default: -p) -c, --offline Prints offline cpus -e, --extended[=<list>] prints an extended readable format -p, --parse[=<list>] prints a parsed format -s, --sysroot <dir> uses the specified directory as the system root directory -x, --hex prints a hexadecimal mask, Instead of the CPU list -h, --help displays the help and exits -v, --version prints the version information and exitsCopy the code

Lscpu command parameters:

Available columns: CPU Logical CPU Number CORE Logical CORE number SOCKET Logical SOCKET number NODE Logical NUMA NODE number BOOK Logical BOOK Number CACHE How to share the CPU scheduling mode between cpus ADDRESS Physical ADDRESS of the CPU CONFIGURED Displays whether a CPU is allocated by the manager. ONLINE Displays whether Linux is using a CPUCopy the code

Lscpu command example:

Directly execute lSCPU:

> lscpu
 
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                8
On-line CPU(s) list:   0-7
Thread(s) per core:    2
Core(s) per socket:    4
Socket(s):             1
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 85
Model name:            Intel(R) Xeon(R) Gold 6148 CPU @ 2.40GHz
Stepping:              4
CPU MHz:               2394.374
BogoMIPS:              4788.74
Hypervisor vendor:     KVM
Virtualization type:   full
L1d cache:             32K
L1i cache:             32K
L2 cache:              4096K
L3 cache:              16384K
NUMA node0 CPU(s):     0-7
Flags:                 fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon rep_good nopl xtopology eagerfpu pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch arat fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx avx512f avx512dq rdseed adx smap clflushopt clwb avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1
Copy the code

Display format

  • Architecture: # Architecture
  • CPU op-mode(s): # Supported mode
  • Byte Order: # Specifies the Byte Order mode
  • CPU(s): # Number of logical cpus
  • If a CPU is faulty or overheated, some cpus will stop running and go offline
  • Thread(s) per core
  • Core(s) per socket: # Number of cores per CPU socket/number of physical CPU cores per socket
  • CPU Socket (s): # Number of CPU sockets, that is, the number of physical cpus
  • NUMA node(s): # Has several NUMA nodes
  • Vendor ID: # CPU Vendor ID
  • CPU family: # CPU family number set by the manufacturer
  • Model: # Model
  • Model name: #
  • Stepping: # Stepping, which can be understood as the VERSION number of the CPU of the same model
  • CPU MHz: # CPU frequency
  • BogoMIPS: # Estimate MIPS, MIPS is millions of instructions per second
  • Hypervisor vendor: # Provider of virtualization technology
  • Virtualization Type: # The type of Virtualization technology supported by the CPU
  • L1d cache: level 1 Cache dcache is used to store data
  • L1i cache: # Level-1 cache the icache is used to store instructions
  • L2 cache: # L2 cache
  • L3 cache: level 3 cache
  • NUMA Node0 CPU(s): 0-3 // Four cpus are deployed on the same NUMA node node0
  • Flags: technical features supported by the CPU

Original link :rumenz.com/rumenbiji/l… Wechat official account: entry station