docs: tweak formatting in pmrep(1) archive folio example
[pcp.git] / qa / 407
blob92b74982b9b332937454a9470438b82b08016fca
1 #!/bin/sh
2 # PCP QA Test No. 407
3 # Derived metrics and PM_TYPE_EVENT
5 # Copyright (c) 2010 Ken McDonell. All Rights Reserved.
8 seq=`basename $0`
9 echo "QA output created by $seq"
11 # get standard environment, filters and checks
12 . ./common.product
13 . ./common.filter
14 . ./common.check
16 _filter()
18 sed \
19 -e 's/[0-2][0-9]:[0-5][0-9]:[0-5][0-9]\.[0-9][0-9][0-9]/TIMESTAMP/g'
22 status=0 # success is the default!
23 $sudo rm -rf $tmp.* $seq.full
24 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
26 # real QA test starts here
27 echo "=== This should work ==="
28 pmstore sample.event.reset 0 >/dev/null 2>&1
29 echo "myevents = sample.event.records" >$tmp.config
30 pminfo -c $tmp.config -f myevents | _filter
31 pminfo -c $tmp.config -f myevents | _filter
32 pminfo -c $tmp.config -f myevents | _filter
33 pminfo -c $tmp.config -f myevents | _filter
35 echo
36 echo "=== These should NOT work ==="
37 echo "my.bad_1 = sample.event.records - sample.event.records" >$tmp.config
38 echo "my.bad_2 = 1 + sample.event.records" >>$tmp.config
39 echo "my.bad_3 = (sample.event.reset + 1) + sample.event.records" >>$tmp.config
40 echo "my.bad_4 = sample.event.records - (sample.event.reset + 1)" >>$tmp.config
41 echo "my.bad_5 = sample.event.reset + (1 + sample.event.records)" >>$tmp.config
42 echo "my.bad_6 = sample.event.reset + (sample.event.records * 2)" >>$tmp.config
43 pminfo -c $tmp.config -f my
45 # success, all done
46 exit