Drop unused condition check
[pcp.git] / qa / 298
blob2c2cb32d660b0b929b91da2beb4a6190e78ed950
1 #! /bin/sh
2 # PCP QA Test No. 298
3 # exercise pmie2col
5 # Copyright (c) 2005 Silicon Graphics, Inc. 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 rm -f $seq.out $seq.full
17 if [ $PCP_PLATFORM = darwin ]
18 then
19 ln $seq.out.2 $seq.out
20 else
21 ln $seq.out.1 $seq.out
24 status=0 # success is the default!
25 $sudo rm -rf $tmp.*
26 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
28 cat <<'End-of-File' >$tmp.config
29 loadav = kernel.all.load #'1 minute';
30 '%usr' = kernel.all.cpu.user;
31 '%sys' = kernel.all.cpu.sys;
32 '%wio' = kernel.all.cpu.wait.total;
33 '%idle' = kernel.all.cpu.idle;
34 'maxiops' = max_inst(disk.dev.total);
35 End-of-File
37 _filter()
39 sed \
40 -e 's/^[A-Z][a-z][a-z] [A-Z][a-z][a-z] *[0-9][0-9]* [0-2][0-9]:[0-5][0-9]:[0-5][0-9] [0-9][0-9][0-9][0-9] /DATE /' \
41 -e 's/ *[0-9][0-9.]*/ N/g'
44 # missing metric errors now look something like this ...
45 # pmie: metric kernel.all.cpu.wait.total not in namespace for pmcd local: (host fuji)
47 _filter_err()
49 sed \
50 -e '/not in namespace/s/host .*)/host LOCALHOST)/'
53 # real QA test starts here
54 echo "=== live ===" | tee -a $seq.full
55 pmie -v -t 1 -T 3 <$tmp.config >$tmp.out 2>$tmp.tmp
56 cat $tmp.out >>$seq.full
57 sed -e '/Info: evaluator exiting/d' <$tmp.tmp >$tmp.err
58 if [ -s $tmp.err ]
59 then
60 echo "pmie errors ..."
61 _filter_err <$tmp.err
63 cat $tmp.out \
64 | pmie2col \
65 | tee -a $seq.full \
66 | _filter
68 echo | tee -a $seq.full
69 echo "=== live, pmie -e ===" | tee -a $seq.full
70 pmie -v -e -t 1 -T 3 <$tmp.config >$tmp.out 2>$tmp.tmp
71 cat $tmp.out >>$seq.full
72 sed -e '/Info: evaluator exiting/d' <$tmp.tmp >$tmp.err
73 if [ -s $tmp.err ]
74 then
75 echo "pmie errors ..."
76 _filter_err <$tmp.err
78 cat $tmp.out \
79 | pmie2col \
80 | tee -a $seq.full \
81 | _filter
83 echo | tee -a $seq.full
84 echo "=== archive and pmie2col -w ===" | tee -a $seq.full
85 pmie -v -z -A 30m -t 30m -a archives/kenj-pc-1 <$tmp.config >$tmp.out 2>$tmp.tmp
86 cat $tmp.out >>$seq.full
87 sed -e '/Info: evaluator exiting/d' <$tmp.tmp >$tmp.err
88 if [ -s $tmp.err ]
89 then
90 echo "pmie errors ..."
91 _filter_err <$tmp.err
93 cat $tmp.out \
94 | pmie2col -w 8 \
95 | tee -a $seq.full
97 # success, all done
98 exit