3 # Check pmlc "query" command against the primary pmlogger
5 # Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved.
9 echo "QA output created by $seq"
11 # get standard filters
18 # ... already using all instances ... line comes from dynamic PMNS
19 # support where sample.secret.foo.bar.max.redirect and
20 # sampledso.secret.foo.bar.max.redirect are aliases (i.e. have the
21 # same PMID) for pmcd.agent.status ... so the Warning is expected
23 echo "Checking for errors in $1 ..."
25 -e '/Warning: already using all instances for pmcd.agent.status/d' \
28 -e '/^network[^:]*$/d' \
29 -e '/^kernel[^:]*$/d' \
31 -e '/^sample[^:]*$/d' \
32 -e '/^sampledso[^:]*$/d' \
37 -e '/^ (no instances)/d' \
40 |
sed -e '/^[0-9][0-9]*$/s//line &:/'
43 trap "rm -f $tmp.*; exit" 0 1 2 3 15
45 # real QA test starts here
46 pmlc
<<End-of-File >$seq.full 2>&1
48 query { disk network kernel pmcd sample sampledso }
51 $PCP_ECHO_PROG $PCP_ECHO_N "Expect at least one metric with logging state \"on\" ...""$PCP_ECHO_C"
52 if egrep '^ (mand on )|(adv on )' $seq.full
>/dev
/null
59 $PCP_ECHO_PROG $PCP_ECHO_N "Expect at least 250 metrics to be reported ...""$PCP_ECHO_C"
60 num
=`egrep '^(disk|network|kernel|pmcd|sample|sampledso)\.' $seq.full | wc -l | sed -e 's/ //g'`
65 echo " FAIL (found $num)"