pmrep: update TODO, man page
[pcp.git] / qa / 837
blob5334b1d99fa9163b8db6b59192d0cdd94e52b185
1 #!/bin/sh
2 # PCP QA Test No. 837
3 # Exercise basic --container option handling in libpcp[_pmda].
5 # Copyright (c) 2015 Red Hat. All Rights Reserved.
8 seq=`basename $0`
9 echo "QA output created by $seq"
11 # get standard environment, filters and checks
12 . ./common.product
13 . ./common.filter
14 . ./common.check
16 _get_libpcp_config
17 $unix_domain_sockets || _notrun "No unix domain socket support available"
18 _check_containers
20 status=1 # failure is the default!
21 $sudo rm -rf $tmp.* $seq.full
22 trap "cd $here; rm -rf $tmp.*; exit \$status" 0 1 2 3 15
24 _filter()
26 tee -a $here/$seq.full \
27 | grep -i attribute | \
28 sed \
29 -e "s/processid=[0-9][0-9]*/processid=PID/" \
30 -e "s/groupid=$gid/groupid=GID/" \
31 -e "s/userid=$uid/userid=UID/" \
32 -e '/ctx=[0-9][0-9]*/s//ctx=N/' \
33 -e '/pmdasample([0-9][0-9]*)/s//pmdasample(PID)/' \
34 -e 's/^\[[A-Z].. [A-Z].. *[0-9][0-9]* ..:..:..]/[DATETIME]/'
37 # real QA test starts here
38 uid=`id -u`
39 gid=`id -g`
41 # reset the sample PMDA logfile
42 $sudo $PCP_RC_DIR/pcp start >/dev/null 2>&1
43 _wait_for_pmcd
44 _wait_for_pmlogger
46 # store to enable verbose attribute diagnostics
47 authdbg=`pmdbg -l | grep DBG_TRACE_AUTH | awk '{ print $2 }'`
48 pmstore sample.control $authdbg
50 pminfo --container=wedge sample >/dev/null 2>&1
51 pmprobe --container=tailed sample >/dev/null 2>&1
52 pmval -s1 --container=eagle sample.dodgey.value >/dev/null 2>&1
54 cat $PCP_LOG_DIR/pmcd/sample.log | _filter
55 pmstore sample.control 0
57 # success, all done
58 status=0
59 exit