docs: tweak formatting in pmrep(1) archive folio example
[pcp.git] / qa / 558
blob65b96545f9fa3d87aab2d26605b8c14c9fb0e641
1 #! /bin/sh
2 # PCP QA Test No. 558
3 # pmie problems where metrics initially available and later become
4 # unavailable
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 environment, filters and checks
13 . ./common.product
14 . ./common.filter
15 . ./common.check
17 rm -f $seq.out
18 ln $seq.out.linux $seq.out
20 signal=$PCP_BINADM_DIR/pmsignal
21 status=0 # success is the default!
22 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
24 $sudo rm -f core
25 DEBUG="-v -Dappl1,appl2"
26 DEBUG=
27 HOST=`hostname`
29 target=""
30 test $PCP_VER -ge 30803 && target="-h $HOST"
32 PMCD_RECONNECT_TIMEOUT=1; export PMCD_RECONNECT_TIMEOUT
34 # real QA test starts here
36 cat <<End-of-File | pmie $target -t 1sec $DEBUG >$tmp.log 2>&1 &
37 sample.long.million > hinv.ncpu
38 -> print 5 sec "singular" " %v";
39 sample.float.million + sample.double.million >= sample.long.million
40 -> print 5 sec "expr" " %v";
41 some_host sample.long.million > hinv.ncpu
42 -> print 5 sec "some_host" " %h:%v";
43 some_inst sample.bin + sample.bin > 1000
44 -> print 5 sec "some_inst" " [%i]%v";
45 some_host
46 some_inst
47 sample.bin :localhost :'$HOST'
48 + sample.bin :localhost :'$HOST'
49 > 1000
50 -> print 5 sec "some_host some_inst" " %h:[%i]%v";
51 End-of-File
53 sleep 3
54 $sudo $PCP_RC_DIR/pcp stop | _filter_pcp_stop
56 sleep 10
57 $sudo $PCP_RC_DIR/pcp start | _filter_pcp_start
58 pmcd_wait
59 sleep 10
60 $signal -s TERM $!
61 wait
63 cp $tmp.log $seq.full
65 _filter_pmie_log <$tmp.log \
66 | sed \
67 -e "s/ host $HOST/ host HOST\/localhost/g" \
68 -e "s/ from $HOST/ from HOST\/localhost/g" \
69 -e "s/$HOST/HOST/g" \
70 -e "s/local:/HOST/g" \
71 -e "s/ host localhost/ host HOST\/localhost/g" \
72 -e "s/ from localhost/ from HOST\/localhost/g" \
73 -e 's/failed: IPC protocol failure/failed: [IPC shutdown]/' \
74 -e 's/failed: Connection reset by peer/failed: [IPC shutdown]/' \
75 | $PCP_AWK_PROG '
76 $1 == "DATE:" && $2 == "singular" { if (state > 0) skip = 1
77 state++
79 $1 != "DATE:" { skip = 0; state = 0 }
80 skip == 0 { print }'
82 _check_core
84 exit