3 # check out simple PMDA
5 # Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved.
9 echo "QA output created by $seq"
11 # get standard filters
16 signal
=$PCP_BINADM_DIR/pmsignal
19 ROOT_LOG_PATH
=`echo $PCP_PMCDLOG_PATH | sed -e 's/pmcd.log/root.log/'`
20 PMDA_LOG_PATH
=`echo $PCP_PMCDLOG_PATH | sed -e 's/pmcd.log/simple.log/'`
24 [ -f $home/$iam/$iam.conf.
$seq ] && _restore_config
$home/$iam/$iam.conf
25 if diff $PCP_PMCDCONF_PATH.
$seq $PCP_PMCDCONF_PATH > /dev
/null
2>&1
27 _restore_config
$PCP_PMCDCONF_PATH
30 # do a default install which ensures the pmns and any views are installed
32 $sudo .
/Install
< /dev
/null
> /dev
/null
2>&1
34 # PMDA may have been installed differently to default. As everything is
35 # installed we can use the old pmcd.conf file to restore state.
37 if diff $PCP_PMCDCONF_PATH.
$seq $PCP_PMCDCONF_PATH > /dev
/null
2>&1
39 _restore_config
$PCP_PMCDCONF_PATH
41 _restore_config
$PCP_PMCDCONF_PATH
42 $sudo $signal -a -s HUP pmcd
46 _service pmlogger start
>>$here/$seq.full
53 trap "_cleanup" 0 1 2 3 15
58 echo "... failed! ... here is the Install log ..."
61 echo "... and the tail of the pmcd log ..."
62 tail -20 $PCP_PMCDLOG_PATH
64 echo "... and the root PMDA log ..."
67 echo "...and the PMDA log ..."
73 _filter_pmda_install | \
78 -e "s/$port1/PORT1/" \
84 echo "--- pmcd.conf ---" >>$here/$seq.full
85 cat $PCP_PMCDCONF_PATH >>$here/$seq.full
86 echo "--- pmcd.log ---" >>$here/$seq.full
87 cat $PCP_PMCDLOG_PATH >>$here/$seq.full
88 echo "--- root.log ---" >>$here/$seq.full
89 if [ -f $ROOT_LOG_PATH ]
91 cat $ROOT_LOG_PATH >>$here/$seq.full
93 echo "$ROOT_LOG_PATH: file not found" >>$here/$seq.full
95 echo "--- simple.log ---" >>$here/$seq.full
96 if [ -f $PMDA_LOG_PATH ]
98 cat $PMDA_LOG_PATH >>$here/$seq.full
100 echo "$PMDA_LOG_PATH: file not found" >>$here/$seq.full
102 echo >>$here/$seq.full
107 # pmlogger may get confused by pmcd reconfig ... safest to stop it
108 # first, and restart it in cleanup()
110 _service pmlogger stop
>>$here/$seq.full
112 # real QA test starts here
115 if [ ! -d $home/$iam ]
117 echo "Where is $home/$iam?"
123 # copy the pmcd config file to restore state later.
124 _save_config
$PCP_PMCDCONF_PATH
125 # ditto for simple pmda config
126 [ -f $home/$iam/$iam.conf
] && _save_config
$home/$iam/$iam.conf
128 if $sudo $PCP_MAKE_PROG clobber
>$tmp.out
2>&1
133 echo "Arrgh, make clobber failed"
137 # start from a known starting point
138 $sudo .
/Remove
>/dev
/null
2>&1
141 echo "=== pipe daemon agent ==="
142 echo "=== pipe daemon agent ===" >>$here/$seq.full
143 $sudo .
/Remove
>$tmp.out
2>&1
144 $sudo rm -f $PMDA_LOG_PATH
147 pipe' |
$sudo .
/Install
-e >>$tmp.out
2>&1
160 echo "=== Unix socket daemon agent ==="
161 echo "=== Unix socket daemon agent ===" >>$here/$seq.full
162 $sudo .
/Remove
>$tmp.out
2>&1
167 '"$tmp.fifo-1" |
$sudo .
/Install
-e >>$tmp.out
2>&1
168 $sudo rm -f $PMDA_LOG_PATH
173 '"$tmp.fifo-2" |
$sudo .
/Install
-e >>$tmp.out
2>&1
186 echo "=== Internet socket daemon agent ==="
187 echo "=== Internet socket daemon agent ===" >>$here/$seq.full
188 $sudo .
/Remove
>$tmp.out
2>&1
190 # pick a tcp port that is not in use
192 port1
=`_get_port tcp 5650 5699`
195 echo "Arrgh ... no free TCP port in the range 5650 ... 5699"
203 '$port1 |
$sudo .
/Install
-e >>$tmp.out
2>&1
205 # use next port this time
206 port2
=`expr $port1 + 1`
208 $sudo rm -f $PMDA_LOG_PATH
213 '$port2 |
$sudo .
/Install
-e >>$tmp.out
2>&1
226 echo "=== dso agent ==="
227 echo "=== dso agent ===" >>$here/$seq.full
228 $sudo .
/Remove
>$tmp.out
2>&1
230 dso' |
$sudo .
/Install
-e >>$tmp.out
2>&1
231 $sudo rm -f $PMDA_LOG_PATH
233 dso' |
$sudo .
/Install
-e >>$tmp.out
2>&1
245 $sudo .
/Remove
>$tmp.out
2>&1