3 # Check Linux interrupts and softirqs metrics with valgrind.
5 # Copyright (c) 2016 Red Hat.
9 echo "QA output created by $seq"
11 # get standard environment, filters and checks
17 [ $PCP_PLATFORM = linux
] || _notrun
"Linux interrupts test, only works with Linux"
19 status
=1 # failure is the default!
20 $sudo rm -rf $tmp.
* $seq.full
21 trap "cd $here; rm -rf $tmp.*; exit \$status" 0 1 2 3 15
26 -e "s,$PCP_PMDAS_DIR,PCP_PMDAS_DIR,g" \
35 echo cpu
0 0 0 0 0 0 0 0 0 > $path
37 while [ $cpu -lt $ncpu ]
39 echo cpu
$cpu 0 0 0 0 0 0 0 0 0 >> $path
44 # real QA test starts here
45 pmda
=$PCP_PMDAS_DIR/linux
/pmda_linux.so
,linux_init
46 metrics
="kernel.percpu.intr kernel.percpu.interrupts kernel.percpu.softirqs"
49 export LINUX_STATSPATH
=$tmp.root
52 mkdir
-p $LINUX_STATSPATH/proc
53 cp $here/linux
/interrupts-
$machine $LINUX_STATSPATH/proc
/interrupts
54 cp $here/linux
/softirqs-
$machine $LINUX_STATSPATH/proc
/softirqs
55 _mk_proc_stat
$LINUX_STATSPATH/proc
/stat
$LINUX_NCPUS
57 echo "== Checking interrupts and softirqs names"
58 _run_valgrind pminfo
-L -K clear -K add
,60,$pmda $metrics | _filter
59 echo && echo "== done" && echo
61 echo "== Checking interrupts and softirqs values"
62 _run_valgrind pminfo
--fetch -L -K clear -K add
,60,$pmda $metrics | _filter
63 echo && echo "== done" && echo
65 echo "== Checking interrupts and softirqs helptext"
66 _run_valgrind pminfo
-tT -L -K clear -K add
,60,$pmda $metrics | _filter
67 echo && echo "== done" && echo