0x03 서버 및 PC/리눅스

[Linux] CPU, Core number Verification

멋진관우 2010. 11. 11. 11:32

[Linux] CPU, Core number Verification

CHIP_COUNT=`cat /proc/cpuinfo | grep "physical id" | sort -u | wc -l`; CHIP_CORES=`cat /proc/cpuinfo | grep "siblings" | tail -1 | cut -d: -f2`; echo "CPU: $CHIP_COUNT chips x $CHIP_CORES cores"


answer example  : CPU: 1 chips x  2 cores