How to Make an AntMiner S9 Reboot every 30 minutes
Every once in a while a hashboard for an Antminer S9 will go bad. I look on the display and it has all XXXX’s on it. Before sending the board back for repair I’ll reboot it just to make sure that as soon as the machine boots up the hash board goes bad.
I have two boards that have been troubling me for months. They run for about 30 minutes, then stop with all XXX’s. So I sent them to Bitmain for repair. They got sent back to me without any apparent improvement. They still go bad after 30 minutes.
I ran them for a while, rebooting the box daily when I remembered, and the same thing kept happening. In the next batch of boards to send back to Bitmain I included these two boards, again. They were returned to me, again apparently unfixed.
What I suspect happens is that Bitmain tests the board and runs them for about 5 or 10 minutes. If they look good, they send them back.
I put these two boards into their own box and ran them. Every day when I would think about it I would go to reboot the box, they would hash for a little while, then stop.
A friend of mine suggested that I set it to reboot automatically every hour. That’s a good idea and it find it hard to resist a technical challenge so I logged into the command line on the Antminer and tried to set up a Cron job to reboot it. Cron does not exists on the dumbed down operating system running on these boxes, and I did not want to figure out how to install it. I needed another way to reboot the box every hour.
Well, I have a small Linux server on site running on a Raspberry Pi that I use as a proxy for the monitoring system I have running on my cloud Linux server.
The Raspberry Pi is a very simple $70 system that can function as a full Linux server. I keep it plugged into the UPS sitting on top of the firewall, and if building power goes down it still keeps uploading system info back to the cloud server.
The cloud monitoring system is based on Zabbix. I did a different blog post on it earlier this year, and have expanded it to monitor multiple sites, network equipment, Antminers, Windows and Linux Zcash and Ethereum miners, and hosted VPS servers. It’s pretty handy, and helps to keep the equipment running and my costs low. I use that so I can at a glance see that everything’s working well and when something doesn’t the system sends me an email telling me about a problem.
Anyway I figured I could use this Linux box to reboot the Antminer.
I first setup that I could login from the Linux box to the Antminer S9 without giving a password by generating a public and private RSA key and inserting that key to the miner.
Generate a RSA key:
ssh-keygen
Push key to Antminer. Replace 10.0.0.10 with the IP address of your Antminer. Root password is admin.
ssh-copy-id root@null10.0.0.10
Check that it worked by SSH to the miner. It should connect with no password.
ssh root@null10.0.0.10
Here is an example of the full dialog:
user@proxy:~ $ ssh-copy-id root@null10.0.0.10
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
root@null10.0.0.10's password:
Number of key(s) added: 1
Now try logging into the machine, with: "ssh 'root@null10.0.0.10'" and check to make sure that only the key(s) you wanted were added.
user@proxy:~ $ ssh root@null10.0.0.10
root@miner_0010:~#
Then I set up an hourly crontab job on the Linux box to log in and reboot the Antminer.
Access cron with this command, choose your favorite editor:
crontab -e
Add this line to the end of the file:
0 * * * * ssh root@null10.0.0.10 "/sbin/reboot"
That worked pretty good. Except it wasn’t often enough. So I changed it to every thirty minutes:
0,30 * * * * ssh root@null10.0.0.10 "/sbin/reboot"
Now the miner is rebooting every 30 minutes, and it is contributing significant hashing power again.
I’m going to keep running it this way for as long as I need to and then maybe one day the hash boards will be completely bad and I’ll send them in, and finally get them repaired. Or scrapped.
Topius
July 27, 2017 @ 4:24 pm
Hello. Did you Fix your problem ?
I had same problem with one of my Antminer S9 sometimes 1 Board was getting 00000 Hashrate sometimes 2 boards stopped. First I thought it was power unit changed it but after a while same problem then while trying to fix miners i touched Metal Frame(Rig where miners stand) and a PSU and felt small electric current going threw me after what all miners that was standing on that metal rig wend 00000 hash rate.
Fix
I Put all miners and power supply on a small plastic corrners covers with 2mm height so they do not touch metal nor miners Nor Power Supply. Since then I never had any problem like that Hope this helps with this kind of problems Good luck 🙂
oscrack
August 24, 2017 @ 11:49 am
hello when you send for repair, you mean send them to china? or do bitmain has a center in the US where they repair the hashing board, plus how long are they under warranty?
thanks
Rolf
August 28, 2017 @ 12:52 pm
180 days warranty, after that each repair is about $50-$100.
Bitmain just added a repair facility in California, and it works ok so far.
t9
July 14, 2018 @ 9:47 pm
think my t9+ auto restarted on its own possible?
psp
July 21, 2018 @ 9:05 pm
you can just embed an auto restart on the device itself without too much work so that you don’t have to use a separate device to trigger a reboot:
—
#ssh onto the device
> ssh root@nullxx.xx.xx.xx
#modify the bmminer’s autorun file to include a reboot
>vi /etc/init.d/bmminer.sh
(@ line 44)
killall -9 bmminer || true
/sbin/shutdown -r -f +1440 “daily reboot” & #this is the key line
/usr/bin/bmminer –fixed-freq –no-pre-heat –version-file /usr/bin/compile_time –api-listen –default-config /config/bmminer.conf &
#save vi 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)
tip btc if you want: 33Gsp5BXoRJWtfMmQzao1P2XQaHMcezFSa
el meister
November 3, 2018 @ 11:11 pm
Why not reboot the s9 when it drops hashrate or stops hashing instead??
Here is a shell script that checks every 10 minutes and does that.
https://bitcointalk.org/index.php?topic=4720967.msg47563967#msg47563967
Leandro
January 13, 2019 @ 9:14 pm
hola! está solucionado el problema? puedo hacer para usted un pequeño programa que reinicie los antminer S9 en los horarios que usted necesite. Mi email lmr75@nullhotmail.com .
RICARDO SOLANO
March 26, 2021 @ 3:29 pm
You can also use AntGuardian which is Libre and Open Source which means it is auditable by other users and therefore a much better and safer solution. It runs on Windows Mac an Linux
https://github.com/rsolano60/AntGuardian
There is a video tutorial on that link