3 export PATH=`dirname $0`/../utils:$PATH
12 if [ "$PORTALS" ]; then
13 portals_opt="--portals=$PORTALS"
16 if [ "$LUSTRE" ]; then
17 lustre_opt="--lustre=$LUSTRE"
20 if [ "$LDAPURL" ]; then
21 conf_opt="--ldapurl $LDAPURL --config $NAME"
23 if [ ! -f $config ]; then
24 sh $mkconfig $config || exit 1
29 [ "$NODE" ] && node_opt="--node $NODE"
31 [ "$MOUNT2" ] && umount $MOUNT2
33 ${LCONF} $NOMOD $portals_opt $lustre_opt $node_opt --cleanup $@ \
34 --dump $TMP/debug $conf_opt
37 BUSY=`dmesg | grep -i destruct`
40 mv $TMP/debug $TMP/debug-busy.`date +%s`
43 LEAK_LUSTRE=`dmesg | tail -n 30 | grep "obd mem.*leaked"`
44 LEAK_PORTALS=`dmesg | tail -n 20 | grep "Portals memory leaked"`
45 if [ "$LEAK_LUSTRE" -o "$LEAK_PORTALS" ]; then
46 echo "$LEAK_LUSTRE" 1>&2
47 echo "$LEAK_PORTALS" 1>&2
48 mv $TMP/debug $TMP/debug-leak.`date +%s`
51 lsmod | grep portals && echo "modules still loaded" && exit 1