pmrep: update TODO, man page
[pcp.git] / qa / 789
blobbe39b974c022d55d66c4bd122cd29664fcd7019c
1 #!/bin/sh
2 # PCP QA Test No. 789
3 # pmdapapi native metrics test
5 # Copyright (c) 2014 Red Hat Inc. 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 [ -d $PCP_PMDAS_DIR/papi ] || _notrun "PAPI PMDA is not installed"
18 $sudo rm -rf $tmp.* $seq.full
19 trap "cd $here; $sudo rm -rf $tmp.*; exit \$status" 0 1 2 3 15
21 _filter_papi_errors()
23 sed \
24 -e '/pfm_find_full_event(.*): event not found./d' \
25 -e '/events in papi_events.csv were not valid./d' \
26 # end
29 _filter()
31 sed \
32 -e "s,$PCP_PMDAS_DIR,PCP_PMDAS_DIR,g" \
33 -e 's/value [0-9][0-9]*/value NUMBER/' \
34 -e 's/TOT_INS(5): [0-9][0-9]*/TOT_INS(5) NUMBER/' \
35 -e 's/TOT_INS(-1): [0-9][0-9]*/TOT_INS(-1) NUMBER/' \
36 -e 's/0x[0-9a-f]*/ADDR/g' \
37 -e 's/[0-2][0-9]:00:00.000/TIME/' \
38 -e 's/126.0.[0-9][0-9]*/126.0.NUMBER/' \
39 -e "s,$tmp,TMP," \
40 | _filter_papi_errors
43 # vars and checks
44 papirootpmns=$PCP_PMDAS_DIR/papi/root
45 pipepmda=$PCP_PMDAS_DIR/papi/pmdapapi
47 # check if papi PMDA is going to work on this platform
48 _check_papi
49 _check_papi_native
51 echo "=== Daemon PMDA papi native events test ==="
52 $sudo dbpmda -n $papirootpmns -ie <<EOF | _filter
53 open pipe $pipepmda -d 126 -l $tmp.log
54 getdesc on
55 attr "username" "root"
56 attr 11 "0"
57 store papi.control.enable "perf.CYCLES"
58 fetch papi.system.perf.CYCLES
59 store papi.control.disable "perf.CYCLES"
60 EOF
61 # success, all done
62 status=0
64 exit