a small script to check out the number of processors in your linux machine
#!/bin/bash
S=$(grep "physical id" /proc/cpuinfo | sort -u | wc -l)
C=$(grep "cpu cores" /proc/cpuinfo |sort -u |cut -d":" -f2)
grep -i "model name" /proc/cpuinfo
echo your system has $S sockets with $C CPU cores each
mandatory sample output:
model name : Intel(R) Xeon(R) CPU L5640 @ 2.27GHz
your system has 2 sockets with 6 CPU cores each