3 # pmlogreduce rate conversion
5 # Copyright (c) 2002 Silicon Graphics, Inc. All Rights Reserved.
9 echo "QA output created by $seq"
11 # get standard environment, filters and checks
16 status
=0 # success is the default!
18 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
28 -e '/End of PCP archive log/d' \
31 $1 == "interval:" { skip = 0; next }
38 -e 's/\([0-9]\)E/\1 E /' \
41 for (i = 2; i <= NF; i++) {
66 $PCP_ECHO_PROG $PCP_ECHO_N "$1""$PCP_ECHO_C"
68 echo "=== $1 orig ===" >>$seq.full
69 pmval
-z -O 1m
-A 15m
-t 15m
-a archives
/kenj-pc-1
$1 2>$tmp.orig.err \
73 echo "--- stderr ---" >>$seq.full
74 cat $tmp.orig.err
>>$seq.full
75 echo "--- filtered ---" >>$seq.full
76 cat $tmp.orig
>>$seq.full
78 echo "=== $1 reduce ===" >>$seq.full
79 pmval
-z -O 15m
-A 15m
-t 15m
-a $tmp $1 2>$tmp.reduce.err \
82 | _filter
>$tmp.reduce
83 echo "--- stderr ---" >>$seq.full
84 cat $tmp.reduce.err
>>$seq.full
85 echo "--- filtered ---" >>$seq.full
86 cat $tmp.reduce
>>$seq.full
88 join -a 1 -a 2 -e "?" $tmp.orig
$tmp.reduce
>$tmp.
join
92 $PCP_AWK_PROG <$tmp.
join >$tmp.chk
'
93 NF != 3 { if (NR > 1) print
96 $2 == "?" { print; next }
97 $3 == "?" { print; next }
98 { if (0.99*$2 <= $3 && $3 <= 1.01*$2) next }
103 $PCP_ECHO_PROG " mismatches ..."
104 echo "--- chk ---" >>$seq.full
105 cat $tmp.chk
>>$seq.full
108 diff -u $tmp.orig
$tmp.reduce
114 # real QA test starts here
115 pmlogreduce
-A 15m
-t 15m
-D appl0
,appl1
,appl2 archives
/kenj-pc-1
$tmp 2>>$seq.full
118 disk.all.total kernel.all.cpu.idle \
119 disk.dev.total kernel.percpu.cpu.user