Here's a mod to "/etc/init.d/cgminer" which will allow you to turn on/off load balance with quota using the web interface while still allowing default failover mode.
With this mod, you can still use the web interface to configure the mining pool as normal, using the default failover mode.
However, if enter in quota information for pool1 using web interface, like "65;stratum.mining.eligius.st:3334", then restart will automatically switch to load balance mode. Note: you need to enter quota info for pool2 or pool3 if not blank. For example:
65;stratum.mining.eligius.st:3334
35;pool2.xxx.com:3333
0;pool3.xxx.com:3333
In the above case, pool3 will only be used as failover.
To make the change, vi /etc/init.d/cgminer and search for:
if [ "$_pool1url" != "" -a "$_pool1user" != "" -a "$_pool1pw" != "" ]; t
POOL1="-o $_pool1url -O $_pool1user:$_pool1pw"
fi
if [ "$_pool2url" != "" -a "$_pool2user" != "" -a "$_pool2pw" != "" ]; t
POOL2="-o $_pool2url -O $_pool2user:$_pool2pw"
fi
if [ "$_pool3url" != "" -a "$_pool3user" != "" -a "$_pool3pw" != "" ]; t
POOL3="-o $_pool3url -O $_pool3user:$_pool3pw"
fi
Replace it with:
# RMC switch to load balance if quota is found on pool1
pool_switch="-o"
custom_option=
test_load_balance=`expr index "$_pool1url" ";"`
if [ "$test_load_balance" != 0 ]; then
pool_switch="-U"
custom_option="--load-balance"
fi
if [ "$_pool1url" != "" -a "$_pool1user" != "" -a "$_pool1pw" != "" ]; t
POOL1="$pool_switch $_pool1url -O $_pool1user:$_pool1pw"
fi
if [ "$_pool2url" != "" -a "$_pool2user" != "" -a "$_pool2pw" != "" ]; t
POOL2="$pool_switch $_pool2url -O $_pool2user:$_pool2pw"
fi
if [ "$_pool3url" != "" -a "$_pool3user" != "" -a "$_pool3pw" != "" ]; t
POOL3="$pool_switch $_pool3url -O $_pool3user:$_pool3pw"
fi
Finally, search for the line that starts with:
PARAMS="$AOPTIONS $POOL1 $POOL2 $POOL3 $_pb --api-listen
and add "$custom_option" into the line like below:
PARAMS="$AOPTIONS $POOL1 $POOL2 $POOL3 $_pb $custom_option --api-listen
Enjoy...
I'm having a hard time getting this to work. I followed giletto's instructions, and did end up getting balance mining to work between multiple mining pools but I would like to have the increased control that adding quotas provides. I have tried leaving the "balance" mod in place while adding n4spd mod...didn't work. I also removed the "balance" mod and then tried this "quota" mod...again no luck. Any idea, or does someone have a link to the entire instructions starting from stock? Thanks in advance for any help provided.