pmrep: update TODO, man page
[pcp.git] / qa / 221
blobfb8173f4911301a78e633d3ae8cff2e20a307519
1 #! /bin/sh
2 # PCP QA Test No. 221
3 # pmlogger preamble gets timestamp from first pmFetch?
5 # Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved.
8 seq=`basename $0`
9 echo "QA output created by $seq"
11 # get standard filters
12 . ./common.product
13 . ./common.filter
15 status=0
16 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
18 # real QA test starts here
19 echo "log mandatory on 100 msec pmcd.timezone" \
20 | pmlogger -s1 -D1 -l $tmp.log $tmp >$tmp.err 2>&1
22 echo "expect no messages ..."
23 cat $tmp.err $tmp.log \
24 | tee $seq.full \
25 | grep timestamp \
26 | $PCP_AWK_PROG '
27 /Starting logger/ { state = 1; next }
28 state == 1 {
29 if (p != 0) {
30 if ($6 < p)
31 print "timestamp delta NEGATIVE!",p,$6
32 else if ($6 - p > 1)
33 print "timestamp delta more than 1 second!",p,$6
35 p = $6
38 # optional stuff if your test has verbose output to help resolve problems
39 echo
40 echo "If failure, check $seq.full (this) and $seq.full.ok (reference)"
42 # all done
43 exit