Skip to content

Instantly share code, notes, and snippets.

@ChinaXing
Last active December 15, 2015 13:39
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 ChinaXing/5268863 to your computer and use it in GitHub Desktop.
Save ChinaXing/5268863 to your computer and use it in GitHub Desktop.
show cpu map in numa scene
#!/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