3 # checks pmcd handling empty $PCP_PMCDCONF_PATH
5 # Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved.
9 echo "QA output created by $seq"
11 # get standard filters
16 signal
=$PCP_BINADM_DIR/pmsignal
17 status
=1 # failure is the default!
21 _restore_config
$PCP_PMCDCONF_PATH
23 $sudo $PCP_RC_DIR/pcp restart | _filter_pcp_start
30 # try to provoke a core
31 pminfo
-v irix
>/dev
/null
2>&1
34 $sudo touch $PCP_PMCDLOG_PATH
35 grep -i "dumping to core" $PCP_PMCDLOG_PATH
37 if [ "`echo $PCP_LOG_DIR/core*`" != "$PCP_LOG_DIR/core*" -o "`echo $PCP_LOG_DIR/pmcd/core*`" != "$PCP_LOG_DIR/pmcd/core*" -o $sts -eq 0 ]
39 echo "=== core found or logfile claims dumping to core! ==="
40 echo '=== Here is $PCP_PMCDLOG_PATH ==='
44 echo '--- No core file at $PCP_LOG_DIR/core or $PCP_LOG_DIR/pmcd/core ---'
48 trap "_cleanup; exit \$status" 0 1 2 3 15
51 # real QA test starts here
53 # terminate any pmcds and get rid of core file to get to a sane starting place
54 $sudo $PCP_RC_DIR/pcp stop
>/dev
/null
2>&1
55 $sudo rm -f $PCP_LOG_DIR/core
* $PCP_LOG_DIR/pmcd
/core
* $PCP_PMCDLOG_PATH
60 _save_config
$PCP_PMCDCONF_PATH
61 $sudo cp /dev
/null
$PCP_PMCDCONF_PATH
64 echo "--- pmcd.conf contents follow ---"
65 cat $PCP_PMCDCONF_PATH
66 $sudo $PCP_RC_DIR/pcp restart
2>&1 \
68 | fgrep
-v "Waiting for PMCD to terminate" \
69 | fgrep
-v "pmcd_wait failed:"
71 echo "Waiting for PMCD ..."
75 echo "Expected timeout - got status $? from pmcd_wait!"
77 echo "Connection timed out as expected"
80 echo "Checking for core file ..."