3 # Only root can run this script
4 if [ "$(id -u)" != "0" ]; then
5 echo "This script must be run as root" 1>&2
9 let NRNODES=(`grep processor /proc/cpuinfo | wc -l`)-1
14 if [ ! -d /dev/cpu ] ; then
18 for i in `seq 0 $NRNODES`
20 if [ ! -d /dev/cpu/$i ] ; then
23 if [ ! -c /dev/cpu/$i/cpuid ] ; then
24 (cd /dev/cpu/$i ; mknod cpuid c 203 $i)
27 if [ ! -c /dev/cpu/$i/msr ] ; then
28 (cd /dev/cpu/$i ; mknod msr c 202 $i)
33 if test "$loadCpuid" -eq 1 ; then
36 if test "$loadMsr" -eq 1 ; then
40 echo "All cpuid & msr /dev nodes present."