pmrep: fix archive end time reporting
[pcp.git] / qa / 447
blob6189fb4970b95495abdf46bd9fab2fa4f6245d69
1 #!/bin/sh
2 # PCP QA Test No. 447
3 # instances for event records
5 # Copyright (c) 2011 Ken McDonell. All Rights Reserved.
8 seq=`basename $0`
9 echo "QA output created by $seq"
11 # get standard environment, filters and checks
12 . ./common.product
13 . ./common.filter
14 . ./common.check
16 which pmevent >/dev/null 2>&1 || _notrun "pmevent executable not found"
18 status=0 # success is the default!
19 host=`hostname`
20 $sudo rm -rf $tmp.* $seq.full
21 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
23 _filter()
25 sed \
26 -e "s/host: $host/host: localhost/g" \
27 -e 's/[0-2][0-9]:[0-5][0-9]:[0-5][0-9]\.[0-9][0-9][0-9]/TIMESTAMP/g'
30 _run()
32 echo
33 echo "=== $* ==="
34 pmstore sample.event.reset 0 >/dev/null 2>&1
35 pmstore sampledso.event.reset 0 >/dev/null 2>&1
36 pmevent $* 2>&1 | _filter
39 # real QA test starts here
40 _run -t 0.1 -s 4 sampledso.event.records
41 _run -t 0.1 -s 4 'sampledso.event.records[fungus,bogus]'
42 _run -t 0.1 -s 4 -i fungus,bogus sampledso.event.records
43 _run -t 0.1 -s 4 sampledso.event.no_indom_records
45 # success, all done
46 exit