3 # exercise a libpcp_trace problem
5 # Copyright (c) 2015 Red Hat.
6 # Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved.
10 echo "QA output created by $seq"
12 # get standard filters
17 [ -f $PCP_PMDAS_DIR/trace
/pmdatrace
] || _notrun
"trace pmda not installed"
19 signal
=$PCP_BINADM_DIR/pmsignal
20 status
=1 # failure is the default!
24 if [ -n "$PCP_TRACE_HOST" ]
26 savedtracehost
=$PCP_TRACE_HOST; unset PCP_TRACE_HOST
34 if [ -d $PCP_LOG_DIR/pmlogger
]
36 LOGGING_DIR
=$PCP_LOG_DIR/pmlogger
38 LOGGING_DIR
=$PCP_LOG_DIR
46 pmafm
$LOGGING_DIR/$LOCALHOST/Latest remove
>$tmp.cmd
2>&1 \
48 _change_config pmlogger on
49 $sudo cp /tmp
/$seq.dir
/pmcd.conf
$PCP_PMCDCONF_PATH
50 $sudo cp /tmp
/$seq.dir
/root
$PCP_VAR_DIR/pmns
/root
52 $sudo $PCP_RC_DIR/pcp restart | _filter_pcp_start
57 if [ -n "$savedtracehost" ]
59 PCP_TRACE_HOST
=$savedtracehost; export PCP_TRACE_HOST
67 cp $PCP_PMCDCONF_PATH /tmp
/$seq.dir
68 cp $PCP_VAR_DIR/pmns
/root
/tmp
/$seq.dir
70 _change_config pmlogger off
73 trap "_interrupt; _cleanup" 1 2 3 15
75 pminfo trace
>/dev
/null
2>&1
78 # real QA test starts here
80 echo "=== Checking pmtrace without a PMDA listening ==="
81 cd $PCP_PMDAS_DIR/trace
82 $sudo .
/Remove
>/dev
/null
2>&1
84 $sudo $signal -a -s KILL pmdatrace
> /dev
/null
2>&1
86 # Should produce a PMDA connect error ...
87 pmtrace
-h $LOCALHOST -q -v 1.1 foo
91 $sudo $PCP_PMDAS_DIR/trace
/Install
< /dev
/null
> /dev
/null
2>&1