summaryrefslogtreecommitdiff
path: root/qa/557
blob: c70b9904e3895424622f3b85cc42eb239d3f72b4 (plain)
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
#!/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

$sudo $PCP_RC_DIR/pcp stop | _filter_pcp_stop

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
$sudo $PCP_RC_DIR/pcp restart | _filter_pcp_start
pmcd_wait
sleep 10
$signal -s TERM $!

_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