3 # weblog PMDA install/remove test
5 # Copyright (c) 2015 Red Hat.
6 # Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved.
10 echo "QA output created by $seq"
14 [ -f $PCP_PMDAS_DIR/weblog
/pmdaweblog
] || _notrun
"weblog PMDA not installed"
16 if [ $PCP_PLATFORM = solaris
]
18 _notrun
"weblog PMDA won't work for Solaris Apache install"
21 status
=1 # failure is the default!
29 trap _cleanup
0 1 2 3 15
33 # *.(cached|uncached|client).* might have no values available
35 /\.cached\...* No value(s) available/d
36 /\.uncached\...* No value(s) available/d
37 /\.client\...* No value(s) available/d
45 s/ weblog metrics / web metrics /;
46 /Updating the Performance Metrics Name /,/of symbol table/d;
47 /Check web metrics have gone away/d;
49 /Culling the Performance Metrics Name/,/ done/d;
50 /make: Nothing to be done for .install./d;
51 /Installing files \.\.\./d;
52 /Removing files \.\.\./d;
54 skip == 1 && /^Found/ { skip = 0 }
55 skip == 2 && /^A configuration file can be automatically generated/ {
61 skip == 0 && /Do you want a default weblog PMDA installation/ {
66 skip == 0 && / Server\./ { print "... some server(s) found ..."
71 /Check web metrics have appeared / { next }
75 # real QA test starts here
79 _remove_pmda weblog
> /dev
/null
81 echo "=== install weblog PMDA ===" |
tee -a $seq.full
82 _install_pmda weblog |
tee -a $seq.full | _filter |
$PCP_AWK_PROG '
83 /Installing pmchart view/ { skip = 0; next }
84 /Terminate PMDA if already installed/ { skip = 0 }
86 /^Found / { print "Found at least one server ..."
92 echo "=== check metrics (expect no output) ==="
94 pminfo
-v web |
tee -a $seq.full | _pminfo_filter
96 pminfo
-v web
> /dev
/null || _fail
"install failed?"
97 [ `_pmcount web` -ge 69 ] || _fail
"Too few metrics?"
98 [ `_pmget web.config.numservers` -ge 1 ] || _fail
"No servers found?"
100 echo "=== remove weblog PMDA ==="
101 _remove_pmda weblog | _filter
104 echo "=== Checking uninstall (expect no output) ==="
105 ps
$PCP_PS_ALL_FLAGS |
grep '[p]mdaweblog'
106 pmprobe web
2>&1 |
$PCP_AWK_PROG '$2 > 0 { print "Oops ...",$0 }'