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
|
#! /bin/sh
# PCP QA Test No. 079
# exercise -z, -Z and -S for pmclient
#
# Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved.
#
seq=`basename $0`
echo "QA output created by $seq"
# get standard filters
. ./common.product
. ./common.filter
. ./common.check
trap "rm -f $tmp.*; exit 0" 0 1 2 3 15
# need a constant archive for this ...
#
ARCH=archives/moomba.client
_filter()
{
sed -e "s;$PCP_DOC_DIR;\$PCP_DOC_DIR;"
}
# real QA test starts here
# Skip ... Header 12 bytes
# plus Label fluff ... magic(4) + pid(4) + start(4)
#
echo "Dump hostname & TZ ..."
# od(1) format is not quite consistent, hence the final sed
#
dd bs=1 skip=24 count=104 if=$ARCH.0 2>/dev/null \
| od -c \
| sed -e 's/ */ /g' -e 's/ *$//'
echo ""
TZ=EST-10
export TZ
echo "Local time, TZ=$TZ"
pmclient -a $ARCH 2>&1 >$tmp.out 2>$tmp.err
cat $tmp.err $tmp.out | _filter
echo ""
echo "-Z UTC"
pmclient -a $ARCH -Z UTC >$tmp.out 2>$tmp.err
cat $tmp.err $tmp.out | _filter
echo ""
echo "-Z PDT8"
pmclient -a $ARCH -Z PDT8 >$tmp.out 2>$tmp.err
cat $tmp.err $tmp.out | _filter
echo ""
echo "local time at collection host"
pmclient -a $ARCH -z >$tmp.out 2>$tmp.err
cat $tmp.err $tmp.out | _filter
echo ""
echo "and again, but skip 15 seconds"
pmclient -a $ARCH -S 15 -z >$tmp.out 2>$tmp.err
cat $tmp.err $tmp.out | _filter
|