Shell script for Antminer S5 temperature regulation

Hi! In these hot summer days I’ve been working on a small shell script for (basic) temperature regulation of my Bitmain Antminer S5. Yes, for Antminer S5 ONLY.

In order to share this with others (and also as a personal reminder), you’ll find below the technical notes on this work.

NB: Although I don’t think there is any problem involved with using this script, it’s all at your own risk!

What you need to install the script:
– First download regul.sh and freqList from the github repository
– Find the miner’s ip address
Putty for ssh connection with the miner
Winscp for file transfer to the miner

Installation:
1) Copy the files to the miner with Winscp:
– Choose « SCP » File protocol.
– You’ll need login and password: root / admin by default.
– Transfer regul.sh and freqList to /etc/init.d

2) SSH connection to the miner:
– Use Putty to connect to the miner (port 22). – You’ll need login and password: root / admin by default.
– To launch the script, type: nohup sh /etc/init.d/regul.sh&
– The script will keep working after you close Putty.

What does the script:
Every 20 minutes, the script checks the current temperature T.
If T>TMAX: the frequency is reduced by 25MHz and the cgminer is restarted
If T<TMIN: the frequency is increased by 25MHz and the cgminer is restarted

The temperature taken into account is the max of the two values returned by the built-in sensors.

You can modify TMIN and TMAX at your will, by I recommend that you keep at least a 3-degree spread between the two temp for smooth regulation.
You can also tweak:
REFRESH_TIMER to change the time interval between two frequency adjustments, but I think 20 minutes is fine.
FREQ_STEP to define the frequency step at each regulation loop. The frequency step in MHz is given by 6.25*FREQ_STEP. By default it is set at FREQ_STEP=4, so that’s a 6.25*4=25MHz frequency increase of decrease at each loop.

To stop the script:
– type: ps and find the PID associated with the script
– type: kill PID


Please note that when you power off the miner, the script will be erased
and you’ll have to re-install it. I know it’s tedious but I haven’t figured a way around (yet).

You can access the temp regulation log by typing: vi /etc/init.d/nohup.out

Tip jar: 14kqJWcAQo9WYYJ71Xj7CECgitMNzxUBRj

2 commentaires

  1. I like the idea of the script a lot, and I have a great application for it, but….

    1) Having to reload the script each power cycle means if the rig stops for whatever reason and needs rebooted, someone must add this script back in to have the feature.

    2) Ideally, this ‘Temp step’ script could be paired with a hashing monitor (they’re out there), which could sense when one or more blades is not hashing, and reboot.

    3) While dreaming, put all that together in an image with included Xtranonce (such as provided on Nicehash’s support pages), but with the latest and greatest version miner software.

    I know, it’s too much to hope for. An S5 Antminer that could auto-adjust for heat (user optional), auto-restart when napping (user optional), and use Xtranonce (user optional), all settable for automatic operation. But if I don’t say the idea, it’ll surely not happen, so now I’ve said it.

    J’aime

Laisser un commentaire