3 # Verify /proc/cpuinfo parsing for various architectures.
5 # Copyright (c) 2014 Red Hat. All Rights Reserved.
9 echo "QA output created by $seq"
11 # get standard environment, filters and checks
16 [ $PCP_PLATFORM = linux
] || _notrun
"Linux cpuinfo test, only works with Linux"
18 status
=1 # failure is the default!
19 $sudo rm -rf $tmp.
* $seq.full
20 trap "cd $here; rm -rf $tmp.*; exit \$status" 0 1 2 3 15
27 echo cpu
0 0 0 0 0 0 0 0 0 > $path
29 while [ $cpu -lt $ncpu ]
31 echo cpu
$cpu 0 0 0 0 0 0 0 0 0 >> $path
36 # real QA test starts here
38 export LINUX_STATSPATH
=$root
39 pmda
=$PCP_PMDAS_DIR/linux
/pmda_linux.so
,linux_init
40 files
=`echo $here/linux/cpuinfo-* | LC_COLLATE=POSIX sort`
41 metrics
=`pminfo hinv.cpu | grep -v hinv.cpu.online`
46 mkdir
-p $root/proc || _fail
"root in use when processing $file"
48 cp $file $root/proc
/cpuinfo
50 ncpu
=`echo $base | sed -e 's/.*-\([0-9][0-9]*\)cpu-.*/\1/'`
51 proc_stat
$root/proc
/stat
$ncpu
53 echo "== Checking CPU hardware metrics from $base ($ncpu CPU)"
54 pminfo
-f -L -K clear -K add
,60,$pmda $metrics
55 echo && echo "== done" && echo