Skip to content

Instantly share code, notes, and snippets.

@karlarao
Created August 9, 2017 23:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save karlarao/03433f88920fff4ecda24ecfce31c47e to your computer and use it in GitHub Desktop.
Save karlarao/03433f88920fff4ecda24ecfce31c47e to your computer and use it in GitHub Desktop.
vi cpu_topology
# then copy paste
dmidecode | grep -i "product name"
cat /proc/cpuinfo | grep -i "model name" | uniq
function filter(){
sed 's/^.*://g' | xargs echo
}
echo "processors (OS CPU count) " `grep processor /proc/cpuinfo | filter`
echo "physical id (processor socket) " `grep 'physical id' /proc/cpuinfo | filter`
echo "siblings (logical CPUs/socket) " `grep siblings /proc/cpuinfo | filter`
echo "core id (# assigned to a core) " `grep 'core id' /proc/cpuinfo | filter`
echo "cpu cores (physical cores/socket)" `grep 'cpu cores' /proc/cpuinfo | filter`
# then run as root
sh cpu_topology
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment