Display CPU architecture and topology information.
low risk
lscpu reads CPU details from /proc/cpuinfo and sysfs, displaying architecture, byte order, cores, threads, NUMA topology, caches, and CPU flags. Essential for capacity planning, performance tuning, and understanding NUMA effects.
| Flag | Meaning |
|---|---|
-J --json | Output in JSON format |
-e --extended | Show extended readable format |
-p --parse | Parseable per-CPU output |
lscpuFull CPU topology and details · explain & risk-check →lscpu | grep -E 'Core|Thread|Socket'Check physical vs logical CPU counts · explain & risk-check →lscpu -J | jq '.lscpu[] | select(.field=="CPU(s):")'Extract CPU count in JSON pipeline · explain & risk-check →Check 'NUMA node(s)' in lscpu output — applications unaware of NUMA topology can experience severe performance degradation on multi-socket servers.
Reference text is hand-written and may be incomplete — check man lscpu for your version. Test destructive commands on a non-production system first.