Bitcoin Forum
December 15, 2024, 04:54:03 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: On-board auto reboot with Antminer S9 (daily reboots)  (Read 615 times)
psp4804 (OP)
Newbie
*
Offline Offline

Activity: 6
Merit: 7


View Profile
July 22, 2018, 01:16:04 AM
Merited by frodocooper (5), BitMaxz (2)
 #1

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 root@xx.xx.xx.xx
#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.
BitMaxz
Legendary
*
Online Online

Activity: 3472
Merit: 3204


Playbet.io - Crypto Casino and Sportsbook


View Profile WWW
July 22, 2018, 04:18:43 PM
 #2

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://bitcointalk.org/index.php?topic=676942.0

I also found this thread https://bitcointalk.org/index.php?topic=596620.0
And it has also feature to schedule auto reboot or restart your miner.

███████████████
█████████████████████
██████▄▄███████████████
██████▐████▄▄████████████
██████▐██▀▀▀██▄▄█████████
████████▌█████▀██▄▄██████
██████████████████▌█████
█████████████▀▄██▀▀██████
██████▐██▄▄█▌███████████
██████▐████▀█████████████
██████▀▀███████████████
█████████████████████
███████████████

.... ..Playbet.io..Casino & Sportsbook.....Grab up to  BTC + 800 Free Spins........
████████████████████████████████████████
██████████████████████████████████████████████
██████▄▄████████████████████████████████████████
██████▐████▄▄█████████████████████████████████████
██████▐██▀▀▀██▄▄██████████████████████████████████
████████▌█████▀██▄▄█████▄███▄███▄███▄█████████████
██████████████████▌████▀░░██▌██▄▄▄██████████████
█████████████▀▄██▀▀█████▄░░██▌██▄░░▄▄████▄███████
██████▐██▄▄█▌██████████▀███▀███▀███▀███▀█████████
██████▐████▀██████████████████████████████████████
██████▀▀████████████████████████████████████████
██████████████████████████████████████████████
████████████████████████████████████████
PassThePopcorn
Sr. Member
****
Offline Offline

Activity: 463
Merit: 309


View Profile
July 22, 2018, 09:28:40 PM
Last edit: July 23, 2018, 10:20:06 AM by frodocooper
 #3

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.
psp4804 (OP)
Newbie
*
Offline Offline

Activity: 6
Merit: 7


View Profile
July 23, 2018, 02:11:48 AM
Last edit: July 23, 2018, 10:20:32 AM by frodocooper
 #4

[...]

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.
Ameador1
Member
**
Offline Offline

Activity: 124
Merit: 47


View Profile
July 26, 2018, 11:49:38 AM
 #5

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.
PassThePopcorn
Sr. Member
****
Offline Offline

Activity: 463
Merit: 309


View Profile
August 01, 2018, 12:36:39 AM
Last edit: August 01, 2018, 12:41:10 AM by frodocooper
 #6

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.
fanatic26_
Full Member
***
Offline Offline

Activity: 294
Merit: 129


View Profile
August 15, 2018, 03:28:23 PM
 #7

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
elmaestro
Newbie
*
Offline Offline

Activity: 7
Merit: 0


View Profile WWW
November 04, 2018, 03:08:46 AM
Last edit: November 05, 2018, 11:28:19 PM by frodocooper
 #8

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
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!