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"
32 [ "$MOUNT2" ] && umount $MOUNT2
34 ${LCONF} $NOMOD $portals_opt $lustre_opt $node_opt --cleanup $@ \
35 --dump $TMP/debug $conf_opt
38 BUSY=`dmesg | grep -i destruct`
41 mv $TMP/debug $TMP/debug-busy.`date +%s`
44 LEAK_LUSTRE=`dmesg | tail -n 30 | grep "obd mem.*leaked"`
45 LEAK_PORTALS=`dmesg | tail -n 20 | grep "Portals memory leaked"`
46 if [ "$LEAK_LUSTRE" -o "$LEAK_PORTALS" ]; then
47 echo "$LEAK_LUSTRE" 1>&2
48 echo "$LEAK_PORTALS" 1>&2
49 mv $TMP/debug $TMP/debug-leak.`date +%s`
52 lsmod | grep portals && echo "modules still loaded" && exit 1