3 # Ensure pmlogger not started via PMDA Install if it is
6 # Copyright (c) 2015 Red Hat.
10 echo "QA output created by $seq"
12 # get standard environment, filters and checks
17 status
=1 # failure is the default!
20 $sudo rm -rf $tmp $tmp.
* $seq.full
32 echo "Resetting system state"
34 _change_config pmlogger on
35 _restore_pmda_install simple
36 pmafm
$LOGGING_DIR/$LOCALHOST/Latest remove
>$tmp.cmd
2>&1 \
38 $sudo $PCP_RC_DIR/pcp restart | _filter_pcp_start
48 trap "_interrupt; _cleanup" 1 2 3 15
53 if [ -d $PCP_TMP_DIR/pmlogger
]
54 then cd $PCP_TMP_DIR/pmlogger
58 ls -l >>$here/$seq.full
64 [ "$process" = "primary" ] && continue
65 ps
-p $process >/dev
/null
2>&1
68 echo "urk, $PCP_TMP_DIR/pmlogger/$process has no running pmlogger instance"
70 count
=`expr $count + 1`
77 _filter_root_install
()
79 _filter_pmda_install |
$PCP_AWK_PROG '
80 /Check containers metrics have appeared/ { if ($7 >= 0) $7 = "X"
81 if ($10 >= 0) $10 = "Y"
86 # real QA test starts here
87 _prepare_pmda_install root
89 _change_config pmlogger off
90 pmafm
$LOGGING_DIR/$LOCALHOST/Latest remove
>$tmp.cmd
2>&1 \
92 $sudo rm -f $PCP_TMP_DIR/pmlogger
/*
95 echo "pmlogger count at start of QA testing: $?" |
tee -a $here/$seq.full
98 # switch off pmcd and pmlogger
99 $sudo $PCP_RC_DIR/pcp stop | _filter_pcp_stop
101 # install a PMDA, which should restart only pmcd
102 cd $PCP_PMDAS_DIR/root
103 $sudo .
/Install
< /dev
/null
2>&1 | _filter_root_install
105 # verify no pmloggers running
107 echo "pmlogger count at end of Install (expect 0): $?" |
tee -a $here/$seq.full
110 # switch default pmlogger on once more
112 _change_config pmlogger on
114 # install a PMDA, should restart both pmcd and pmlogger
115 cd $PCP_PMDAS_DIR/root
116 $sudo .
/Install
< /dev
/null
2>&1 | _filter_root_install
118 # verify pmlogger is running
120 echo "pmlogger count at end of Install (expect 1): $?" |
tee -a $here/$seq.full