Not logged in - Login / Register
View History

Howto: Automatically set the RAM limit depending on how much RAM is installed.

Note that this Howto is Linux specific, and does not have a Windows equivalent at this time

You can automatically configure McMyAdmin to use a given amount of RAM depending on the amount that is installed using the following bash script:

INSTALLED_RAM=$(dmidecode -t 17 | awk '( /Size/ && $2 ~ /^[0-9]+$/ ) { x+=$2 }END{ print x }') 

su USERNAME -c cd ~/McMyAdmin; ./MCMA2_Linux_x86_64 +Java.Memory $USE_RAM

Where SYSTEM_OVERHEAD is how much RAM you want to leave spare for the OS and background services. For example a value of 256 means that on a server with 1GB RAM, 768MB will be used as the Java maximum heap size.

This script should be run as a root user (as root is required to use dmidecode), and "USERNAME" substituted with the name of the restricted user used to run McMyAdmin.