File: testnodes

package info (click to toggle)
x86info 1.13-3
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 720 kB
  • ctags: 427
  • sloc: ansic: 3,759; makefile: 115; sh: 48; asm: 47
file content (24 lines) | stat: -rwxr-xr-x 479 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh
# FIXME: Don't spit out these warnings on *BSD / Win32.

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

for i in `seq 0 $NRNODES`
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