3 # pmid and desc caching in pmevent
5 # Copyright (c) 2011 Ken McDonell. All Rights Reserved.
9 echo "QA output created by $seq"
11 # get standard environment, filters and checks
16 status
=0 # success is the default!
18 $sudo rm -rf $tmp.
* $seq.full
19 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
21 # real QA test starts here
22 pmstore sample.event.
reset 0 >/dev
/null
2>&1
23 pmevent
-Dpdu,derive
-t 10msec
-s 20 sample.event.records
>$tmp.out
2>&1
24 cat $tmp.out
>>$seq.full
26 # Need to make this not host specific ...
27 # 2.6.0 (pmcd.client.whoami): numval: 1 valfmt: 2 vlist[]:
28 # value "bozo-laptop (127.0.0.1) pmevent -Dpdu -t 10msec -s 20 sample.event.records"
29 # pmXmitPDU: RESULT fd=<fd> len=124
32 -e '/^[0-9][0-9]*:/d' \
34 -e '/pmResult/s/ .* numpmid/ ... numpmid/' \
35 -e "s/ value \"$host\"/ value \"HOST\"/g" \
36 -e "s/host: $host/host: localhost/g" \
37 -e 's/[0-2][0-9]:[0-5][0-9]:[0-5][0-9]\.[0-9][0-9][0-9]/TIMESTAMP/g' \
38 -e 's/fd=[0-9][0-9]*/fd=<fd>/g' \
39 |
$PCP_AWK_PROG ' BEGIN { hostskip=0 }
40 /^pmXmitPDU: FETCH fd=<fd> len=/ { hostskip++; }
41 /^pmGetPDU: RESULT fd=<fd> len=/ { if (hostskip < 2) { next } }
42 /pmcd.client.whoami/ { print; skip=2; next }
43 skip > 0 { print "blah blah ..."; skip--; next }