3 # pmlc parser/scanner/error handling
5 # Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved.
9 echo "QA output created by $seq"
11 # get standard filters
18 _restore_config
$PCP_SYSCONFIG_DIR/pmcd
19 _restore_primary_logger
20 $sudo $PCP_RC_DIR/pcp restart | _filter_pcp_start
23 $sudo rm -f $tmp $tmp.
*
29 trap "_cleanup" 0 1 2 3 15
33 # error message mapping is due to differences between PCP_PLATFORMs
36 -e 's/connect [0-9][0-9]*/connect PID/' \
37 -e 's/Version [0-9].*/Version VERSION/' \
38 -e 's/^parse error/Syntax error/' \
39 -e 's/line [0-9]*/line NUM/g' \
40 -e 's/^syntax error/Syntax error/' \
41 -e 's/^Reason: Unknown or illegal.*$/Reason: No PMCD agent for domain of request/'
44 _disable_agent_restart
()
46 echo PMCD_RESTART_AGENTS
=0 > $tmp.defaults
47 $sudo cp $tmp.defaults
$PCP_SYSCONFIG_DIR/pmcd
50 signal
=$PCP_BINADM_DIR/pmsignal
52 # real QA test starts here
53 _save_config
$PCP_SYSCONFIG_DIR/pmcd
54 _writable_primary_logger
55 _disable_agent_restart
56 ls -l $PCP_VAR_DIR/config
/pmlogger
/config.default
>>$seq.full
57 cat $PCP_VAR_DIR/config
/pmlogger
/config.default
>>$seq.full
58 pmlc
-P </dev
/null
2>&1 >>$seq.full
59 $sudo $PCP_RC_DIR/pcp restart | _filter_pcp_start
63 pmlc
-ie <<End-of-File >$tmp.out 2>$tmp.err
66 advisory on 1 hour sample.drift
69 # incomplete - syntax error
75 # next } -- curly brace
79 # suck to } ... not that one, this one ..
83 _filter_pmlc
<$tmp.err
84 _filter_pmlc
<$tmp.out
86 for delta
in "-1 msec" "75 hours" "599 hours" "1200 hours"
89 cat <<End-of-File >$tmp.config
90 log advisory on $delta sample.bin [100]
92 # pmlogger -c $tmp.config -T 4 $tmp
94 _start_up_pmlogger
-L -c /dev
/null
-l $tmp.log
-T 4 $tmp
96 pmlc
-ie <<End-of-File >$tmp.out 2>$tmp.err
98 log advisory on $delta sample.bin [100]
100 _filter_pmlc
<$tmp.err
101 _filter_pmlc
<$tmp.out
102 $sudo $signal -s TERM
$pid
103 _wait_pmlogger_end
$pid
104 _filter_pmlogger_log
<$tmp.log
108 pmlc
-ie <<End-of-File >$tmp.out 2>$tmp.err
110 log mandatory on 1 hour { sample.bin, sample.drift, sample.seconds }
111 query sample.bin[333]
113 _filter_pmlc
<$tmp.err
114 _filter_pmlc
<$tmp.out
116 $sudo $signal -a pmdasample
117 pmsleep
0.5 # time to cleanup
118 pminfo
-f sample
>/dev
/null
2>&1 # and make sure pmcd notices
120 pmlc
-ie <<End-of-File >$tmp.out 2>$tmp.err
122 query sample.bin[100]
123 query sample.bin[100]
125 _filter_pmlc
<$tmp.err
126 _filter_pmlc
<$tmp.out
128 $sudo $signal -a -s HUP pmcd
129 pmsleep
0.5 # time to cleanup
130 pmlc
-ie <<End-of-File >$tmp.out 2>$tmp.err
132 query sample.bin[100]
134 query { sample.bin,sample.drift sample.seconds }
135 query { sample.bin sample.drift,sample.seconds }
136 query sample.bin [100,200,300 400 500,700]
137 query sample.bin [100,"bin-200"]
139 _filter_pmlc
<$tmp.err
140 _filter_pmlc
<$tmp.out
142 pmlc
-ie <<End-of-File >$tmp.out 2>$tmp.err
144 log mandatory maybe {
146 sample.drift, sample.seconds
149 _filter_pmlc
<$tmp.err
150 _filter_pmlc
<$tmp.out