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
19 trap _cleanup
0 1 2 3 15
23 [ -f $tmp.pmcd.conf
] && $sudo cp $tmp.pmcd.conf
$PCP_PMCDCONF_PATH
24 [ "$PCP_PLATFORM" != "linux" ] && _change_config pmlogger on
25 $sudo $PCP_RC_DIR/pcp restart
>/dev
/null
28 $sudo rm -f $tmp.pmcd.conf
37 $0 != last { print; last = $0 }' \
39 -e 's/failed: Connection reset by peer/failed: IPC protocol failure/' \
40 -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/' \
41 -e '/recon([0-9][0-9]*)/s//recon(PID)/' \
43 -e '/^pmReconnectContext(/d' \
44 -e '/^Dump Contexts:/d' \
45 -e '/^Dump Instance Profile /d' \
46 -e '/^IPC table fd/d' \
47 -e '/^__pmConnectPMCD(/d' \
48 -e '/^__pmDecodeXtendError:/d' \
49 -e '/^pmNewContext(/d' \
50 -e '/^__pmSendCreds:/d' \
51 -e '/^__pmSetSocketIPC:/d' \
52 -e '/^__pmSetVersionIPC:/d' \
53 -e '/^__pmDataIPC: /d' \
54 -e '/^__pmSetDataIPC:/d' \
55 -e '/^pmWhichContext(/d' \
56 -e '/__pmConnect(fd=.*) ->/d' \
57 -e '/__pmCloseChannelbyContext/d' \
59 /delay: 2 / { print "delay: 2-4 secs"; next }
60 /delay: 3 / { print "delay: 2-4 secs"; next }
61 /delay: 4 / { print "delay: 2-4 secs"; next }
62 /delay: 5 / { print "delay: 5-7 secs"; next }
63 /delay: 6 / { print "delay: 5-7 secs"; next }
64 /delay: 7 / { print "delay: 5-7 secs"; next }
66 # note: now that pmcd starts and stops very quickly, we use a
67 # strategy in testing valid reconnect strings with less-than-
68 # five-seconds (alot less) and any errors fall back to using
69 # the defaults, which are 5,10,etc.
72 cat >$tmp.new
<<End-of-File
75 # Name Id IPC IPC Params File/Cmd
76 pmcd 2 dso pmcd_init $PCP_PMDAS_DIR/pmcd/pmda_pmcd.$DSO_SUFFIX
77 sample 29 pipe binary $PCP_PMDAS_DIR/sample/pmdasample -d 29
80 # copy the pmcd config file to restore state later.
81 $sudo cp $PCP_PMCDCONF_PATH $tmp.pmcd.conf
82 $sudo cp $tmp.new
$PCP_PMCDCONF_PATH
84 # ensure we have pmcd ready for the first iteration.
85 # just doing a start may race and find the pmcd socket busy,
86 # so stop, wait a little, and start
87 $sudo $PCP_RC_DIR/pcp stop
>/dev
/null
2>&1
89 $sudo $PCP_RC_DIR/pmcd start
>/dev
/null
2>&1
92 # real QA test starts here
93 for xxx
in "" "1,1,2,2" "2" "1-2" "1,2,foo"
97 unset PMCD_RECONNECT_TIMEOUT
99 PMCD_RECONNECT_TIMEOUT
="$xxx"
100 export PMCD_RECONNECT_TIMEOUT
104 echo "PMCD_RECONNECT_TIMEOUT=\"$PMCD_RECONNECT_TIMEOUT\""
105 echo "start PMCD_RECONNECT_TIMEOUT=$PMCD_RECONNECT_TIMEOUT" >>$seq.full
106 echo "start `date`" >>$seq.full
110 src
/recon
$DEBUG >$tmp.out
2>&1 &
113 echo "begin stop pmcd `date`" >>$seq.full
114 $sudo $PCP_RC_DIR/pmcd stop | _filter_pcp_stop
115 echo "end stop pmcd `date`" >>$seq.full
117 echo "begin start pmcd `date`" >>$seq.full
118 $sudo $PCP_RC_DIR/pmcd start \
120 echo "end start pmcd `date`" >>$seq.full
124 cat $tmp.out
>>$seq.full