Author

Topic: On-board auto reboot with Antminer S9 (daily reboots) (Read 617 times)

newbie
Activity: 7
Merit: 0
Note:  I'm working on resolving a script that reboots when hashrate is lower than 10 TH/s or the miner stops reporting hashrates.

Here is a script that reboots bitmain s9 miners every 2 hours.  

1. Create a file names S80autorestartbmminer.sh
2. Copy paste the code below.
3. Make it executable with chmod +x S80autorestartbmminer.sh
4. Copy the S80autorestartbmminer.sh file to your s9 with scp or sftp (ssh) into /etc/rcS.d/

If you use windows, you may need to run this command on the s9 while logged in as root via ssh:  
chmod +x /etc/rcS.d/S80autorestartbmminer.sh

There are no additional requirements.

Code:
#!/bin/sh
sleep 7200
reboot

Donate BTC for this script if you like it:  1CtQg2h6KE7Z8oppYsBgACisoC4YJA5sAB
full member
Activity: 294
Merit: 129
Another option is to run a raspberry Pi and use scripting to do it. Ansible works great for something like this, you can just pass raw SSH commands directly to each unit to reboot it
sr. member
Activity: 463
Merit: 309
This isn't functional on the S9 at least without some additional setup, hence the process I went through. (i.e., running crontab itself threw an error and i was too lazy to diagnose it)

Yeah you're right. I did some checking and did locate a cron file that the S9 uses to sync the time, but I wasn't able to get it working with the reboots.
member
Activity: 124
Merit: 47
Are you running the most current firmware for your miners?

I have an S9 that I bought back last November (I think) and was having trouble with it needing a reboot every day or two, but after upgrading to the latest firmware earlier this year - that has stopped. It still seems like I need to reboot them every couple of weeks now, but much better than before.

I know this isn't the solution you are asking for, but could you put in a RaspberryPi in the network there to run these scheduled reboots - not a full-scale desktop/laptop system - small and cheap. Just a thought if the firmware is not a viable solution.
newbie
Activity: 6
Merit: 7
[...]

This isn't functional on the S9 at least without some additional setup, hence the process I went through. (i.e., running crontab itself threw an error and i was too lazy to diagnose it)

Never heard if there is a way to make s9 miner to setup it on daily reboot on-board but I think you can use awesome miner to schedule s9 to reboot it daily.

This defeats the purpose of doing it without having any external software / computers running, although is certainly a valid solution for many.
sr. member
Activity: 463
Merit: 309
If you just want to restart the mining process, I haven't checked on the S9 but I know older units have a cron tab, this command was used to restart cgminer every 12 hours.

Code:
0 */12  *   *   *     /etc/init.d/cgminer restart

A few edits would be to change cgminer to bmminer as they now go on bmminer instead of cgminer, and to change /12 to /24.

Code:
0 */24  *   *   *     /etc/init.d/bmminer restart

I'm not entirely sure if the command is correct for every 24 hours but I do know the 12 hour one worked. If there is no crontab in the ui, their is a cron file somewhere on the system, add the line to that and it should work.
legendary
Activity: 3472
Merit: 3217
Playbet.io - Crypto Casino and Sportsbook
Never heard if there is a way to make s9 miner to setup it on daily reboot on-board but I think you can use awesome miner to schedule s9 to reboot it daily.

Here is their official thread https://bitcointalksearch.org/topic/awesome-miner-powerful-windows-gui-to-manage-and-monitor-up-to-200000-miners-676942

I also found this thread https://bitcointalksearch.org/topic/minera-v090-your-next-mining-dashboard-s9l3d3cpuminercgminerbfgminer-596620
And it has also feature to schedule auto reboot or restart your miner.
newbie
Activity: 6
Merit: 7
I've struggled a long time with Antminers that work for a few days and then eventually need a reboot. Since I keep my miners away from home, this has been a hassle. Additionally, the environment I keep them in doesn't have much in terms of remote access or other running machines on the network that I can schedule reboots on.

Articles like https://blockoperations.com/make-antminer-s9-reboot-every-30-minutes/ detail consistent reboot schedules, utilizing separate computers to run cron jobs on. For an onboard solution, I've been doing this though:

Code:
#ssh onto the device
> ssh [email protected]
#modify the bmminer’s daemon file to include a reboot
>vi /etc/init.d/bmminer.sh #(@ line 44)

killall -9 bmminer || true
/sbin/shutdown -r -f +1440 “daily reboot” & #add this line in -- 1440 is 1440 min per reboot (1day)
/usr/bin/bmminer –fixed-freq –no-pre-heat –version-file /usr/bin/compile_time –api-listen –default-config /config/bmminer.conf &

#save file w/ escape + wq

at next reboot, the miner will automatically schedule a reboot after 1440 minutes before it begins to mine.
i’ve just started doing this on my miners and see no ill effects on S9s running firmware from 2017050318838 (Antminer-S9-all-201705031838-650M-user-Update2UBI-NF.tar.gz)

i might be way off base about how to properly do this, but i couldn't find anything about a decent on-board solution until I hacked this together myself. from my experience, this doesn't work on some of the other miners (like d3, l3) since they wipe files every reboot, but this works fine on s9 for me.
Jump to: