Sunday, February 16, 2014

Non-stop Bitcoin Mining

It's no secret I mine Bitcoins, but I don't bring up that I'm not very good for the obvious geek creed reasons. Today I finally made a change to my mining rig that I hope will end the occasional dreaded "Idle Miner Notification" from btcguild.com.

Screen shot of the log file, how interesting and inefficient.
I have small mining setup, a mix of Block Eruptors and a single Butterfly Labs Jalapeno. We started having strange Internet connection issues, and I immediately assumed it was AT&T's fault (to be fair it usually is). Also about the same time bfgminer reported the Jalapeno was sick. Never crossed my mind these issues were related, but once I sent the Jalapeno off to be RMA'd all most of our Internet problems cleared up.

With the Jalapeno gone, bfgminer ran with no problems. With the Jalapeno the program would inexplicably give up, even with the new one back in action this still happens. As a good administrator I'm sure I could have looked for a log or an error message or something, but it is very easy to putty back in, hit the up arrow, enter, ctrl+A+D, and go on with life. I can even do it remotely with TeamViewer because my home PC is on almost all the time (thanks for nothing logmein). Sometimes it goes for months without my need to intervene, other times only hours (and in the middle of the night).

After nearly a year of manual restarts and an immeasurably small loss of Satoshis, I've finally made a script to continually check if bfgminer is running and restart it if it's not. My apologies for not giving credit where it is due, most of this script came from a post on stackoverflow, but I'm not sure where.

It is far from perfect, but so far so good. I'd love to hear anyone's two cents  Satoshis on how to improve it. I also hope this is an aid to other small time miners.

EDIT: March 4, 2014
It didn't take me long to realize this was better to run as a cronjob. The biggest problem I had was multiple screens running, so I changed it over and made my log file a little better.

My first attempt was to remove the pause line and add the script as a cronjob that runs every 5 minutes.

The Ubuntu Wiki CronHowto was helpful, especially the Enable User Level Cron section.

I also update the log file to show a time. For weeks I thought everything was good, because you know, nothing went wrong. I was suspicious something wasn't quite right because the log file never showed the miners being restarted.

Today the power went out, and when the server came back on I expected miners to be running within 5 minutes... they did not. I dug a little deeper and this comment on the Ubuntu forms pointed out my issue. There were a lot of comments about making sure the script was executable and user level cron was set up. My problem specifically had to do with how screen works. I needed a -d for detach. The new script is in the gist, it's been tested and rocks along well.


3 comments:

nickyjone said...

Thank you for providing such high-quality material on your blog. We appreciate the wonderful articles you have on your site. Divorcio de Proceso Nueva York. || Reglas de Divorcio en Nueva York.

Alice said...

"solicitation of a minor"

Non-stop Bitcoin Mining is a comprehensive guide for beginners and experienced individuals interested in cryptocurrency mining. It offers a user-friendly approach to understanding complex mining concepts, making it an excellent resource for enthusiasts of all levels. The guide emphasizes non-stop mining, aiming to help readers maximize their efficiency and potential in the ever-evolving world of Bitcoin. It is a valuable asset for anyone looking to delve into Bitcoin mining, offering a continuous stream of knowledge to keep pace with the dynamic and rewarding industry.

Andrew said...

divorce without separation agreement
The comments provide a detailed overview of the non-stop Bitcoin mining process, revealing its challenges and rewards. They reveal the intricacies of the process, including the constant operation required to secure transactions on the blockchain. The relentless nature of Bitcoin mining is explored, highlighting the continuous effort needed to validate transactions and maintain network security. The work involved in solving complex mathematical puzzles to earn rewards and secure the network is also highlighted. The comments highlight the constant computational power and energy required to sustain the decentralized network. They provide insights into the challenges and opportunities of non-stop Bitcoin mining, providing a glimpse into the rigorous process of verifying transactions and generating new coins. The comments also reveal the secrets of non-stop Bitcoin mining, offering a behind-the-scenes look at the continuous effort to maintain the integrity of the cryptocurrency network.