3 # $PMCD_RECONNECT_TIMEOUT validation
5 # Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved.
9 echo "QA output created by $seq"
11 # get standard filters
23 $0 != last { print; last = $0 }' \
25 -e 's/failed: Connection reset by peer/failed: IPC protocol failure/' \
26 -e 's/[A-Z][a-z][a-z] [A-Z][a-z][a-z] *[0-9][0-9]* [0-9][0-9]:[0-9][0-9]:[0-9][0-9]/DATE/' \
27 -e '/recon([0-9][0-9]*)/s//recon(PID)/' \
29 -e '/^pmReconnectContext(/d' \
30 -e '/^Dump Contexts:/d' \
31 -e '/^Dump Instance Profile /d' \
32 -e '/^IPC table fd/d' \
33 -e '/^__pmConnectPMCD(/d' \
34 -e '/^__pmDecodeXtendError:/d' \
35 -e '/^pmNewContext(/d' \
36 -e '/^__pmSendCreds:/d' \
37 -e '/^__pmSetSocketIPC:/d' \
38 -e '/^__pmSetVersionIPC:/d' \
39 -e '/^__pmDataIPC: /d' \
40 -e '/^__pmSetDataIPC:/d' \
41 -e '/^pmWhichContext(/d' \
42 -e '/__pmConnect(fd=.*) ->/d' \
44 /delay: 6 / { print "delay: 6-10 secs"; next }
45 /delay: 7 / { print "delay: 6-10 secs"; next }
46 /delay: 8 / { print "delay: 6-10 secs"; next }
47 /delay: 9 / { print "delay: 6-10 secs"; next }
48 /delay: 10 / { print "delay: 6-10 secs"; next }
49 /delay: 14 / { print "delay: 14-16 secs"; next }
50 /delay: 15 / { print "delay: 14-16 secs"; next }
51 /delay: 16 / { print "delay: 14-16 secs"; next }
55 cat >$tmp.new
<<End-of-File
58 # Name Id IPC IPC Params File/Cmd
59 pmcd 2 dso pmcd_init $PCP_PMDAS_DIR/pmcd/pmda_pmcd.so
60 sample 29 pipe binary $PCP_PMDAS_DIR/sample/pmdasample -d 29
63 # copy the pmcd config file to restore state later.
64 $sudo cp $PCP_PMCDCONF_PATH $tmp.pmcd.conf
65 $sudo cp $tmp.new
$PCP_PMCDCONF_PATH
67 # ensure we have pmcd ready for the first iteration.
68 # just doing a start may race and find the pmcd socket busy,
69 # so stop, wait a little, and start
70 $sudo $PCP_RC_DIR/pcp stop
>/dev
/null
2>&1
72 $sudo $PCP_RC_DIR/pcp start
>/dev
/null
2>&1
78 [ -f $tmp.pmcd.conf
] && $sudo cp $tmp.pmcd.conf
$PCP_PMCDCONF_PATH
79 [ "$PCP_PLATFORM" != "linux" ] && _change_config pmlogger on
80 $sudo $PCP_RC_DIR/pcp restart
>/dev
/null
83 $sudo rm -f $tmp.pmcd.conf
88 trap _cleanup
0 1 2 3 15
90 # real QA test starts here
91 for xxx
in "" "1,3,5" "2" "1-2" "1,2,foo"
95 unset PMCD_RECONNECT_TIMEOUT
97 PMCD_RECONNECT_TIMEOUT
="$xxx"
98 export PMCD_RECONNECT_TIMEOUT
102 echo "PMCD_RECONNECT_TIMEOUT=\"$PMCD_RECONNECT_TIMEOUT\""
103 echo "start PMCD_RECONNECT_TIMEOUT=$PMCD_RECONNECT_TIMEOUT" >>$seq.full
104 echo "start `date`" >>$seq.full
108 src
/recon
$DEBUG >$tmp.out
2>&1 &
111 echo "begin stop pmcd `date`" >>$seq.full
112 $sudo $PCP_RC_DIR/pcp stop | _filter_pcp_stop
113 echo "end stop pmcd `date`" >>$seq.full
115 echo "begin start pmcd `date`" >>$seq.full
116 $sudo $PCP_RC_DIR/pcp start \
117 | _filter_pcp_start \
118 |
sed -e '/starting archive loggers/d' -e '/Starting pmlogger/d'
119 echo "end start pmcd `date`" >>$seq.full
123 cat $tmp.out
>>$seq.full