/var/lib/pcp/testsuite/799 is in pcp-testsuite 4.0.1-1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 | #!/bin/sh
# PCP QA Test No. 799
# Test Performance API (PAPI) pmda for conflicting metrics
#
# Copyright (c) 2014 Red Hat Inc. All Rights Reserved.
#
seq=`basename $0`
echo "QA output created by $seq"
# get standard environment, filters and checks
. ./common.product
. ./common.filter
. ./common.check
[ -d $PCP_PMDAS_DIR/papi ] || _notrun "PAPI PMDA is not installed"
status=1 # failure is the default!
$sudo rm -rf $tmp.* $seq.full
trap "cd $here; rm -rf $tmp.*; exit \$status" 0 1 2 3 15
_filter_papi_errors()
{
sed \
-e '/pfm_find_full_event(.*): event not found./d' \
-e '/events in papi_events.csv were not valid./d' \
-e '/PAPI Error:*/d' \
-e '/ibwarn:*/d' \
# end
}
_filter()
{
sed \
-e 's/value [0-9][0-9]*/value NUMBER/' \
-e 's/value \".*\"/value STRING/' \
| _filter_papi_errors
}
pmdapapi_remove()
{
echo
echo "=== remove PAPI agent ==="
$sudo ./Remove >$tmp.out 2>&1
_filter_pmda_remove <$tmp.out
}
pmdapapi_install()
{
# start from known starting points
cd $PCP_PMDAS_DIR/papi
$sudo ./Remove >/dev/null 2>&1
_service pmcd stop
echo
echo "=== PAPI agent installation ==="
$sudo ./Install </dev/null >$tmp.out 2>&1
# Check papi metrics have appeared ... X metrics and Y values
_filter_pmda_install <$tmp.out \
| sed \
-e '/^Waiting for pmcd/s/\.\.\.[. ]*$/DOTS/' \
-e 's/[0-9][0-9]* warnings, //' \
| $PCP_AWK_PROG '
/Check papi metrics have appeared/ { if ($7 >= 20 && $7 <= 500) $7 = "X"
if ($10 >= 0 && $10 <= 500) $10 = "Y"
}
{ print }'
}
# start actual QA
pmns=$PCP_PMDAS_DIR/papi/root
pmda=$PCP_PMDAS_DIR/papi/pmda_papi.$DSO_SUFFIX,papi_init
_prepare_pmda papi
# note: _restore_auto_restart pmcd done in _cleanup_pmda()
trap "_cleanup_pmda papi; exit \$status" 0 1 2 3 15
_stop_auto_restart pmcd
pmdapapi_install
echo
echo "== PAPI library behaviour, adding conflicting metrics (when multiplexing is disabled), as root"
$sudo pmstore -hlocal: papi.control.enable "L1_ICM L2_DCM L2_ICM L1_TCM L2_TCM" 2>&1 | _filter_papi_errors
echo
echo "== PAPI library behaviour, metric totals, as root"
$sudo pminfo -hlocal: -f papi.system.L1_ICM 2>&1 | _filter
$sudo pminfo -hlocal: -f papi.system.L2_DCM 2>&1 | _filter
$sudo pminfo -hlocal: -f papi.system.L2_ICM 2>&1 | _filter
$sudo pminfo -hlocal: -f papi.system.L1_TCM 2>&1 | _filter
$sudo pminfo -hlocal: -f papi.system.L2_TCM 2>&1 | _filter
echo
echo "== PAPI library behaviour, removing metrics, as root"
$sudo pmstore -hlocal: -K clear -K add,126,$pmda -f -n $pmns papi.control.disable "L1_ICM L2_DCM L2_ICM L1_TCM L2_TCM" 2>&1 | _filter_papi_errors
pmdapapi_remove
# success, all done
status=0
exit
|