Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

lscpu

Display information about the CPU architecture.

Synopsis

lscpu [options]

Operation

Gathers CPU information from /proc/cpuinfo and /sys/devices/system/cpu/ and displays it as key-value pairs (default), per-CPU table (--extended), or cache detail table (--caches).

Inputs

SourcePurpose
/proc/cpuinfoCPU model, vendor, family, flags, bugs, bogomips
/sys/devices/system/cpu/onlineOnline CPU list
/sys/devices/system/cpu/offlineOffline CPU list
/sys/devices/system/cpu/cpu<N>/topology/core_idPhysical core ID
/sys/devices/system/cpu/cpu<N>/topology/physical_package_idSocket ID
/sys/devices/system/cpu/cpu<N>/cache/index<M>/levelCache level
/sys/devices/system/cpu/cpu<N>/cache/index<M>/typeCache type
/sys/devices/system/cpu/cpu<N>/cache/index<M>/sizeCache size
/sys/devices/system/cpu/cpu<N>/cache/index<M>/shared_cpu_listCPUs sharing cache
/sys/devices/system/cpu/cpu<N>/cpufreq/cpuinfo_max_freqMax frequency
/sys/devices/system/cpu/cpu<N>/cpufreq/cpuinfo_min_freqMin frequency
/sys/devices/system/node/node<N>/cpulistNUMA node CPU mapping
/sys/devices/system/cpu/vulnerabilities/*CPU vulnerability status

Command-line options

OptionDescription
-e, --extended[=list]Extended per-CPU table
-C, --caches[=list]Cache information table
-J, --jsonJSON output
-B, --bytesShow sizes in bytes
-h, --helpDisplay help
-V, --versionDisplay version

Default output fields

  • Architecture, CPU op-mode(s), Address sizes, Byte Order
  • CPU(s), On-line/Off-line CPU(s) list
  • Vendor ID, Model name, CPU family, Model, Stepping
  • Thread(s) per core, Core(s) per socket, Socket(s)
  • CPU max/min MHz, BogoMIPS
  • Flags, Virtualization
  • L1d/L1i/L2/L3 cache (with instance count)
  • NUMA node(s), NUMA node CPU mapping
  • Vulnerabilities

Exit codes

CodeMeaning
0Success
1Failure

Not yet implemented

  • -e extended per-CPU table
  • -C cache detail table
  • -p parsable output
  • -J JSON output
  • -s sysroot
  • -x hex masks
  • -y physical IDs
  • --hierarchic subsections
  • -a/-b/-c online/offline filtering
  • --output-all
  • --raw