3 # pmlogger would die with horrible errors when diagnostics enabled, due
4 # to early timer events
6 # Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved.
10 echo "QA output created by $seq"
12 # get standard filters
18 _filter_dumpresult |
sed \
20 s;inst \[[0-9][0-9]* or ".*/dbs/.*\.dbf"];inst [FILE];
25 trap "rm -f $tmp.*; exit" 0 1 2 3 15
27 # real QA test starts here
28 $sudo rm -f $tmp.
* $seq.full
29 cat <<End-of-File >$tmp.config
30 log mandatory on 1 sec {
58 disk.all.avg_disk.active
59 disk.all.avg_disk.response
65 kernel.all.cpu.wait.total
66 kernel.all.cpu.wait.gfxc
67 kernel.all.cpu.wait.gfxf
68 kernel.all.cpu.wait.io
69 kernel.all.cpu.wait.pio
70 kernel.all.cpu.wait.swap
81 kernel.all.swap.swpocc
82 kernel.all.swap.swpque
95 kernel.all.tty.recvintr
96 kernel.all.tty.xmitintr
97 kernel.all.tty.mdmintr
102 kernel.all.intr.non_vme
105 kernel.all.pty.masterch
106 kernel.all.pty.slavech
107 kernel.all.flock.alloc
108 kernel.all.flock.inuse
119 # -D 511 is all of the PMAPI debug flags, excluding PM_TRACE_AF (the
120 # latter is non-deterministic, unfortunately)
121 pmlogger
-D 511 -c $tmp.config
-s 2 -l $tmp.log
$tmp >$tmp.out
2>&1 &
126 if [ "`echo core*`" != "core*" ]
128 echo "Arrgh ... pmlogger dumped core?"
132 echo "OK, pmlogger survived"
135 # The traces and the list of metrics depend on which operating
136 # system you're running on. There is no real point in generating all
137 # this output (filtered diagnostics and verbose pmdumplog) because
138 # I expect to be different.
141 # Simple sanity check on the number of pmResults in the archive ...
144 echo "count records in archive (expect 1 for preamble + 2) ..."
145 pmdumplog
$tmp 2>&1 \
148 |
sed -n -e '/TIMESTAMP/s/STAMP.*/STAMP/p'
150 # and truncate the test here!
154 # enable this to see what is really happening!
155 echo "=== out ===" >038.full
156 cat $tmp.out
>>038.full
158 echo "=== log ===" >>038.full
159 cat $tmp.log
>>038.full
161 # may need this yet...
163 # filter output and sum by diagnostic type
164 cat $tmp.out
$tmp.log \
167 -e 's/Log f.*/Log/g' \
168 -e 's/searchindom/__localLogGetInDom/g' \
169 | _filter_dumpresult \
171 -e 's/^\[[0-9][0-9]*]//' \
172 -e '/^[0-9][0-9][0-9]:/d' \
174 -e 's/After loading config/After_loading_config/' \
175 -e 's/Dump Contexts/Dump_Contexts/' \
176 -e 's/Dump Instance Profile/Dump_Instance_Profile/' \
177 -e 's/Dump optfetch/Dump_optfetch/' \
178 -e 's/free pdubuf/free_pdubuf/' \
179 -e '/__pmDecodeXtendError/d' \
180 -e '/__pmFdLookupIPC/d' \
183 # now, what is in the log? ...
184 pmdumplog
$tmp 2>&1 \
187 -e "/\"$logger_pid\"/s/$logger_pid/LOGGER_PID/g" \
188 -e '/pmcd.pmlogger.port/s/value .*/value PORT/' \
189 -e '/pmcd.pmlogger.host/s/value ".*/value "HOST"/' \