/var/lib/pcp/testsuite/1018 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 | #!/bin/sh
# PCP QA Test No. 1018
# Test QmcSource functionality
#
seq=`basename $0`
echo "QA output created by $seq"
status=1 # failure is the default!
. ./common.qt
trap "_cleanup_qt; exit \$status" 0 1 2 3 15
[ -x qt/qmc_source/qmc_source ] || _notrun "qmc_source not built or installed"
# real QA test starts here
tz=`pmprobe -v pmcd.timezone | sed -e 's/.* "//' -e 's/"//'`
_filter()
{
sed \
-e "s/$host/HOST/g" \
-e 's/sts = -146,/sts = ECONNREFUSED,/' \
-e 's/sts = -111,/sts = ECONNREFUSED,/' \
-e "s/snort/HOST/g" \
-e "s#EST-11EST-10,89/2:00,299/2:00#TZ#g" \
-e "s#$tz#TZ#g"
# The sed(1) command "s#EST-11EST-10,89/2:00,299/2:00#TZ#g" is required
# for when pmc_source uses the archive oview-short. oview-short
# contains this timezone, so is required to be masked when pmc_source
# spits its output.
}
$sudo qt/qmc_source/qmc_source -DPMC 2>&1 | _filter
# What happens if we stop pmcd
_service pcp stop | _filter_pcp_stop
$sudo qt/qmc_source/qmc_source -DPMC 2>&1 | _filter
_service pcp start | _filter_pcp_start
_wait_for_pmcd
_wait_for_pmlogger
# success, all done
status=0
exit
|