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
49 trap "_cleanup" 0 1 2 3 15
54 echo "... failed! ... here is the Install log ..."
57 echo "... and the tail of the pmcd log ..."
58 tail -20 $PCP_PMCDLOG_PATH
60 echo "... and the root PMDA log ..."
63 echo "...and the PMDA log ..."
69 _filter_pmda_install | \
74 -e "s/$port1/PORT1/" \
80 echo "--- pmcd.conf ---" >>$here/$seq.full
81 cat $PCP_PMCDCONF_PATH >>$here/$seq.full
82 echo "--- pmcd.log ---" >>$here/$seq.full
83 cat $PCP_PMCDLOG_PATH >>$here/$seq.full
84 echo "--- root.log ---" >>$here/$seq.full
85 if [ -f $ROOT_LOG_PATH ]
87 cat $ROOT_LOG_PATH >>$here/$seq.full
89 echo "$ROOT_LOG_PATH: file not found" >>$here/$seq.full
91 echo "--- simple.log ---" >>$here/$seq.full
92 if [ -f $PMDA_LOG_PATH ]
94 cat $PMDA_LOG_PATH >>$here/$seq.full
96 echo "$PMDA_LOG_PATH: file not found" >>$here/$seq.full
98 echo >>$here/$seq.full
103 # real QA test starts here
106 if [ ! -d $home/$iam ]
108 echo "Where is $home/$iam?"
114 # copy the pmcd config file to restore state later.
115 _save_config
$PCP_PMCDCONF_PATH
116 # ditto for simple pmda config
117 [ -f $home/$iam/$iam.conf
] && _save_config
$home/$iam/$iam.conf
119 if $sudo $PCP_MAKE_PROG clobber
>$tmp.out
2>&1
124 echo "Arrgh, make clobber failed"
128 # start from a known starting point
129 $sudo .
/Remove
>/dev
/null
2>&1
132 echo "=== pipe daemon agent ==="
133 echo "=== pipe daemon agent ===" >>$here/$seq.full
134 $sudo .
/Remove
>$tmp.out
2>&1
135 $sudo rm -f $PMDA_LOG_PATH
138 pipe' |
$sudo .
/Install
-e >>$tmp.out
2>&1
151 echo "=== Unix socket daemon agent ==="
152 echo "=== Unix socket daemon agent ===" >>$here/$seq.full
153 $sudo .
/Remove
>$tmp.out
2>&1
158 '"$tmp.fifo-1" |
$sudo .
/Install
-e >>$tmp.out
2>&1
159 $sudo rm -f $PMDA_LOG_PATH
164 '"$tmp.fifo-2" |
$sudo .
/Install
-e >>$tmp.out
2>&1
177 echo "=== Internet socket daemon agent ==="
178 echo "=== Internet socket daemon agent ===" >>$here/$seq.full
179 $sudo .
/Remove
>$tmp.out
2>&1
181 # pick a tcp port that is not in use
183 port1
=`_get_port tcp 5650 5699`
186 echo "Arrgh ... no free TCP port in the range 5650 ... 5699"
194 '$port1 |
$sudo .
/Install
-e >>$tmp.out
2>&1
196 # use next port this time
197 port2
=`expr $port1 + 1`
199 $sudo rm -f $PMDA_LOG_PATH
204 '$port2 |
$sudo .
/Install
-e >>$tmp.out
2>&1
217 echo "=== dso agent ==="
218 echo "=== dso agent ===" >>$here/$seq.full
219 $sudo .
/Remove
>$tmp.out
2>&1
221 dso' |
$sudo .
/Install
-e >>$tmp.out
2>&1
222 $sudo rm -f $PMDA_LOG_PATH
224 dso' |
$sudo .
/Install
-e >>$tmp.out
2>&1
236 $sudo .
/Remove
>$tmp.out
2>&1