Merge branch 'master' of git://git.pcp.io/pcp into qt
[pcp.git] / qa / 428
blob6a4310205be13230f8b28a11c216606d8c8434fc
1 #! /bin/sh
2 # PCP QA Test No. 428
3 # interp mode problems with PM_SEM_INSTANT metric, see #564535
5 # Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved.
8 seq=`basename $0`
9 echo "QA output created by $seq"
11 # get standard filters
12 . ./common.product
13 . ./common.filter
14 . ./common.check
16 status=1 # failure is the default!
17 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
19 rm -f $seq.full
21 _set()
23 for m in long longlong float double string aggregate
25 pmstore sample.$m.write_me $1 >/dev/null
26 done
29 _filter()
31 # second sed is for endian variations
33 sed \
34 -e '/^metric:/d' \
35 -e '/^archive:/d' \
36 -e '/^host:/d' \
37 -e '/^start:/d' \
38 -e '/^end:/d' \
39 -e '/^semantics:/d' \
40 -e '/^units:/d' \
41 -e '/^samples:/d' \
42 -e '/^interval:/d' \
43 -e '/No values available/d' \
44 -e '/End of PCP archive log/d' \
45 | $PCP_AWK_PROG '
46 NF == 2 { print $2; next }
47 NF == 3 { print $3; next }
48 NF > 0 { print }' \
49 | sed \
50 -e 's/\[00010000]/[00000100]/' \
51 -e 's/\[00040000]/[00000400]/' \
52 -e 's/\[00100000]/[00001000]/' \
53 -e 's/\[10000000]/[00000010]/' \
54 | LC_COLLATE=POSIX sort -u
57 # real QA test starts here
58 _set 1024
60 cat <<End-of-File >$tmp.config
61 log mandatory on 500msec {
62 sample.long.write_me
63 sample.longlong.write_me
64 sample.float.write_me
65 sample.double.write_me
66 sample.string.write_me
67 sample.aggregate.write_me
69 End-of-File
71 pmlogger <$tmp.config -l $tmp.log -T 10sec $tmp &
73 sleep 2
75 _set 4096
77 sleep 2
79 _set 256
81 sleep 2
83 _set 16
85 wait
87 cat $tmp.log >$seq.full
89 echo "----------------------------"
90 echo "Raw data (pmval -U)"
91 echo "----------------------------"
92 for m in long longlong float double string aggregate
94 echo
95 echo "Unique values for sample.$m.write_me ..."
96 pmval -U $tmp sample.$m.write_me 2>&1 | tee -a $seq.full | _filter
97 done
99 echo
100 echo "----------------------------"
101 echo "Interpolated data (pmval -a)"
102 echo "----------------------------"
103 for m in long longlong float double string aggregate
105 echo
106 echo "Unique values for sample.$m.write_me ..."
107 pmval -t 0.25sec -a $tmp sample.$m.write_me 2>&1 | tee -a $seq.full | _filter
108 done
110 # success, all done
111 status=0
112 exit