/var/lib/pcp/testsuite/298 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 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 | #! /bin/sh
# PCP QA Test No. 298
# exercise pmie2col
#
# Copyright (c) 2005 Silicon Graphics, 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
rm -f $seq.out $seq.full
if [ $PCP_PLATFORM = darwin ]
then
ln $seq.out.2 $seq.out
else
ln $seq.out.1 $seq.out
fi
status=0 # success is the default!
$sudo rm -rf $tmp.*
trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
cat <<'End-of-File' >$tmp.config
loadav = kernel.all.load #'1 minute';
'%usr' = kernel.all.cpu.user;
'%sys' = kernel.all.cpu.sys;
'%wio' = kernel.all.cpu.wait.total;
'%idle' = kernel.all.cpu.idle;
'maxiops' = max_inst(disk.dev.total);
End-of-File
_filter()
{
sed \
-e 's/^[A-Z][a-z][a-z] [A-Z][a-z][a-z] *[0-9][0-9]* [0-2][0-9]:[0-5][0-9]:[0-5][0-9] [0-9][0-9][0-9][0-9] /DATE /' \
-e 's/ *[0-9][0-9.]*/ N/g'
}
_filter_err()
{
sed \
-e '/not in namespace/s/for host .*/for host LOCALHOST/'
}
# real QA test starts here
echo "=== live ===" | tee -a $seq.full
pmie -v -t 1 -T 3 <$tmp.config >$tmp.out 2>$tmp.tmp
cat $tmp.out >>$seq.full
sed -e '/Info: evaluator exiting/d' <$tmp.tmp >$tmp.err
if [ -s $tmp.err ]
then
echo "pmie errors ..."
_filter_err <$tmp.err
fi
cat $tmp.out \
| pmie2col \
| tee -a $seq.full \
| _filter
echo | tee -a $seq.full
echo "=== live, pmie -e ===" | tee -a $seq.full
pmie -v -e -t 1 -T 3 <$tmp.config >$tmp.out 2>$tmp.tmp
cat $tmp.out >>$seq.full
sed -e '/Info: evaluator exiting/d' <$tmp.tmp >$tmp.err
if [ -s $tmp.err ]
then
echo "pmie errors ..."
_filter_err <$tmp.err
fi
cat $tmp.out \
| pmie2col \
| tee -a $seq.full \
| _filter
echo | tee -a $seq.full
echo "=== archive and pmie2col -w ===" | tee -a $seq.full
pmie -v -z -A 30m -t 30m -a src/kenj-pc-1 <$tmp.config >$tmp.out 2>$tmp.tmp
cat $tmp.out >>$seq.full
sed -e '/Info: evaluator exiting/d' <$tmp.tmp >$tmp.err
if [ -s $tmp.err ]
then
echo "pmie errors ..."
_filter_err <$tmp.err
fi
cat $tmp.out \
| pmie2col -w 8 \
| tee -a $seq.full
# success, all done
exit
|