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 62
|
#! /bin/sh
# PCP QA Test No. 192
# sending 2 DESC_REQ PDUs back to back
#
# Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved.
#
seq=`basename $0`
echo "QA output created by $seq"
# get standard filters
. ./common.product
. ./common.filter
. ./common.check
LOGGING_DIR="$PCP_ARCHIVE_DIR"
LOCALHOST=`hostname`
_needclean=true
status=0
_interrupt()
{
status=1
}
_cleanup()
{
if $_needclean
then
pmafm $LOGGING_DIR/$LOCALHOST/Latest remove >$tmp.cmd 2>&1 \
&& $sudo sh $tmp.cmd
_service pmcd restart 2>&1 | _filter_pcp_restart
_wait_for_pmcd
_restore_auto_restart pmcd
_service pmlogger restart 2>&1 | _filter_pcp_restart
_wait_for_pmlogger
_needclean=false
fi
rm -f $tmp.*
exit $status
}
trap "_cleanup" 0
trap "_interrupt; _cleanup" 1 2 3 15
_stop_auto_restart pmcd
# real QA test starts here
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
PMCD_REQUEST_TIMEOUT=2; export PMCD_REQUEST_TIMEOUT
src/descreqX2 2>&1 \
| _filter_pmcd_log
_filter_pmcd_log <$PCP_PMCDLOG_PATH \
| grep '^->'
|