3 # check out sample PMDA
5 # Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved.
9 echo "QA output created by $seq"
11 # get standard filters
16 $sudo $PCP_RC_DIR/pcp restart | _filter_pcp_start
22 _filter_pmda_install | \
23 sed -e 's/ 13[0-9][0-9] values/ 1300+ values/' \
24 -e 's/ 1[0-9] warnings/ 10+ warnings/' \
25 -e 's/ 3 warnings/ 10+ warnings/' \
26 -e 's/ 1[0-9][0-9] metrics/ 100+ metrics/' \
28 -e "s/$port1/PORT1/" \
43 pminfo
-v $1 && echo "Error: pminfo -v found some \"$1\" metrics"
44 $PCP_PS_PROG $PCP_PS_ALL_FLAGS |
grep "[p]mda$1" >$tmp.tmp
47 echo "Error: some \"$1\" PMDAs still present"
55 # save pmcd.conf and restore it after the test
56 cp $PCP_PMCDCONF_PATH $tmp.pmcd.conf
60 if [ ! -d $home/$iam ]
62 echo "Where is $home/$iam?"
68 if [ ! -f dynamic.indom
]
70 echo "1 one" >$tmp.indom
71 echo "2 two" >>$tmp.indom
72 $sudo cp $tmp.indom dynamic.indom
75 # make sure sample agent is running again at the end, so other QA tests
78 trap "echo; echo 'Reinstall PMDA ...'; $sudo ./Install </dev/null >$tmp.out; _filter <$tmp.out; $sudo cp $tmp.pmcd.conf $PCP_PMCDCONF_PATH; $sudo rm -f $tmp.*; exit \$status" 0 1 2 3 15
80 # real QA test starts here
83 echo "=== remove agent ==="
84 $sudo .
/Remove
>$tmp.out
2>&1
89 echo "=== pipe agent ==="
91 pipe' |
$sudo .
/Install
-e >$tmp.out
2>&1
93 pminfo
-v sample ||
echo "... failed!"
95 pipe' |
$sudo .
/Install
-e >$tmp.out
2>&1
97 pminfo
-v sample ||
echo "... failed!"
100 echo "=== socket Internet agent ==="
102 # pick a tcp port that is not in use
104 port1
=`_get_port tcp 5670 5689`
107 echo "Arrgh ... no free TCP port in the range 5670 ... 5689"
114 '$port1 |
$sudo .
/Install
-e >$tmp.out
2>&1
116 pminfo
-v sample ||
echo "... failed!"
118 # use next port this time
119 port2
=`expr $port1 + 1`
124 '$port2 |
$sudo .
/Install
-e >$tmp.out
2>&1
126 pminfo
-v sample ||
echo "... failed!"
129 echo "=== socket Unix agent ==="
133 '"$tmp.fifo" |
$sudo .
/Install
-e >$tmp.out
2>&1
135 pminfo
-v sample ||
echo "... failed!"
139 '"$tmp.fifo" |
$sudo .
/Install
-e >$tmp.out
2>&1
141 pminfo
-v sample ||
echo "... failed!"
143 $sudo .
/Remove
>$tmp.out
2>&1
144 _filter_rem
<$tmp.out
145 _check_pmda_gone
$iam