/var/lib/pcp/testsuite/518 is in pcp-testsuite 3.8.12ubuntu1.
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 | #!/bin/sh
# PCP QA Test No. 518
# pcp -p workout
#
# Copyright (c) 2012 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!
signal=$PCP_BINADM_DIR/pmsignal
$sudo rm -rf $tmp.* $seq.full
trap "$sudo rm -f $tmp.*; exit \$status" 0 1 2 3 15
cat <<End-of-File >$tmp.pmie
hinv.ncpu > 0 -> print "we have cpus, no surprise here!";
hinv.ncpu < 0 -> print "whoa ... no cpus!";
End-of-File
# real QA test starts here
$sudo $signal -a pmie >/dev/null 2>&1
# prefer to run as "pcp", must ensure we can write stats files
# to PCP_TMP_DIR which is no longer a world-writable directory
#
user=pcp
id pcp >/dev/null 2>/dev/null || user=root
$sudo -u $user pmie -t 1 -c $tmp.pmie 2>$tmp.err >$tmp.out &
pid=$!
sleep 2 # let stats accumulate via rule firings
pcp -p \
| tee -a $seq.full \
| $PCP_AWK_PROG '
/pmie:/ { want=1 }
want==1 { print }' \
| sed \
-e "s;$tmp;TMP;" \
-e "s;/privateTMP;TMP;g" \
-e '/TMP/{
s/ (.*//
s/.*:/HOST:/
}'
$sudo $signal $pid
wait
cat $tmp.out >>$seq.full
cat $tmp.err >>$seq.full
status=0
exit
|