/var/lib/pcp/testsuite/1088 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 | #! /bin/sh
# PCP QA Test No. 1088
# excercise pmmgr pmlogger-timefmt and hostid-static
#
# Copyright (c) Martins Innus
#
seq=`basename $0`
echo "QA output created by $seq"
rm -f $seq.full
# get standard environment, filters and checks
. ./common.product
. ./common.filter
. ./common.check
which pmmgr >/dev/null 2>&1 || _notrun "No pmmgr binary installed"
status=1 # failure is the default!
$sudo rm -rf $tmp $tmp.* $seq.full
trap "cd $here; $sudo rm -rf $tmp $tmp.*; exit \$status" 0 1 2 3 15
metric="sample.control"
cat <<EOF >$tmp.pmloggerconfig
log mandatory on 1 sec {
$metric
}
EOF
echo "=== pmmgr configuration ===" | tee -a $seq.full
$sudo rm -rf $tmp.dir
mkdir $tmp.dir
chmod 777 $tmp.dir
echo 'localhost' >>$tmp.dir/target-host
echo 'my_host_id' >>$tmp.dir/hostid-static
echo 'static_date_string' >>$tmp.dir/pmlogger-timefmt
$PCP_BINADM_DIR/pmmgr -v -p 2 -l $tmp.out -c $tmp.dir >$tmp.out 2>$tmp.err &
pid=$!
echo "pid=$pid" >>$seq.full
echo "-c $tmp.pmloggerconfig" >$tmp.dir/pmlogger
echo $tmp.dir >$tmp.dir/log-directory
# Give it some time to run
sleep 30
echo "=== check outout ===" | tee -a $seq.full
count=`ls -1 $tmp.dir/my_host_id/archive-static_date_string.meta | wc -l`
if [ $count -gt 0 ]; then
echo Got archive
else
echo "No archives"
fi
ls -lR $tmp.dir >>$seq.full
for f in $tmp.dir/my_host_id/*.meta; do
echo == $f == >>$seq.full
pmloglabel -l $f >>$seq.full
pmloglabel -l $f | grep "Log Label"
done
echo "=== kill pmmgr ===" | tee -a $seq.full
kill $pid
status=0
exit
|