Hey everyone! This post is my version of how to adjust the fan speed and frequency of your Antminers on a schedule.
Thanks to
https://bitcointalksearch.org/user/bittalc1-397375 bittalc1 for the work he did that allowed me to take a similar approach.
As a matter of fact, my method is almost exactly the same, but I wanted to go more in depth so some people without the technical know-how can recreate it for themselves.
Disclaimer: I'm not responsible if you somehow manage to brick your miner.
You will need to have the following programs installed on a Windows machine to do this. It's also possible on Linux but I will not be covering that in this post.
- PuTTY, a command-line telnet and ssh client.
- PSCP, a secure-command line file copy program for PuTTY
- Plink, Command-line interface for PuTTY
- Windows Task Scheduler
- WinSCP
- Notepad++ (recommended)
All of the PuTTY clients can be downloaded here:
http://www.chiark.greenend.org.uk/~sgtatham/putty/download.htmlI will not be registering the PATH variables in this post, so if you don't know what I'm talking about here, don't worry about it. Just drop plink.exe and PSCP.exe into your PuTTY folder under Program Files(x86).
Begin by downloading the original config files for your miner to a safe location. I chose to download them to my desktop, where I would then copy the files to a folder named "ORIGINAL CONFIGS".
Run this in CMD:
"C:\Program Files (x86)\PuTTY\pscp.exe" -scp -pw admin
[email protected]:/etc/init.d/cgminer.sh "C:\Users\USER_NAME\Desktop\cgminer."
Obviously, change your file paths and IP address. This will work assuming you didn't change your root password.
That will download the config file from your miner to your desktop. It will be named cgminer and may not have an extension. I have found that the period at the end of the file-path is important or PSCP will throw a "cannot create file error"
Once you have your file, put it in a safe place. You may need to come back to it if you make a mistake.
Create some separate folders for the files, make a folder for each frequency setting and or fan speed you would like. You can make infinite configs. Just be aware that you will have to modify your batch script to match your configuration.
I made the following folders:
antminer_slow
antminer_mid
antminer_fast
Each folder contains my config file that I modified for each. We will now learn how to mod our configs to our liking.
Your cgminer.conf file should look something like this:
{
"pools" : [
{
"url" : "POOL_URL",
"user" : "WORKER1",
"pass" : "123"
},
{
"url" : "POOL_URL",
"user" : "WORKER1",
"pass" : "123"
},
{
"url" : "POOL_URL",
"user" : "worker1",
"pass" : "123"
}
]
,
"api-listen" : true,
"api-network" : true,
"api-groups" : "A:stats:pools:devs:summary:version",
"api-allow" : "A:0/0,W:*",
"bitmain-fan-ctrl" : true,
"bitmain-fan-pwm" : "90",
"bitmain-use-vil" : true,
"bitmain-freq" : "700",
"bitmain-voltage" : "0706"
}
The values we're worried about are "bitmain-fan-ctrl", "bitmain-fan-pwm", and "bitmain-freq" Don't modify any other parameters unless you know what you're doing.
"bitmain-fan-ctrl" is the parameter that determines whether or not your fans are controlled automatically or manually. Usually manual (true) is the best for our purposes.
"bitmain-fan-pwm" is the parameter that determines your fan speed on a percent scale. 2 is 2% and 90 is 90% with a max of 100.
"bitmain-freq" is the parameter that determines your ASIC chip's operating speed. Take note of your max and min values in the GUI web interface. Don't exceed your max value unless you have adequate cooling and voltages for your chips. Overclocking can be very dangerous to your miner.
In my setup, I have my antminer_slow file set with fan speed 15%, and frequency 100. This runs at absolute minimum and the fan speed is audible but not disrupting.
Once you have your config, save it as cgminer.conf in your folder of choice. In my case, it's saved in "antminer_slow".
Now you are almost ready to upload your files. First, we need a file called "commands.txt" create it in your folder root and put this command at the top line:
/etc/init.d/cgminer.sh restart
That will restart your miner after we upload the config files. Doing such is necessary to make them active. Otherwise, your miner will not change until you reboot manually or it gets a power failure.
Make yourself a .bat file in the root of your antminer files directory. Call it "slow.bat" for this case.
Place the following code into the file and save.
@echo Slowing down antminer to Frequency 100 with Fan Speed 15%
@echo Uploading cgminer.sh....
"C:\Program Files (x86)\PuTTY\pscp.exe" -scp -pw admin "C:\Users\USER_NAME\Desktop\ANTMINER_FOLDER\antminer_slow\cgminer.sh"
[email protected]:/etc/init.d/cgminer.sh
@echo Uploading cgminer.conf...
@echo Uploads complete! Rebooting now...
"C:\Program Files (x86)\PuTTY\plink.exe"
[email protected] -pw admin -batch -m commands.txt
Do a test run of that batch file and see if it works. The command prompt should clearly show when an upload is successful and you should hear your miner reboot upon completion. If not put a "PAUSE" command at the end of the batch file to let it stay open so you can read the errors.
You can easily scale this file for as many miners as you have. Just duplicate the PSCP and PLINK lines for each and modify the IP addresses for each. You can put them all in the same .bat file.
Assuming that worked, we can now make our scheduled tasks. Open up Task Scheduler and create a new basic task. Set your name, description, trigger to a date and time. Set your action to start a program, and select your .bat file. If you want, you can even make tasks wake the PC when they run, so you don't need to have a constantly running desktop to perform them.
It's that simple! Now your miner(s) will automatically change speeds based on a timeframe that you set! This is great for miners who have cheap electricity during nighttime hours or want their miner to be quiet when they're home.
Let me know if any parts of this don't make sense or if you need help.
Thanks for reading and another huge thanks to bittalc1 for discovering this method!