4 # Derived metrics and delta() function
6 # Copyright (c) 2009 Ken McDonell. All Rights Reserved.
10 echo "QA output created by $seq"
12 # get standard environment, filters and checks
17 status
=0 # success is the default!
19 $sudo rm -rf $tmp.
* $seq.full
20 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
22 export PCP_DERIVED_CONFIG
=$tmp.config
24 # expr node 0x867eb68 type=PLUS left=0x867eb98 right=0x867ed28
28 -e '/[0-9][0-9]:[0-9][0-9]:[0-9][0-9]/s/[^ ]*.*numpmid/TIMESTAMP ... numpmid/' \
29 -e 's/=0x0 /=(nil) /g' \
30 -e 's/node 0x[0-9a-f]*/node <addr>/' \
31 -e 's/left=0x[0-9a-f]*/left=<addr>/' \
32 -e 's/right=0x[0-9a-f]*/right=<addr>/' \
34 -e "s/host: $host/host: HOST/g" \
35 -e "s/ value \"$host\"/ value \"HOST\"/g" \
36 -e 's/ val=[0-9][0-9]*/ val=<number>/g'
39 # real QA test starts here
41 echo "No errors here ..."
42 cat <<End-of-File >$tmp.config
44 derived.inst = delta(sample.longlong.million)
46 derived.ctr = delta(sampledso.recv_pdu)
51 for args
in derived.inst derived.ctr
54 pmval
-t 0.25 -s 4 -ZUTC -Dfetch,derive
,appl2
$args 2>&1 \
60 echo "Errors and empty results here ..."
61 cat <<End-of-File >$tmp.config
64 myname.c = delta(sample.long.one + sample.long.hundred)
65 myname.d = delta(12345)
73 pmval
-t 0.25 -s 3 -ZUTC -Dfetch,derive
,appl2
$args 2>&1 | _filter