/var/lib/pcp/testsuite/564 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 86 | #! /bin/sh
# PCP QA Test No. 564
# exercise archive compression thru pmlogger_daily
#
# Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved.
#
seq=`basename $0`
echo "QA output created by $seq"
# get standard environment, filters and checks
. ./common.product
. ./common.filter
_cleanup()
{
[ -d $tmp.distdir ] && rm -fr $tmp.distdir
[ -d $tmp.relaydir ] && rm -fr $tmp.relaydir
$sudo rm -f $tmp.*
}
status=1 # failure is the default!
trap "_cleanup; exit \$status" 0 1 2 3 15
# create test control file, directories and populate with dummy archives
cat >$tmp.ctl<<EOF
\$version=1.1
#Host P? S? directory args
dist.engr n n $tmp.distdir -c config.default
relay.engr n n $tmp.relaydir -c config.default
EOF
mkdir -p $tmp.distdir $tmp.relaydir
# some archives for today...
TODAY=`pmdate %Y%m%d.0`
cp $tmp.ctl $tmp.distdir/$TODAY.0
cp $tmp.ctl $tmp.distdir/$TODAY.meta
cp $tmp.ctl $tmp.distdir/$TODAY.index
cp $tmp.ctl $tmp.relaydir/$TODAY.0
cp $tmp.ctl $tmp.relaydir/$TODAY.meta
cp $tmp.ctl $tmp.relaydir/$TODAY.index
# some archives for a five days ago...
FIVEDAYS=`pmdate -5d %Y%m%d.0`
cp $tmp.ctl $tmp.distdir/$FIVEDAYS.0
cp $tmp.ctl $tmp.distdir/$FIVEDAYS.meta
cp $tmp.ctl $tmp.distdir/$FIVEDAYS.index
cp $tmp.ctl $tmp.relaydir/$FIVEDAYS.0
cp $tmp.ctl $tmp.relaydir/$FIVEDAYS.1
cp $tmp.ctl $tmp.relaydir/$FIVEDAYS.meta
cp $tmp.ctl $tmp.relaydir/$FIVEDAYS.index
cp $tmp.ctl $tmp.relaydir/mumble
cp $tmp.ctl $tmp.relaydir/mumble.0
STAMP=`pmdate -5d %Y%m%d`0010
touch -t "$STAMP" $tmp.*/$FIVEDAYS.* $tmp.relaydir/mumble*
# some archives for five months ago...
FIVEMONTHS=`pmdate -5m %Y%m%d.0`
cp $tmp.ctl $tmp.distdir/$FIVEMONTHS.0
cp $tmp.ctl $tmp.distdir/$FIVEMONTHS.meta
cp $tmp.ctl $tmp.distdir/$FIVEMONTHS.index
cp $tmp.ctl $tmp.relaydir/$FIVEMONTHS.0
cp $tmp.ctl $tmp.relaydir/$FIVEMONTHS.meta
cp $tmp.ctl $tmp.relaydir/$FIVEMONTHS.index
STAMP=`pmdate -5m %Y%m%d`0010
touch -t "$STAMP" $tmp.*/$FIVEMONTHS.*
# real QA test starts here
$sudo $PCP_BINADM_DIR/pmlogger_daily -V -N -x 3 -X bzip2 -c $tmp.ctl -l $tmp.log
$sudo cat $tmp.log | \
sed \
-e '/NOTICES/d' \
-e "s/$TODAY/TODAY/g" \
-e "s/$FIVEDAYS/FIVEDAYS/g" \
-e "s/$FIVEMONTHS/FIVEMONTHS/g" \
-e "s/$seq-$$/SEQ-PID/g" \
-e '/Warning: no archives found to merge/d' \
-e "s;/private/;/;g" \
-e "s,$PCP_TMP_DIR,TMP,g" \
-e "s,/var/tmp,TMP,g" \
-e "s,/tmp,TMP,g" \
# success, all done
status=0
exit
|