4 # #676245 - dynamic indoms for pmlogger, uses sample.dynamic.*
5 # Check that when the instance domain changes for logged metrics
6 # the new indom is only added once. The bug was for pmlogger
7 # adding the indom once for each metric using it.
9 # Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved.
11 # check-group-include: pmlogger
14 echo "QA output created by $seq"
16 # get standard environment, filters and checks
21 signal
=$PCP_BINADM_DIR/pmsignal
22 status
=1 # failure is the default!
23 control
=$PCP_PMDAS_DIR/sample
/dynamic.indom
31 if [ $logger_pid -gt 0 ]
33 $signal -s TERM
$logger_pid
39 [ -f $control.qa-
$seq ] && $sudo mv $control.qa-
$seq $control
43 $sudo rm -f $control.qa-
$seq
45 trap "_cleanup; exit \$status" 0 1 2 3 15
47 [ -f $control ] && $sudo mv $control $control.qa-
$seq
49 # real QA test starts here
53 cat >$tmp.logconf
<<End-of-File
54 log advisory on 2 sec {
59 $PMLOGGER -c $tmp.logconf
-l $tmp.log
$tmp.logfile
&
63 _filter_unwanted_indom
()
65 _filter_pmdumplog |
$PCP_AWK_PROG '
66 /^InDom: 2.1/ && step == 0 { step = 1; next }
67 step == 1 { step = 2; next }
68 step == 2 { step = 0; next }
75 pmdumplog
-i $tmp.logfile | _filter_unwanted_indom
82 # do the first instance dump
86 # Change the instances
88 cat >$tmp.indom
<<End-of-File
95 $sudo cp $tmp.indom
$control
97 # do the instance dump
103 cat >$tmp.indom
<<End-of-File
111 $sudo cp $tmp.indom
$control
113 # do the instance dump
119 cat >$tmp.indom
<<End-of-File
127 $sudo cp $tmp.indom
$control
129 # do the instance dump
133 # Remove some instances
135 cat >$tmp.indom
<<End-of-File
141 $sudo cp $tmp.indom
$control
143 # do the instance dump