On Wednesday 27 June 2007 15:52:02 Paul Veldema wrote: <snip> > mysql_startup_timeout() { > memtotal="`cat /proc/meminfo | grep MemTotal | cut -d ':' -f 2 | > sed 's/ //g' | cut -d 'k' -f 1`" > # round memory royally upward for calc in gigabytes. > memtotal=`expr $memtotal + 700000` > timeout=`expr $memtotal / $MEMORY_ALLOCATION_PER_SEC_IN_KB` > timeout=`expr $timeout + $TIMEOUT_OFFSET` > if test $timeout -gt 14; then > echo $timeout > else > echo 14 > fi > }
neat! two comments: - /proc/meminfo is linux specific and less general. perhaps you could write something with "free" or some other generic utility instead? - your suggestion isn't mutually exclusive from the previous one i made. it could be made optional to specify a timeout value, and if not specified, use the heuristic you provide, which would be the default. but in any event, i think it's a great idea. monty: you think this is something mysql.com would be interested in? sean
signature.asc
Description: This is a digitally signed message part.