diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2014-10-26 12:33:50 +0400 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2014-10-26 12:33:50 +0400 |
commit | 47e6e7c84f008a53061e661f31ae96629bc694ef (patch) | |
tree | 648a07f3b5b9d67ce19b0fd72e8caa1175c98f1a /qa/861 | |
download | pcp-47e6e7c84f008a53061e661f31ae96629bc694ef.tar.gz |
Debian 3.9.10debian/3.9.10debian
Diffstat (limited to 'qa/861')
-rwxr-xr-x | qa/861 | 54 |
1 files changed, 54 insertions, 0 deletions
@@ -0,0 +1,54 @@ +#!/bin/sh +# PCP QA Test No. 861 +# Exercise custom pmcd hostname settings for clients needing +# accurate (and/or custom) remote host name information. +# +# Copyright (c) 2013 Red Hat. +# + +seq=`basename $0` +echo "QA output created by $seq" + +# get standard environment, filters and checks +. ./common.product +. ./common.filter +. ./common.check + +pminfo pmcd.hostname >/dev/null || _notrun "No support for pmcd.hostname metric" + +signal=$PCP_BINADM_DIR/pmsignal +status=1 # failure is the default! +$sudo rm -rf $tmp.* $seq.full +trap "_cleanup; exit \$status" 0 1 2 3 15 + +_cleanup() +{ + if [ -n "$pid" ] + then + echo "Terminating local pmcd process" + $signal -s TERM $pid + wait + pid="" + fi + cd $here; rm -rf $tmp.* +} + +# real QA test starts here +export PCP_PMCDCONF_PATH=$tmp.conf +export PMCD_PORT=9876 +export PMCD_SOCKET=$tmp.pmcd.socket + +cat <<End-of-File >$tmp.conf +pmcd 2 dso pmcd_init $PCP_PMDAS_DIR/pmcd/pmda_pmcd.so +End-of-File +pmcd -H nosuchhost.com -f -x $seq.full -l $tmp.log & +pid=$! +pmcd_wait + +echo "Checking custom pmcd.hostname setting from client side:" +pminfo -dfm pmcd.hostname + +# success, all done +status=0 + +exit |