pmrep: fix archive end time reporting
[pcp.git] / qa / 433
blobc5d025990e632abc059f0894e359f4c3ba884eeb
1 #! /bin/sh
2 # PCP QA Test No. 433
3 # Test pmie bug #573184
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 _filter()
21 _show_pmie_errors | sort | sed -e 's/"//g' -e 's/note - //g'
24 _check_core()
26 if [ "`echo core*`" != "core*" ]
27 then
28 $PCP_ECHO_PROG $PCP_ECHO_N "Dumped core! (saved in $here as""$PCP_ECHO_C"
29 for c in core*
31 $sudo mv $c $here/$seq.$c
32 $PCP_ECHO_PROG $PCP_ECHO_N " $seq.$c""$PCP_ECHO_C"
33 done
34 echo ")"
38 # real QA test starts here
40 $sudo rm -f core*
42 cat << end-of-file > $tmp.conf
43 delta = 1 sec;
44 (\$day_of_week >= 1 && \$day_of_week <= 5) && (\$hour >= 7 && \$hour <= 18) &&
45 some_host (
46 30 %_sample irix.disk.all.read :omen @0..9 > 0 )
47 -> print "Disk reads on %h";
48 end-of-file
50 pmie -z -a archives/573184 $tmp.conf >$tmp.out 2>$tmp.err
51 cat $tmp.out $tmp.err | _filter
53 _check_core
55 # success, all done
56 status=0
57 exit