3 # Exercise fix for RH BZ #1372550
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 proc PMDA specific test"
18 signal
=$PCP_BINADM_DIR/pmsignal
19 status
=1 # failure is the default!
20 $sudo rm -rf $tmp $tmp.
* $seq.full
21 trap "_cleanup; exit \$status" 0 1 2 3 15
31 cd $here; rm -rf $tmp.
*
34 # real QA test starts here
36 # Use the stopped runq metric as its less likely to be
37 # interfered with than some of the other metrics (like
38 # sleeping, runnable, etc) via other system activity.
42 pmsleep
0.1 # some time for sleep process to start
43 base
=`pmprobe -v proc.runq.stopped | awk '{ print $3 }'`
46 pmsleep
0.1 # some time for process to stop
47 stop
=`pmprobe -v proc.runq.stopped | awk '{ print $3 }'`
50 pmsleep
0.1 # some time for process to continue
51 cont
=`pmprobe -v proc.runq.stopped | awk '{ print $3 }'`
53 echo "stopped counts:" > $seq.full
54 echo "base = $base" >> $seq.full
55 echo "stop = $stop" >> $seq.full
56 echo "cont = $cont" >> $seq.full
58 echo Silence is golden
59 # STOP should cause a jump in the number of stopped processes
60 [ $stop -gt $base ] ||
echo "Unexpected $stop (stop) le $base (base)"
61 # CONT should cause a drop in the number of stopped processes
62 [ $stop -gt $cont ] ||
echo "Unexpected $stop (stop) le $cont (cont)"