I was using this pipeline:
grep -c processor /proc/cpuinfo
However there's a better way: nproc
and for a good summary of CPU info from /sys
and /proc/cpuinfo
use lscpu
which has options to produce parseable output for pipelines.
I was using this pipeline:
grep -c processor /proc/cpuinfo
However there's a better way: nproc
and for a good summary of CPU info from /sys
and /proc/cpuinfo
use lscpu
which has options to produce parseable output for pipelines.