Author

Topic: Batch file for mining (Read 3471 times)

sr. member
Activity: 252
Merit: 250
February 08, 2014, 06:13:31 AM
#4
Hi,

Thank for the feedback. With load balance and a number of miners (more than 10), 24 hrs of mining on ghash.io gave 50% duplicates. The equipment keeps jumping from one pool to another. It did not work for me...

More precisely, the way i used --load-balance was by downloading Multiminer's source code from github and making some tweaks. That said, it relies on how the parameter was implemented in the software, I have not tested it myself directly in command line, just relied on feedback from the experience. I might give it a try but atm it feels better to have 100% all in one lump on one load.

It's really a matter of personal decision, consider the two positions:
One: i have a couple of USB miners not using anymore, I'm running them solo mining bitcoin, who knows, I might get lucky, I know the odds are probably I will find it in 800 days, and that is assuming the difficulty does not increase in 800 days, but it is better than having them making cents on cex.io.

Two: if the odds are too low to win, then it is better to have them making cents on cex.io (no ad intended) rather than making nothing in solo.

So the idea is, even if --load-balance was to work properly, some might not think it is an option to trickle on it, full 100% hopping might be to their liking, not that one way or the other is guaranteed to make more money Smiley


Steer clear of ghash.io it is not your friend

Research the difference between luck and variance

Happy mining  Smiley

full member
Activity: 223
Merit: 116
February 08, 2014, 04:58:29 AM
#3
Hi,

Thank for the feedback. With load balance and a number of miners (more than 10), 24 hrs of mining on ghash.io gave 50% duplicates. The equipment keeps jumping from one pool to another. It did not work for me...

More precisely, the way i used --load-balance was by downloading Multiminer's source code from github and making some tweaks. That said, it relies on how the parameter was implemented in the software, I have not tested it myself directly in command line, just relied on feedback from the experience. I might give it a try but atm it feels better to have 100% all in one lump on one load.

It's really a matter of personal decision, consider the two positions:
One: i have a couple of USB miners not using anymore, I'm running them solo mining bitcoin, who knows, I might get lucky, I know the odds are probably I will find it in 800 days, and that is assuming the difficulty does not increase in 800 days, but it is better than having them making cents on cex.io.

Two: if the odds are too low to win, then it is better to have them making cents on cex.io (no ad intended) rather than making nothing in solo.

So the idea is, even if --load-balance was to work properly, some might not think it is an option to trickle on it, full 100% hopping might be to their liking, not that one way or the other is guaranteed to make more money Smiley
sr. member
Activity: 252
Merit: 250
February 08, 2014, 04:39:31 AM
#2
Hi,

This is a method to do mine hopping the way you want on Windows (tested on Windows 7 and above).

The question is: i want to mine on pool x for so much time, solo for this much, on pool y for some other time and then cycle again.
...

Why,

Just use --load-balance and feed both pools simultaneously, you can even change the balance between the pools so one receives more shares than the other.
full member
Activity: 223
Merit: 116
February 08, 2014, 04:19:14 AM
#1
Hi,

This is a method to do mine hopping the way you want on Windows (tested on Windows 7 and above).

The question is: i want to mine on pool x for so much time, solo for this much, on pool y for some other time and then cycle again.

There problem is evident if you have only 1 hardware device, but if you have more than one device you can use Multiminer to tell each device what to mine. This kind of gives half a solution, because if you have a 10 GHs unit and a 100 GHs, you cannot split it 50-50. Also, some might say that running one device for a long period of time is/isn't equivalent to running one faster device for a shorter period of time, so the total number of lotto tickets is the same, as with time the later tickets might have less chance (point of view).

Anyway, here is the code:
1. Download cgminer and put it in a folder of its own, say "cgminer-3.12.2"
2. Create a batch file inside that folder, call it whatever.bat (.bat makes it an executable batch file)
3. Put the code below in the file (please read it as you need to personalize it to your data)

Code:
:while1
start cgminer.exe -o 127.0.0.1:nnn -u username -p password
timeout /t 120 /nobreak
taskkill /im cgminer.exe /f /s localhost /u yourwindowsusermae /p yourwindows password
timeout /t 60 /nobreak

start cgminer.exe -o uk1.ghash.io:3333 -u username.workername -p password
timeout /t 120 /nobreak
taskkill /im cgminer.exe /f /s localhost /u yourwindowsusermae /p yourwindows password
timeout /t 60 /nobreak

goto :while1


Comments:
1. The while1 label and the goto at the end are meant to create an infinite loop to cycle over and over again
2. The line after :while1 is:

Code:
start cgminer.exe -o 127.0.0.1:nnn -u username -p password

this is for solo mining; you start your Qt client  (bitcoin, 21coin whatever) and you make sure the information in the bitcoin.conf file or whatever conf file is in your roaming profile for that client has:
a. server =1
b. the same port for RPC as the number nnn in the command line
c. the same username and password for that client as you would have manually modified when you downloaded the client (nobody should leave the default username=username and password=password)

now the reason this command has the word start in the beginning is because we want cgminer to start in a new window by itself, so we can shut it down. Without the start command, the batch file will come into cgminer and wait for it to end (you will have to manually press q in cgminer), not exactly what we want.

3. the 3rd line this the timeout for the above mining command. What it says is wait 120 seconds before continuing. Now spending 120 seconds mining is not a great deal on a pool. You need to say a while to help them find the block and to build up something significant, so after you test this change this number to for example 3600 on your solo mining, 15000 on your favorite pool, 3600 on your second favorite, 3600 on your other solo etc.

4. the fourth line is the taskkill command which will terminate cgminer. For it to work, windows will need to know that you have authority to kill the process by putting your windows username and password in the command line.

5. After that you wait a minute for the miner to cool down and any communications to have lapsed.

6. Then put another set of commands. You will notice that only the first line changes, with the new parameters you give to cgminer for the new pool, then the remaining lines are the same: allow it to run for the time you like in the pool, then kill it, then wait a minute before starting again.

This way you do not miss out on PPSLN in your favorite pool while you can still try your luck with solo mining and make some quick cash with instant gratification pools like cex.io

Good luck and if this helped you and feel like tipping wallet addresses below and thanks in advance Smiley
BTC: 1HZCNwE8rA7DCYj7TALhJxR1iXYAPSMnUL
LTC: LR9RVmKnUQZMXZFoqLavBTRqAvqWbwz8i9
Jump to: