Last active
December 15, 2015 13:39
-
-
Save ChinaXing/5268863 to your computer and use it in GitHub Desktop.
show cpu map in numa scene
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#****************************************************************# | |
# ScriptName: cpu-map.sh | |
# Author: yunxing.cyx@taobao.com | |
# Create Date: 2013-03-29 13:03 | |
# Modify Author: $SHTERM_REAL_USER@alibaba-inc.com | |
# Modify Date: 2013-03-29 13:03 | |
# Function: | |
#***************************************************************# | |
cat /proc/cpuinfo \ | |
| awk ' $1 ~ /physical|core|processor|^$/' \ | |
| awk 'BEGIN{ print "id pkg core" ; } { if(NF == 0){ print } else { printf "%2d ", $NF } }' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment