docs: tweak formatting in pmrep(1) archive folio example
[pcp.git] / qa / 261
blob90772b27bff53917c46a42e2967a9c75accab8cb
1 #! /bin/sh
2 # PCP QA Test No. 261
3 # pmlogextract -S updates the label record?
4 # also exposed interp.c and pmval problems
6 # Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved.
9 seq=`basename $0`
10 echo "QA output created by $seq"
12 # get standard filters
13 . ./common.product
14 . ./common.filter
15 . ./common.check
17 rm -f $seq.out
18 if [ $PCP_VER -lt 30602 ]
19 then
20 ln $seq.out.1 $seq.out || exit 1
21 elif [ $PCP_VER -lt 30809 ]
22 then
23 ln $seq.out.2 $seq.out || exit 1
24 else
25 ln $seq.out.3 $seq.out || exit 1
28 status=1 # failure is the default!
29 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
31 _filter()
33 sed \
34 -e '/^\[[0-9]* bytes]/d'
37 echo >$seq.full
39 # real QA test starts here
40 pmdumplog -z -l archives/mirage
41 pmdumplog -z -a archives/mirage 2>&1 >>$seq.full
43 pmlogextract -S 5min -T 5min archives/mirage $tmp
45 echo "--- copyied archive ---" >>$seq.full
46 pmdumplog -z -a $tmp | tee -a $seq.full | _filter
48 # Note on the bizarre 4.0001m termination intervals below ...
49 # Using _exactly_ 4m introduces a floating point arithmetic instability
50 # where the number of pmval samples could be 8 or 9 depending on how
51 # the compiler chooses to generate code (different gcc versions produce
52 # different answers) ... making it _slightly_ bigger avoids this problem
54 echo
55 echo "Check metrics using pmval ..."
56 for metric in sample.mirage
58 echo "$metric:"
59 pmval -z -t 30 -S @10:51:07.407 -T 4.0001min -a archives/mirage -i m-00,m-21,m-22,m-23,m-24 $metric >$tmp.orig
60 pmval -z -t 30 -T 4.0001min -a $tmp -i m-00,m-21,m-22,m-23,m-24 $metric >$tmp.new
61 sed -e "s;$tmp;TMP;g" $tmp.new \
62 | diff -c $tmp.orig - \
63 | sed -e "s;$tmp;TMP;g" \
64 -e '1,2s/ .*/ TODAY/' \
65 -e 's/--- -/--- Standard Input/'
66 echo "--- $metric, archives/mirage archive, instances" >>$seq.full
67 cat $tmp.orig >>$seq.full
68 echo "--- $metric, copied archive, instances" >>$seq.full
69 cat $tmp.new >>$seq.full
70 done
72 echo
73 for metric in sample.bin sample.drift
75 echo "$metric:"
76 pmval -z -t 30 -S @10:51:07.407 -T 4.0001min -a archives/mirage $metric >$tmp.orig
77 pmval -z -t 30 -T 4.0001min -a $tmp $metric >$tmp.new
78 sed -e "s;$tmp;TMP;g" $tmp.new \
79 | diff -c $tmp.orig - \
80 | sed -e "s;$tmp;TMP;g" \
81 -e '1,2s/ .*/ TODAY/' \
82 -e 's/--- -/--- Standard Input/'
83 echo "--- $metric, archives/mirage archive, NO instances" >>$seq.full
84 cat $tmp.orig >>$seq.full
85 echo "--- $metric, copied archive, NO instances" >>$seq.full
86 cat $tmp.new >>$seq.full
87 done
89 # success, all done
90 status=0
91 exit