File: testnodes

package info (click to toggle)
x86info 1.21-2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 532 kB
  • ctags: 539
  • sloc: ansic: 4,553; makefile: 119; asm: 67; sh: 39
file content (25 lines) | stat: -rwxr-xr-x 473 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash

[ `uname -s` != "Linux" ] && exit 0

NRNODES=`grep processor /proc/cpuinfo | wc -l`
need=0

for i in `seq 0 $(( $NRNODES - 1 ))`
do
	if [ ! -c /dev/cpu/$i/cpuid ] ; then
		echo "*** No /dev/cpu/$i/cpuid found."
		need=1
	fi

	if [ ! -c /dev/cpu/$i/msr ] ; then
		echo "*** No /dev/cpu/$i/msr found."
		need=1
	fi
done

if test "$need" -eq 1 ; then
	echo "type \"make nodes\" as root to install device nodes"
	echo "You will also need msr driver installed"
fi