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
36 echo FIXME llmountcleanup should be replaced with $CLEANUP
41 BUSY=`dmesg | grep -i destruct`
44 mv $TMP/debug $TMP/debug-busy.`date +%s`
47 LEAK_LUSTRE=`dmesg | tail -n 30 | grep "obd mem.*leaked"`
48 LEAK_PORTALS=`dmesg | tail -n 20 | grep "Portals memory leaked"`
49 if [ "$LEAK_LUSTRE" -o "$LEAK_PORTALS" ]; then
50 echo "$LEAK_LUSTRE" 1>&2
51 echo "$LEAK_PORTALS" 1>&2
52 mv $TMP/debug $TMP/debug-leak.`date +%s`
53 echo "Memory leaks detected"
56 lsmod | grep lnet && echo "modules still loaded" && exit 1