Just add CTDB_VALGRIND=yes in /etc/sysconfig/ctdb, and look at the
logs in /var/log/ctdb_valgrind.*
CTDB_OPTIONS="$CTDB_OPTIONS --no-lmaster"
}
-if [ -x /sbin/startproc ]; then
+if [ "$CTDB_VALGRIND" = "yes" ]; then
+ init_style="valgrind"
+else if [ -x /sbin/startproc ]; then
init_style="suse"
else if [ -x /sbin/start-stop-daemon ]; then
init_style="ubuntu"
init_style="redhat"
fi
fi
+fi
start() {
killall -q ctdbd
done
case $init_style in
+ valgrind)
+ valgrind -q --log-file=/var/log/ctdb_valgrind /usr/sbin/ctdbd --nosetsched $CTDB_OPTIONS
+ RETVAL=0
+ ;;
suse)
startproc /usr/sbin/ctdbd $CTDB_OPTIONS
rc_status -v
ctdb shutdown
RETVAL=$?
count=0
+ if [ "$init_style" = "valgrind" ]; then
+ # very crude method
+ sleep 2
+ pkill -9 -f valgrind
+ fi
while killall -q -0 ctdbd; do
sleep 1
count=`expr $count + 1`