Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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