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 [ "$1" = "--force" ]; then
24 if [ "$LDAPURL" ]; then
25 conf_opt="--ldapurl $LDAPURL --config $NAME"
27 if [ ! -f $config -o $mkconfig -nt $config ]; then
28 sh $mkconfig $config || exit 1
33 [ "$NODE" ] && node_opt="--node $NODE"
36 ${LCONF} $portals_opt $lustre_opt $node_opt --cleanup $force \
37 --dump $TMP/debug $conf_opt
39 BUSY=`dmesg | grep -i destruct`
42 mv $TMP/debug $TMP/debug-busy.`date +%s`
45 LEAK_LUSTRE=`dmesg | grep "obd mem.*leaked" | tail -1 | grep -v "leaked: 0"`
46 LEAK_PORTALS=`dmesg | tail -20 | grep "Portals memory leaked"`
47 if [ "$LEAK_LUSTRE" -o "$LEAK_PORTALS" ]; then
48 echo "$LEAK_LUSTRE" 1>&2
49 echo "$LEAK_PORTALS" 1>&2
50 mv $TMP/debug $TMP/debug-leak.`date +%s`