3 # exercise pmie log compression thru pmie_daily
5 # Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved.
6 # Portions Copyright (c) 2007 Aconex. All Rights Reserved.
10 echo "QA output created by $seq"
12 # get standard environment, filters and checks
18 [ -d $tmp.distdir
] && rm -fr $tmp.distdir
19 [ -d $tmp.relaydir
] && rm -fr $tmp.relaydir
23 status
=1 # failure is the default!
24 trap "_cleanup; exit \$status" 0 1 2 3 15
26 # create test control file, directories and populate with dummy logfiles
30 dist.engr n $tmp.distdir/pmie.log -c config.default
31 relay.engr n $tmp.relaydir/pmie.log -c config.default
34 mkdir
-p $tmp.distdir
$tmp.relaydir
36 # some logfiles for today...
38 cp $tmp.ctl
$tmp.distdir
/pmie.log.
$TODAY
39 cp $tmp.ctl
$tmp.relaydir
/pmie.log.
$TODAY
41 # some logfiles for five days ago...
42 FIVEDAYS
=`pmdate -5d %Y%m%d`
43 cp $tmp.ctl
$tmp.distdir
/pmie.log.
$FIVEDAYS
44 cp $tmp.ctl
$tmp.relaydir
/pmie.log.
$FIVEDAYS
46 # some logfiles for five months ago...
47 FIVEMONTHS
=`pmdate -5m %Y%m%d`
48 cp $tmp.ctl
$tmp.distdir
/pmie.log.
$FIVEMONTHS
49 cp $tmp.ctl
$tmp.relaydir
/pmie.log.
$FIVEMONTHS
51 # real QA test starts here
53 # "Error: ..." and "... unchanged" lines will only appear if pmie_daily
54 # thinks pmie is "chkconfig on" ... and this is not guaranteed for the
55 # QA platform, so cull 'em
56 # Similarly the + rm -f TMP/pmie/<pid> lines come from defunct pmie
57 # processes that don't have anything to do with this QA test
59 pmie_daily
-V -N -x 3 -X compress -c $tmp.ctl
-l $tmp.log
62 -e '/Error: no pmie instance running/d' \
63 -e '/inference engine for host .* unchanged/d' \
64 -e "s/$TODAY/TODAY/g" \
65 -e "s/$FIVEDAYS/FIVEDAYS/g" \
66 -e "s/$FIVEMONTHS/FIVEMONTHS/g" \
67 -e "s,$PCP_TMP_DIR,TMP,g" \
68 -e "s/$seq-$$/SEQ-PID/g" \
69 -e "s;/private/;/;g" \
71 -e '/^+ rm -f TMP\/pmie\/[0-9][0-9]*$/d' \