Multiple methods to check the number of CPU cores on a Linux VPS. From simple command-line utilities to detailed hardware info tools, get a comprehensive guide to optimize and understand your server’s performance capabilities
/proc/cpuinfo
File/proc/cpuinfo
file.
Command:
lscpu
Commandlscpu
command provides detailed information about the CPU architecture.
Command:
nproc
Commandnproc
.
Command:
top
and htop
Commandstop
and htop
are interactive process viewers that display the system’s current state.
Using top:
Command:
htop
, you will directly see a visual representation of the usage of each core at the top of the interface.
hwinfo
Commandhwinfo
provides detailed hardware information, including about the CPU.
Command (to specifically get CPU info):