Bash/CPU: Difference between revisions

From Chorke Wiki
Jump to navigation Jump to search
(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 _...")
 
 
Line 8: Line 8:
nproc --all
nproc --all
</syntaxhighlight>
</syntaxhighlight>
==Knowledge==
sudo apt install neofetch
neofetch --cpu-brand off
neofetch


== References ==
== References ==
* [https://stackoverflow.com/questions/6481005 How to obtain the number of CPUs/Cores]
* [https://stackoverflow.com/questions/6481005 How to obtain the number of CPUs/Cores]

Latest revision as of 01:54, 20 August 2021

# 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

Knowledge

sudo apt install neofetch
neofetch --cpu-brand off
neofetch

References