3 # Tests out the api (uses torture_api)
4 # when connecting to different hosts.
5 # Initial motivation was to test the distributed PMNS.
6 # This test is modelled on #112 and compares with 031.out
8 # Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved.
12 echo "QA output created by $seq"
14 # get standard filters
19 status
=1 # failure is the default!
20 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
25 echo "--- os = $os, version = 2 ---" >>$seq.full
28 echo "--- unfiltered output ---" >>$seq.full
29 cat $tmp.1 >> $seq.full
31 _filter_torture_api
<$tmp.1
36 echo "differences relative to 031.out ..."
38 diff 031.out.
${PCP_PLATFORM} $1
48 style_str
="--- style $style (local PMNS)"
51 style_str
="--- style $style (distributed PMNS)"
56 echo "=== pmapi 32 v2, local version $style_str ===" |
tee -a $seq.full
57 torture_api
="src/torture_api"
58 echo "torture_api = $torture_api" >> $seq.full
59 $torture_api -v $style 2>&1 | _filter
`uname -r` >$tmp.out
63 echo "=== pmapi 32 v2, pmcd 32 v2 $style_str ===" |
tee -a $seq.full
64 torture_api
="src/torture_api"
65 echo "torture_api = $torture_api" >> $seq.full
66 $torture_api -v $style -h $host_32_v2 2>&1 | _filter
$host_32_v2_os >$tmp.out
70 echo "=== pmapi 32 v2, pmcd 64 v2 $style_str ===" |
tee -a $seq.full
71 torture_api
="src/torture_api"
72 echo "torture_api = $torture_api" >> $seq.full
73 $torture_api -v $style -h $host_64_v2 2>&1 | _filter
$host_64_v2_os >$tmp.out
78 # real QA test starts here
82 # try against variously configured hosts
84 # Need PCP_PLATFORM b/c the torture_api output is different
85 # on different platforms at the moment.
86 # => different metrics and the same metrics have different pmids
88 host_32_v2
=`./getpmcdhosts -s $PCP_PLATFORM -b 32 -m "pmcd.version>2.0" -n 1 -a sample 2>&1`
90 echo "$host_32_v2" >$seq.notrun
91 echo "$seq: [not run] `cat $seq.notrun`"
94 echo "host_32_v2 = $host_32_v2" >> $seq.full
95 host_32_v2_os
=`ssh -q pcpqa@$host_32_v2 uname -r`
97 host_64_v2
=`./getpmcdhosts -s $PCP_PLATFORM -b 64 -m "pmcd.version>2.0" -n 1 -a sample 2>&1`
99 echo "$host_64_v2" >$seq.notrun
100 echo "$seq: [not run] `cat $seq.notrun`"
103 echo "host_64_v2 = $host_64_v2" >> $seq.full
104 host_64_v2_os
=`ssh -q pcpqa@$host_64_v2 uname -r`
106 # make sure it's got the metrics we want for torture_api
107 _check_metric sample.seconds
$hosts_32_v2
108 _check_metric sampledso.sysinfo
$hosts_32_v2
109 _check_metric sample.seconds
$hosts_64_v2
110 _check_metric sampledso.sysinfo
$hosts_64_v2
112 # uses libpcp2 and local PMNS
115 # uses libpcp2 and possibly distributed PMNS