qa: update 660 to generate index.html, fixing pcp-testsuite runs
[pcp.git] / qa / 787
blob473aefb0028e11e93c763aad66271ce076909a57
1 #!/bin/sh
2 # PCP QA Test No. 787
3 # Frank's "slow" archive with <mark> records
4 # See http://oss.sgi.com/bugzilla/show_bug.cgi?id=1044
6 # Copyright (c) 2014 Ken McDonell. All Rights Reserved.
8 seq=`basename $0`
9 echo "QA output created by $seq"
11 # get standard environment, filters and checks
12 . ./common.product
13 . ./common.filter
14 . ./common.check
16 status=1 # failure is the default!
17 $sudo rm -rf $tmp.* $seq.full
18 trap "cd $here; rm -rf $tmp.*; exit \$status" 0 1 2 3 15
20 # change to true to produce detailed values in $seq.full to
21 # validate the interpolated values reported by pmval
23 full=true
24 $full && rm -f $seq.full
26 _summary()
28 grep '^__pmLogRead:' | wc -l | sed -e 's/ //g'
31 _filter()
33 sed -e "s@$tmp@TMP@g"
36 pmdumplog -xz archives/bug-1044 >$tmp.tmp
37 echo "log records: `egrep '^([A-Z][a-z][a-z] )|([0-2][0-9]:)' <$tmp.tmp | wc -l | sed -e 's/ //g'`"
39 # for full output, lines look like
40 # Fri Jan 10 17:58:09.600 2014 60.0.32 (hinv.ncpu): value 4
42 $full && grep '<mark>' <$tmp.tmp | LC_COLLATE=POSIX sort -k 3,3n -k 4,4 >$tmp.mark
44 # real QA test starts here
45 for metric in hinv.ncpu kernel.all.nprocs pmcd.numagents
47 echo | tee -a $seq.full
48 echo "=== $metric ===" | tee -a $seq.full
49 $full && pmdumplog -zL archives/bug-1044 >>$seq.full
50 $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
51 $full && LC_COLLATE=POSIX sort -k 3,3n -k 4,4 $tmp.tmp $tmp.mark >>$seq.full
53 echo | tee -a $seq.full
54 echo "+++ forwards +++" | tee -a $seq.full
55 opt='-Dlog'
56 $full && opt='-Dlog,interp'
57 pmval -z $opt -t 1hr -A 1hr -a archives/bug-1044 $metric 2>$tmp.err
58 echo "log reads: `_summary <$tmp.err`"
59 $full && cat $tmp.err >>$seq.full
61 echo | tee -a $seq.full
62 echo "+++ backwards +++" | tee -a $seq.full
63 $full && opt='-Dlog,interp'
64 src/interp1 $opt -d -s 1000 -a archives/bug-1044 -t 3600 $metric 2>$tmp.err
65 $full && cat $tmp.err >>$seq.full
67 echo "`echo $metric | sed -e 's/\./_/g'` = $metric;" >>$tmp.pmie
68 done
70 echo | tee -a $seq.full
71 echo "=== pmcd.numagents converted to discrete semantics ===" | tee -a $seq.full
72 echo "metric pmcd.numagents { sem -> discrete }" >$tmp.config
73 pmlogrewrite -c $tmp.config archives/bug-1044 $tmp
74 pmval -z -Dlog -t 1hr -A 1hr -a $tmp pmcd.numagents 2>$tmp.err \
75 | _filter
76 echo "log reads: `_summary <$tmp.err`"
77 $full && cat $tmp.err >>$seq.full
79 echo
80 echo "=== all metrics at once ==="
81 pmie -z -a archives/bug-1044 -c $tmp.pmie -t 1hr -A 1hr -v -Dlog 2>$tmp.err
82 echo "log reads: `_summary <$tmp.err`"
85 # success, all done
86 status=0
88 exit