pmrep: fix archive end time reporting
[pcp.git] / qa / 861
blobed5bd587c4262f052ce386639baf179bffa4069c
1 #!/bin/sh
2 # PCP QA Test No. 861
3 # Exercise custom pmcd hostname settings for clients needing
4 # accurate (and/or custom) remote host name information.
6 # Copyright (c) 2013 Red Hat.
9 seq=`basename $0`
10 echo "QA output created by $seq"
12 # get standard environment, filters and checks
13 . ./common.product
14 . ./common.filter
15 . ./common.check
17 pminfo pmcd.hostname >/dev/null || _notrun "No support for pmcd.hostname metric"
19 signal=$PCP_BINADM_DIR/pmsignal
20 status=1 # failure is the default!
21 $sudo rm -rf $tmp.* $seq.full
22 trap "_cleanup; exit \$status" 0 1 2 3 15
24 _cleanup()
26 if [ -n "$pid" ]
27 then
28 echo "Terminating local pmcd process"
29 $signal -s TERM $pid
30 wait
31 pid=""
33 cd $here; rm -rf $tmp.*
36 # real QA test starts here
37 export PCP_PMCDCONF_PATH=$tmp.conf
38 export PMCD_PORT=9876
39 export PMCD_SOCKET=$tmp.pmcd.socket
41 cat <<End-of-File >$tmp.conf
42 pmcd 2 dso pmcd_init $PCP_PMDAS_DIR/pmcd/pmda_pmcd.$DSO_SUFFIX
43 End-of-File
44 pmcd -H no.such.host.pcp.io -f -x $seq.full -l $tmp.log &
45 pid=$!
46 pmcd_wait
48 echo "Checking custom pmcd.hostname setting from client side:"
49 pminfo -dfm pmcd.hostname
51 # success, all done
52 status=0
54 exit