> -----Original Message-----
> From: Nathan Scott [mailto:nathans@xxxxxxxxxx]
> Sent: Tuesday, 15 April 2014 3:40 PM
> ...
> OK. It sounds possible that "kill -9" on an active logger, followed by
> replay/logcheck may be able to induce the failures of the current code, and
> demonstrate quantifiable improvements. Maybe not reliable failure cases,
> but with sufficient iterations/entropy/gamma-rays, we should be able to
> build confidence in any changes.
The script below produces 100% failures with the older pmlogger and libpcp, and
100% passes (no "corrupt" archives) with the newer bits where pmlogger writes
unbuffered and one write per pmResult.
Mark this one as "done", Ma ... 8^)>
#!/bin/sh
#
. /etc/pcp.env
#tmp=/var/tmp/$$
#trap "rm -f $tmp.*; exit 0" 0 1 2 3
tmp=tmp
rm -f $tmp.*
cat <<End-of-File >$tmp.config
log mandatory on default {
sample.colour
}
End-of-File
nfail=0
for i in 1 2 3 4 5 6 7 8 9 10
do
rm -f $tmp.0 $tmp.meta $tmp.index
pmlogger -c $tmp.config -l $tmp.log -t 10msec -s 10000 -r $tmp 2>&1 &
sleep 3
kill -KILL $!
wait
if pmlogcheck $tmp
then
echo OK
else
nfail=`expr $nfail + 1`
fi
done
echo
echo "Failed $nfail of 10 attempts."
|