3 # Check hyphen in host name
5 # Copyright (c) 2002 Silicon Graphics, Inc. All Rights Reserved.
9 echo "QA output created by $seq"
11 # get standard environment, filters and checks
18 [ -z "$PCPQA_HYPHEN_HOST" ] && _notrun
'PCPQA_HYPHEN_HOST is not set in ./common.config'
20 status
=0 # success is the default!
23 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
25 # real QA test starts here
27 host=$PCPQA_HYPHEN_HOST
28 eval realhost
=`pmprobe -v -h $PCPQA_HYPHEN_HOST pmcd.hostname | \
29 $PCP_AWK_PROG '{ print $3 }'`
32 _notrun
"cannot connect to pmcd on $PCPQA_HYPHEN_HOST"
34 [ "$realhost" = Unknown
] && realhost
=`pmhostname $PCPQA_HYPHEN_HOST`
40 -e "s/$host/HYPHEN-HOST/" \
41 -e "s/$realhost/HYPHEN-HOST/" \
42 -e 's/HYPHEN-HOST\.localdomain/HYPHEN-HOST/' \
49 -e "s/$host/HYPHEN-HOST/" \
50 -e "s/$realhost/HYPHEN-HOST/" \
51 -e 's/HYPHEN-HOST\.localdomain/HYPHEN-HOST/' \
52 -e 's/[A-Z][a-z][a-z] [A-Z][a-z][a-z] *[0-9][0-9]* [0-9][0-9]:[0-9][0-9]:[0-9][0-9]/DATE/'
55 # real QA test starts here
57 echo "pmie [hostname in config]"
58 cat <<End-of-File >$tmp.config
60 // note have to quote hostname
61 2 * pmcd.control.sighup :'$host' - pmcd.control.sighup :'$host';
63 cat $tmp.config
>$seq.full
64 pmie
-T 2sec
-v <$tmp.config
>$tmp.out
2>$tmp.err
65 cat $tmp.out
$tmp.err \
67 |
sed -e 's/expr_1: */expr_1: /' \
71 echo "pmval [metric spec on command line]"
72 pmval
-t0.5
-s 1 $host:pmcd.control.sighup \
77 echo "pmlc [several uses]"
78 ( echo "show loggers"; \
79 echo "show loggers@$host"; \
80 echo "connect primary@$host"; \