/var/lib/pcp/testsuite/787 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 | #!/bin/sh
# PCP QA Test No. 787
# Frank's "slow" archive with <mark> records
# See http://oss.sgi.com/bugzilla/show_bug.cgi?id=1044
#
# Copyright (c) 2014 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
# change to true to produce detailed values in $seq.full to
# validate the interpolated values reported by pmval
#
full=true
$full && rm -f $seq.full
_summary()
{
grep '^__pmLogRead:' | wc -l | sed -e 's/ //g'
}
_filter()
{
sed -e "s@$tmp@TMP@g"
}
pmdumplog -xz archives/bug-1044 >$tmp.tmp
echo "log records: `egrep '^([A-Z][a-z][a-z] )|([0-2][0-9]:)' <$tmp.tmp | wc -l | sed -e 's/ //g'`"
# for full output, lines look like
# Fri Jan 10 17:58:09.600 2014 60.0.32 (hinv.ncpu): value 4
#
$full && grep '<mark>' <$tmp.tmp | LC_COLLATE=POSIX sort -k 3,3n -k 4,4 >$tmp.mark
# real QA test starts here
for metric in hinv.ncpu kernel.all.nprocs pmcd.numagents
do
echo | tee -a $seq.full
echo "=== $metric ===" | tee -a $seq.full
$full && pmdumplog -zL archives/bug-1044 >>$seq.full
$full && pmdumplog -xz archives/bug-1044 $metric | egrep '^([A-Z][a-z][a-z] )|([0-2][0-9]:)' | LC_COLLATE=POSIX sort -k 3,3n -k 4,4 >$tmp.tmp
$full && LC_COLLATE=POSIX sort -k 3,3n -k 4,4 $tmp.tmp $tmp.mark >>$seq.full
echo | tee -a $seq.full
echo "+++ forwards +++" | tee -a $seq.full
opt='-Dlog'
$full && opt='-Dlog,interp'
pmval -z $opt -t 1hr -A 1hr -a archives/bug-1044 $metric 2>$tmp.err
echo "log reads: `_summary <$tmp.err`"
$full && cat $tmp.err >>$seq.full
echo | tee -a $seq.full
echo "+++ backwards +++" | tee -a $seq.full
$full && opt='-Dlog,interp'
src/interp1 $opt -d -s 1000 -a archives/bug-1044 -t 3600 $metric 2>$tmp.err
$full && cat $tmp.err >>$seq.full
echo "`echo $metric | sed -e 's/\./_/g'` = $metric;" >>$tmp.pmie
done
echo | tee -a $seq.full
echo "=== pmcd.numagents converted to discrete semantics ===" | tee -a $seq.full
echo "metric pmcd.numagents { sem -> discrete }" >$tmp.config
pmlogrewrite -c $tmp.config archives/bug-1044 $tmp
pmval -z -Dlog -t 1hr -A 1hr -a $tmp pmcd.numagents 2>$tmp.err \
| _filter
echo "log reads: `_summary <$tmp.err`"
$full && cat $tmp.err >>$seq.full
echo
echo "=== all metrics at once ==="
pmie -z -a archives/bug-1044 -c $tmp.pmie -t 1hr -A 1hr -v -Dlog 2>$tmp.err
echo "log reads: `_summary <$tmp.err`"
# success, all done
status=0
exit
|