/var/lib/pcp/testsuite/811 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 | #!/bin/sh
# PCP QA Test No. 811
# pmcpp integration with pmlogger
#
# Copyright (c) 2015 Ken McDonell. All Rights Reserved.
#
seq=`basename $0`
echo "QA output created by $seq"
# get standard environment, filters and checks
. ./common.product
. ./common.filter
. ./common.check
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
cat <<End-of-File >$tmp.common
%define cpu_interval "250 milliseconds"
%define cpu_prefix kernel.all.cpu.
%ifdef _cpu
log mandatory on %cpu_interval {
%{cpu_prefix}user
%{cpu_prefix}sys
}
%else
log mandatory on once { hinv.ncpu }
%endif
End-of-File
# real QA test starts here
echo "=== _cpu defined, config from -c ==="
( echo "%define _cpu"; cat $tmp.common ) >$tmp.config
pmlogger -c $tmp.config -l $tmp.log $tmp -s 1 &
_wait_pmlogger_end $!
_filter_pmlogger_log <$tmp.log
pminfo -a $tmp | LC_COLLATE=POSIX sort
rm -f $tmp.0 $tmp.meta $tmp.index
echo
echo "=== _cpu defined, config from stdin ==="
( echo "%define _cpu"; cat $tmp.common ) >$tmp.tmp
pmlogger -c $tmp.tmp -l $tmp.log $tmp -s 1 &
_wait_pmlogger_end $!
_filter_pmlogger_log <$tmp.log
pminfo -a $tmp | LC_COLLATE=POSIX sort
rm -f $tmp.0 $tmp.meta $tmp.index
echo
echo "=== _cpu not defined, config from stdin ==="
pmlogger -c $tmp.common -l $tmp.log $tmp -s 1 &
_wait_pmlogger_end $!
_filter_pmlogger_log <$tmp.log
pminfo -a $tmp | LC_COLLATE=POSIX sort
rm -f $tmp.0 $tmp.meta $tmp.index
# success, all done
status=0
exit
|