pmrep: update TODO, man page
[pcp.git] / qa / 311
blobfd82d05eb4bed2c4baab1b0448a09bae86179b68
1 #! /bin/sh
2 # PCP QA Test No. 311
3 # check error code handling of 1.3 pmlogger generated archives
4 # pv #509592
6 # Note: archive archives/err_v1 has been converted from V.1 to V.2 format,
7 # so this test is now somewhat different.
9 # Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved.
12 seq=`basename $0`
13 echo "QA output created by $seq"
15 # get standard filters
16 . ./common.product
17 . ./common.filter
18 . ./common.check
20 _notrun "no support for V1 archives"
22 status=0 # success is the default!
23 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
25 _order()
27 $PCP_AWK_PROG '
28 NF == 0 { next }
29 /^pmcd/ { if (NF > 1) print; else printf("%s|", $0); next }
30 /^proc/ { printf("%s|", $0); next }
31 /^sample/ { printf("%s|", $0); next }
32 { print }' \
33 | LC_COLLATE=POSIX sort \
34 | $PCP_AWK_PROG -F'|' '{ print $1; if (NF == 2) print $2 }'
37 _filter()
39 sed \
40 -e '/^\[[0-9]* bytes]/d' \
41 -e 's/): inst/): inst/'
44 # deal with an annoying libc error ... using TZ=:Australia/Melbourne
45 # causes the -z option to report the wrong time, at least for some
46 # times of the year
48 TZ=EST-10
49 export TZ
51 # real QA test starts here
52 echo "== pminfo preamble and no values =="
53 pminfo -n src/root_irix -z -f -a archives/err_v1 | _order
55 echo
56 echo "== pminfo skip preamble and errors instead of values =="
57 pminfo -n src/root_irix -z -O 1sec -f -a archives/err_v1 | _order
59 echo
60 echo "== pmdumplog for 1 metric (expect error) ==="
61 pmdumplog -n src/root_irix -z archives/err_v1 sample.bad.nosupport
63 echo
64 echo "== diffs for pmdumplog all metrics compared to PCP 1.x output (expect none) =="
65 pmdumplog -n src/root_irix -z -a archives/err_v1 \
66 | _filter \
67 | diff - archives/err_v1.dump
69 # success, all done
70 exit