/var/lib/pcp/testsuite/170 is in pcp-testsuite 4.0.1-1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 | #! /bin/sh
# PCP QA Test No. 170
# Test $PCP_RC_DIR/pcp script pmcd log location
#
# Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved.
#
seq=`basename $0`
echo "QA output created by $seq"
. ./common.product
. ./common.check
. ./common.filter
status=0
_cleanup()
{
_restore_config $PCP_PMCDOPTIONS_PATH
_service pcp restart | _filter_pcp_start
_restore_auto_restart pmcd
_wait_for_pmcd
_wait_for_pmlogger
$sudo rm -f $tmp.*
exit $status
}
trap _cleanup 0 1 2 3 15
_stop_auto_restart pmcd
# real QA test starts here
rm -rf $tmp.* $seq.full
echo "First, the standard logfile:" | tee -a $seq.full
_service pcp stop >/dev/null
$sudo rm -f $PCP_LOG_DIR/pmcd/pmcd.log
_service pcp start | tee -a $seq.full >$tmp.out
_wait_for_pmcd
_wait_for_pmlogger
grep -i 'starting pmcd' $tmp.out | _filter_pcp_start
if [ -f $PCP_LOG_DIR/pmcd/pmcd.log ]
then
echo '$PCP_LOG_DIR/pmcd/pmcd.log created'
else
echo 'Error: $PCP_LOG_DIR/pmcd/pmcd.log not created' | tee -a $here/$seq.full
date >>$here/$seq.full
ls -l $PCP_LOG_DIR/pmcd >>$here/$seq.full
$PCP_PS_PROG $PCP_PS_ALL_FLAGS | egrep '[P]ID|[p]mcd' >>$here/$seq.full
status=1
fi
echo ""
_save_config $PCP_PMCDOPTIONS_PATH
cp $PCP_PMCDOPTIONS_PATH $tmp.options
cat <<End-Of-File >>$tmp.options
# Dummy lines added by PCP QA test 170
#
-l $tmp.1.pmcd.log
-l $tmp.2.pmcd.log
End-Of-File
$sudo cp $tmp.options $PCP_PMCDOPTIONS_PATH
echo "The logfile from the hacked \$PCP_PMCDOPTIONS_PATH (pmcd.options):" | tee -a $seq.full
_service pcp restart | tee -a $seq.full >$tmp.out
_wait_for_pmcd
_wait_for_pmlogger
grep -i 'starting pmcd' $tmp.out | sed -e "s/$$/MYPID/" | _filter_pcp_start
if [ -f $tmp.1.pmcd.log ]
then
echo 'Error: $tmp.1.pmcd.log created unexpectedly'
ls -l $tmp.1.pmcd.log
cat $tmp.1.pmcd.log
status=1
fi
if [ -f $tmp.2.pmcd.log ]
then
echo '$tmp.2.pmcd.log created'
else
echo 'Error: $tmp.2.pmcd.log not created'
status=1
fi
exit
|