docs: tweak formatting in pmrep(1) archive folio example
[pcp.git] / qa / 287
blob64bd55b38dd11788e15fc5a9519e1fde8cd18a42
1 #! /bin/sh
2 # PCP QA Test No. 287
3 # handling of wrapping counters with pmlogreduce
5 # Copyright (c) 2005 Silicon Graphics, Inc. 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 pmlogreduce >/dev/null 2>&1 || _notrun "No pmlogreduce binary installed"
18 rm -f $seq.out
19 size=`_get_word_size`
20 ln $seq.out.$size $seq.out || exit 1
22 status=0 # success is the default!
23 $sudo rm -rf $tmp.*
24 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
26 # real QA test starts here
28 _filter()
30 sed -e "s;$tmp;TMP;"
33 status=0 # success is the default!
34 $sudo rm -rf $tmp.*
35 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
37 # real QA test starts here
39 for interval in 2sec 5sec 15sec
41 echo
42 rm -f $tmp.*
43 pmlogreduce -t $interval archives/uwrap $tmp
44 echo "-- raw reduce -t $interval --"
45 pmval -z -r -w 15 -f 0 -t $interval -U $tmp sample.wrap.ulong 2>&1 \
46 | _filter
47 echo "-- rate converted, reduce -t $interval --"
48 pmval -z -w 15 -f 0 -t $interval -a $tmp sample.wrap.ulong 2>&1 \
49 | _filter
50 done
52 echo
53 echo "-- raw input archive --"
54 pmval -z -r -w 15 -f 0 -U archives/uwrap sample.wrap.ulong
56 echo
57 echo "-- input archive, rate converted with PCP_COUNTER_WRAP set --"
58 PCP_COUNTER_WRAP=on
59 export PCP_COUNTER_WRAP
60 pmval -z -w 15 -f 0 -a archives/uwrap -t 1sec sample.wrap.ulong
62 echo
63 echo "-- input metric descriptor --"
64 pminfo -d -a archives/uwrap sample.wrap.ulong
65 echo
66 echo "-- output metric descriptor --"
67 pminfo -d -a $tmp sample.wrap.ulong
69 # success, all done
70 exit