pmrep: fix archive end time reporting
[pcp.git] / qa / 313
blobba9e9e11a4f3e4a5ee7f3e33eb9c446b71430eed
1 #! /bin/sh
2 # PCP QA Test No. 313
3 # assorted issues associated with pmval and archives with mark
4 # records
6 ## note this file edited by hand to simulate the expected output
8 # Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved.
11 seq=`basename $0`
12 echo "QA output created by $seq"
14 # get standard filters
15 . ./common.product
16 . ./common.filter
17 . ./common.check
19 status=1 # failure is the default!
20 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
22 # deal with an annoying libc error ... using TZ=:Australia/Melbourne
23 # causes the -z option to report the wrong time, at least for some
24 # times of the year
26 TZ=EST-10
27 export TZ
29 offset=`_arch_start archives/changeinst -0.25`
31 # real QA test starts here
33 for delta in 1sec 0.5sec
36 echo
37 echo "=== delta=$delta counter in each non-preamble result in all 3 sections ==="
38 pmval -O $offset -t $delta -z -a archives/changeinst sample.seconds 2>$tmp.err
39 cat $tmp.err
41 echo
42 echo "=== delta=$delta counter in the 2nd section only ==="
43 pmval -O $offset -t $delta -z -a archives/changeinst sample.milliseconds 2>$tmp.err
44 cat $tmp.err
46 echo
47 echo "=== delta=$delta instantaneous in 1st and 3rd sections ==="
48 pmval -O $offset -t $delta -z -a archives/changeinst sample.drift 2>$tmp.err
49 cat $tmp.err
51 echo
52 echo "=== delta=$delta discrete and logged once in the 1st and 3rd sections ==="
53 pmval -O $offset -t $delta -z -a archives/changeinst hinv.ncpu 2>$tmp.err
54 cat $tmp.err
56 echo
57 echo "=== delta=$delta counter and indom all over the place ==="
58 echo " lo0 ec0 ec2 section"
59 echo " yes yes no 1"
60 echo " no no no 2"
61 echo " yes no yes 3"
62 pmval -O $offset -t $delta -z -a archives/changeinst -i ec0,ec2,lo0 irix.network.interface.total.packets 2>$tmp.err
63 cat $tmp.err
65 echo
66 echo "=== delta=$delta instantaneous and indom all over the place ==="
67 echo " bin-100 bin-200 bin-300 bin-400 bin-500 section"
68 echo " yes yes no yes no 1"
69 echo " yes no yes yes once 2"
70 echo " no yes yes yes no 3"
71 pmval -O $offset -t $delta -z -a archives/changeinst -i bin-100,bin-200,bin-300,bin-400,bin-500 sample.bin 2>$tmp.err
72 cat $tmp.err
74 echo
75 echo "=== delta=$delta discrete logged once, different indom in each section ==="
76 pmval -O $offset -t $delta -z -a archives/changeinst pmcd.pmlogger.port 2>$tmp.err
77 cat $tmp.err
79 done
81 echo
82 echo "=== the whole shooting match ==="
83 pmdumplog -z -a archives/changeinst \
84 | sed -e '/\[[0-9][0-9]* bytes\]/d'
86 # success, all done
87 status=0
88 exit