pmrep: update TODO, man page
[pcp.git] / qa / 622
blobb6e234b623486020438f1f80e5b704bf546b45bb
1 #! /bin/sh
2 # PCP QA Test No. 622
3 # Test for the ability for pmie(1) to accept hyphens in host names, but
4 # not metric names.
6 # This is in response to test 503, which did not allow for the fact that
7 # a hostname may have a hyphen in it! By the way, test 503 should be
8 # fixed (by now) to allow for hosts with hyphens in their names... this
9 # test shows how the config file ought to have been built.
11 # Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved.
14 seq=`basename $0`
15 echo "QA output created by $seq"
17 # get standard environment, filters and checks
18 . ./common.product
19 . ./common.filter
20 . ./common.check
21 . ./common.config
23 status=1 # failure is the default!
24 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
26 [ -z "$PCPQA_HYPHEN_HOST" -o "$PCPQA_HYPHEN_HOST" = "some-host" ] && \
27 _notrun 'PCPQA_HYPHEN_HOST is not set in ./common.config'
28 if ping -w 2 $PCPQA_HYPHEN_HOST >$tmp.tmp 2>&1
29 then
30 # seems to be alive
32 else
33 cat $tmp.tmp >$seq.full
34 _notrun "host $PCPQA_HYPHEN_HOST is not responding"
37 # shell functs for QA test
39 mkPMIEConfig() {
40 cat >$tmp.rule <<EOF
41 delta = 1 sec;
42 one = 'sample.long.no-hyphen' :'$PCPQA_HYPHEN_HOST';
43 EOF
47 # real QA test starts here
49 mkPMIEConfig
50 pmie -D APPL0 -C -c $tmp.rule 2>&1 \
51 | sed \
52 -e "s,/tmp/$seq-[0-9]*\.rule,TMPFILE," \
53 -e '/pmLookupName failed: /d' \
54 -e "s/$PCPQA_HYPHEN_HOST/PCPQA_HYPHEN_HOST/g"
56 # success, all done
57 status=0
58 exit