1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
|
#!/bin/sh
# PCP QA Test No. 557
# pmie problems where metrics not initially available and later become
# available
#
# Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved.
#
seq=`basename $0`
echo "QA output created by $seq"
# get standard environment, filters and checks
. ./common.product
. ./common.filter
. ./common.check
signal=$PCP_BINADM_DIR/pmsignal
status=0 # success is the default!
trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
$sudo rm -f core*
DEBUG="-v -Dappl1,appl2"
DEBUG=
HOST=`hostname`
# real QA test starts here
if ! _service pmlogger stop 2>&1; then _exit 1; fi \
| _filter_pcp_stop
_wait_pmlogger_end || _exit 1
if ! _service pmcd stop 2>&1; then _exit 1; fi \
| _filter_pcp_stop
_wait_pmcd_end || _exit 1
pmie -t 1sec $DEBUG << End-of-File >$tmp.log 2>&1 &
pmcd.numclients > 0
-> print "PMCD is up and clients are in";
End-of-File
sleep 3
if ! _service pmcd restart 2>&1; then _exit 1; fi \
| _filter_pcp_restart
_wait_for_pmcd || _exit 1
if ! _service pmlogger restart 2>&1; then _exit 1; fi \
| _filter_pcp_restart
_wait_for_pmlogger || _exit 1
sleep 10
$signal -s TERM $!
_wait_for_pmlogger || _exit 1
_filter_pmie_log <$tmp.log \
| sed -e "s/$HOST/HOST/g" -e "s/local:/HOST/g" > $tmp.flog
grep "Cannot connect" $tmp.flog | uniq
grep "Re-established connection" $tmp.flog | sort | uniq
grep "PMCD is up" $tmp.flog | uniq
_check_core
exit
|