3 # Verify /proc/interrupts parsing for various architectures.
5 # Copyright (c) 2016 Red Hat.
9 echo "QA output created by $seq"
11 # get standard environment, filters and checks
16 [ $PCP_PLATFORM = linux
] || _notrun
"Linux interrupts 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/interrupts-* | LC_COLLATE=POSIX sort`
45 mkdir
-p $root/proc || _fail
"root in use when processing $file"
47 cp $file $root/proc
/interrupts
49 ncpu
=`echo $base | sed -e 's/.*-\([0-9][0-9]*\)cpu-.*/\1/'`
50 proc_stat
$root/proc
/stat
$ncpu
51 export LINUX_NCPUS
=$ncpu
53 echo "== Checking interrupts metrics from $base ($ncpu CPU)"
54 pminfo
-f -L -K clear -K add
,60,$pmda kernel.percpu.interrupts
55 echo && echo "== done" && echo
56 echo "== Checking interrupts helptext from $base ($ncpu CPU)"
57 pminfo
-tT -L -K clear -K add
,60,$pmda kernel.percpu.interrupts
58 echo && echo "== done" && echo