Bash/CPU

From Chorke Wiki
Revision as of 21:12, 9 April 2018 by Shahed (talk | contribs) (Created page with "<syntaxhighlight lang="bash"> # show no.of core of a cpu grep '^core id' /proc/cpuinfo |sort -u|wc -l # show no.of threads of a cpu grep -c ^processor /proc/cpuinfo getconf _...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
# show no.of core of a cpu
grep '^core id' /proc/cpuinfo |sort -u|wc -l

# show no.of threads of a cpu
grep -c ^processor /proc/cpuinfo
getconf _NPROCESSORS_ONLN
nproc --all

References