count the processors
How many processors and cores this machine has, and what they are.
Steps
-
nprocthe processors programs can use
-
lscputhe model, cores, threads and caches
-
grep -c ^processor /proc/cpuinfothe same count, from the kernel
-
sysctl -n hw.ncpumacOS
Commands used
nproclscpusysctl
Each has a page in lore: lore nproc opens it.
Related recipes
- add a userCreate an account with a home folder and a password, and let it use sudo if it should.
- find what killed a processA program vanished or says "Killed": usually the kernel ran out of memory and stopped it. Find out.
- free disk spaceFind what fills a disk, then clear what is safe to clear: old package files, logs, caches.
- list users and groupsSee the accounts on this machine, the groups, and who is in each.