Closed errand closed 5 years ago
Thank you !!!
This looks correct.
Ahaha! You're right man, except S9s are in TH/s so the right code is if(miner.model.model == "S9"): if ghs5s < 12000: rebootit(miner.ip) #custom reboot function using paramiko
Thanx!
No problem. Can you share the code for rebooting to compare it with mine ?
Thnx. I will compare it with mine and reply
Sure. I'm sure it's not the best. I think it is better to write ips to the file and reboot them via cron..
`import paramiko
def rebootit(ip): ssh = paramiko.SSHClient() ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) ssh.connect(ip, username='[REDACTED]', password='[REDACTED]', allow_agent=False, look_for_keys=False, timeout=40) try: stdin, stdout, stderr = ssh.exec_command("/sbin/reboot -f > /dev/null 2>&1 &") except AuthenticationException, e: print '' finally: ssh.close()`
had to delete comment
Hello @anselal ! You're doing great thanks! While i'm still learning could you please advise how to check the miner model because i'd like to reboot S9 which is probably damaged and goes to 8Gh/s in a while. Currently i'm dong this:
if(miner.model.model == "S9"): if ghs5s < 12: rebootit(miner.ip) #custom reboot function using paramiko