summaryrefslogtreecommitdiff
path: root/qa/287
blob: 948b531fd3873c16d7ae1aa15c4cf113a5133f12 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#! /bin/sh
# PCP QA Test No. 287
# handling of wrapping counters with pmlogreduce
#
# Copyright (c) 2005 Silicon Graphics, Inc.  All Rights Reserved.
#

seq=`basename $0`
echo "QA output created by $seq"

# get standard environment, filters and checks
. ./common.product
. ./common.filter
. ./common.check

which pmlogreduce >/dev/null 2>&1 || _notrun "No pmlogreduce binary installed"

rm -f $seq.out
size=`_get_word_size`
ln $seq.out.$size $seq.out || exit 1

status=0	# success is the default!
$sudo rm -rf $tmp.*
trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15

# real QA test starts here

_filter()
{
    sed -e "s;$tmp;TMP;"
}

status=0	# success is the default!
$sudo rm -rf $tmp.*
trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15

# real QA test starts here

for interval in 2sec 5sec 15sec
do
    echo
    rm -f $tmp.*
    pmlogreduce -t $interval src/uwrap $tmp
    echo "-- raw reduce -t $interval --"
    pmval -z -r -w 15 -f 0 -t $interval -U $tmp sample.wrap.ulong 2>&1 \
    | _filter
    echo "-- rate converted, reduce -t $interval --"
    pmval -z -w 15 -f 0 -t $interval -a $tmp sample.wrap.ulong 2>&1 \
    | _filter
done

echo
echo "-- raw input archive --"
pmval -z -r -w 15 -f 0 -U src/uwrap sample.wrap.ulong

echo
echo "-- input archive, rate converted with PCP_COUNTER_WRAP set --"
PCP_COUNTER_WRAP=on
export PCP_COUNTER_WRAP
pmval -z -w 15 -f 0 -a src/uwrap -t 1sec sample.wrap.ulong

echo
echo "-- input metric descriptor --"
pminfo -d -a src/uwrap sample.wrap.ulong
echo
echo "-- output metric descriptor --"
pminfo -d -a $tmp sample.wrap.ulong

# success, all done
exit