Auto-restart crashed mining processes in ethOS 1.2.9

ethOS 1.2.9 brings a few changes which break my auto-restart script for ethOS 1.2.7. Since 1.2.9 contains improved GPU crash detection, I rewrote the restart script to use the built-in detection mechanisms. For the required cron job please see my initial post which is available here.

As long as the DRY_RUN variable is set to false, the script won’t take any action, it just logs what it would do.


25 thoughts on “Auto-restart crashed mining processes in ethOS 1.2.9

  1. hi
    i am using 1.2.9

    i add scripts in and add path in cron file and save but

    its note creating log file i try to run manual but log file is not creating i am wondering its working or not.

    i try dry_run = fales

    anyone help me to step by step from first.

    • You may have too many insidants of crontab.
      Type crontab -l to list the running jobs under your name. Andelet it buy typing crontab -r
      Type sudo crontap -l to see what is runing under the root. If you see your script, use the command i sent in my reply to restart it or reboot.

    • One more thing. The echo command does not put anything in the log. So you need to add something to see it. The only time your log will creat an insident is when it crashes. So i added this instead of:
      echo “Everything’s fine, exiting…”
      I replaced it with:
      echo “$(date) everything is ok…….” | tee -a ${LOG_FILE}

      • It’s good but it’s not create log file so some. Other issues with script even I manually run rigcheck script but it’s not create log file

        • Creat it manualy. Nano rigcheck.log. write something and try to save. If does not allow you to save it you need to give it permition to edit. Like i think chmod 777 rigcheck.log. try that. Let me know.

  2. This is great, my rig is never restarting anymore since the 1.2.9 update. I have not tried this yet, is there anything I need to modify in this file to get it to restart every time a GPU stops hashing?

        • 1- copy script to /home/ethos/
          use nano and then paste the script there, then press cntl-X, Y then Enter to save
          2- in console: sudo chmod +x /home/ethos/
          3- in console: sudo crontab -e
          4- choose 2 to edit crontab in nano
          5- add the following new lines:
          */15 * * * * /home/ethos/ – this will run the script every 15min
          6- press Ctrl + X, Y then enter to save the new cron job
          7- excute this comman ‘sudo service cron restart’ [ without apostrophes]
          to test you can check the rigcheck.log after every 15min of the hour. by writing nano rigcheck.log

          I hope this help. just follow the steps exactly and you will be good

  3. I am wondering why the script in 1.2.9 has the reboot instead of minestop and minestart
    like in the older scrip
    sleep 5

  4. Hey, is there any tutorial for me to get this work? I’m really not into linux but prefer ethOS since it gives me a plus of 5 MH/s each card. Would like to get some help.

  5. Got your script to run manually when calling it, but am not able to get it to run through a cronjob. I have the following in a file in /etc/cron.d/

    */15 * * * * root /home/ethos/

    does spacing between the */15 * * * * and root and then root and /home/ethos/ make a difference?

    I’ve also granted the script executable permissions with chmod +x.

    Any thing else you can think of?

  6. Thanks for the great script however whenever i try and run it manually, i get the message bin/bash^M: bad interpreter: no such file or directory. Any suggestions would be greatly appreciated.

    • was able to fix it, if anyone else runs into this error;

      open script with vi

      hit esc and type in the following:
      :set fileformat=unix
      then save and quit.

      • Hi Alex,
        got all the scripts saved. I also did the chmod and added your executed :set Fileformat=unix.

        how would I test it. you mentioned you run it manually. how did you do that?

  7. Hi I just tested it. There seems it is not getting all the problems. I had error: possible pool connection problem when it crashes and it is not working. I was thinking to check file stats.file.

Leave a Reply

Your email address will not be published. Required fields are marked *