Commit da2acc20 authored by Mike Hibler's avatar Mike Hibler
Browse files

Use sysctl rather than dmesg to get available memory.

We have seen cases where dmesg has info from multiple boots and sometime
even garbage.
parent 7e7b3034
......@@ -66,7 +66,8 @@ fi
# split remaining memory (at least 2MB) between network/disk buffering
# in frisbee
#
HOSTMEM=`dmesg | grep 'avail memory' | sed -e 's/.* (\([0-9]*\)K bytes.*/\1/'`
HOSTMEM=`sysctl -n hw.usermem`
HOSTMEM=`expr $HOSTMEM / 1024`
if [ $HOSTMEM -ge 26624 ]; then
HOSTMEM=`expr $HOSTMEM - 24576`
ulimit -v $HOSTMEM
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment