Bitcoin Forum

Alternate cryptocurrencies => Mining (Altcoins) => Topic started by: darkguy2008 on June 17, 2017, 09:14:19 PM



Title: KYMA: Keep Your Miners Alive! (Windows) (works for any miner) (Source in GitHub)
Post by: darkguy2008 on June 17, 2017, 09:14:19 PM
Hello all! :D

Long-time lurker, first-poster here!. First of all, a small introduction: I've been interested in the cryptocurrency world since it began at around $50 a BTC (lol!) however, I never had the possibility to get any (country issues :( ) and now I'm living somewhere else and electricity is expensive so mining isn't an option. However, I do have a lot of development experience and a few friends who can mine, and they have been looking for an app that can keep their miner apps alive. Somehow, it seems that the processes sometimes crash (usually experimental/beta software?) and they need to reboot them every now and then.

So, due to this need and one of my friend's suggestion to post it here (I do have a few debts to pay and I'm really short on money, this new place is expensive as heck and I can't move yet) I figured I could make a full-fledged app since it seems to be a common need. I'm not sure if this should be posted in here or in the BTC forum, as I said I'm not a miner so I don't know if the altcoins apps are stable. If mods consider this should be moved elsewhere, feel free to do so!

Now without further ado, here's the github repo for the app I made (includes documentation and how to use!):

https://github.com/darkguy2008/kyma

You can download binary and source code versions from there!

As a sidenote, I've been reading a lot lately that some scurvy rats have been including malware in their source code (which I highly disapprove, that's pretty low man...), however I'm being transparent and honest here. The code is around less than 300-lines long combined and it's written in C# so it's easy to read and figure out what it does.

Basically, it checks every N seconds for a process .exe name and if it doesn't exist, it waits N seconds before it runs a specific .exe/.bat/etc. file (which hopefully starts the miner) again. I've noticed miner apps always have a .bat file which you run to start up the .exe with some parameters, so I think you'll be familiarized with the process as this app is made to be run the same way.

I'm thinking I could improve this app and make a GUI or something, maybe to monitor more than one process and/or provide other advanced options, but I'd like to know if it's useful first, before I spend a lot of time working in something that might not have enough interest. If there's a lot of interest, I can make a Linux-version using the Mono framework, which is easy to install in any platform nowadays, even OSX (but, who mines with a mac? is that even profitable? lol :P )

I'm not sure if I can post wallet addresses here, so if you want to donate and help me a bit, you can find them in the GitHub link.

Thanks and happy mining!
- DARKGuy


Title: Re: KYMA: Keep Your Miners Alive! (Windows) (works for any miner) (Source in GitHub)
Post by: deadsix on June 17, 2017, 10:17:01 PM
This is pretty cool. What would also help is if it checks for the miner output (dbg file for instance) every second and if no updates or writes happen in 30 seconds, it restarts the system. Because most of the times, miners dont crash, they just hang, so the process would still exist, it just wouldn't be doing anything.


Title: Re: KYMA: Keep Your Miners Alive! (Windows) (works for any miner) (Source in GitHub)
Post by: darkguy2008 on June 17, 2017, 10:39:25 PM
This is pretty cool. What would also help is if it checks for the miner output (dbg file for instance) every second and if no updates or writes happen in 30 seconds, it restarts the system. Because most of the times, miners dont crash, they just hang, so the process would still exist, it just wouldn't be doing anything.
Hello! thanks for your feedback! :).

I see, well, since I haven't used much mining apps (other than simple tests, haha) I wasn't aware of that.

Thanks for the heads up, I can do that I guess, do you know what miner app I can use to test and develop that feature? :)


Title: Re: KYMA: Keep Your Miners Alive! (Windows) (works for any miner) (Source in GitHub)
Post by: bathrobehero on June 18, 2017, 06:49:30 PM
What's the difference between using this and using a simple loop in a batch file:

:loop
miner.exe ...
timeout -t 20
goto loop


When the miner crashes this will restat it after 20 seconds. Monitoring GPU usage would be better as it would also trigger in case of a crash or server disconnect.


Title: Re: KYMA: Keep Your Miners Alive! (Windows) (works for any miner) (Source in GitHub)
Post by: Bulletdodger on June 18, 2017, 06:59:19 PM
What's the difference between using this and using a simple loop in a batch file:

:loop
miner.exe ...
timeout -t 20
goto loop


When the miner crashes this will restat it after 20 seconds. Monitoring GPU usage would be better as it would also trigger in case of a crash or server disconnect.

this doesnt work with EWBF Zec miner, as I wrote in his topic...


Title: Re: KYMA: Keep Your Miners Alive! (Windows) (works for any miner) (Source in GitHub)
Post by: bathrobehero on June 18, 2017, 07:06:19 PM
What's the difference between using this and using a simple loop in a batch file:

:loop
miner.exe ...
timeout -t 20
goto loop


When the miner crashes this will restat it after 20 seconds. Monitoring GPU usage would be better as it would also trigger in case of a crash or server disconnect.

this doesnt work with EWBF Zec miner, as I wrote in his topic...

Yeah, but nor does this tool. Which is why I said a GPU usage tracking restart logic would be better. But ow do you easily check GPU usage for both AMD and nvidia cards?

Also, I have never had EWBF just do 0 sols. My problem is that I often get disconnected from the pool or not even connected when starting the miner and it just quits, there's no reconnect feature.

0 sols sounds like cards crashing because of too high overclock maybe.


Title: Re: KYMA: Keep Your Miners Alive! (Windows) (works for any miner) (Source in GitHub)
Post by: Bulletdodger on June 18, 2017, 07:16:13 PM
What's the difference between using this and using a simple loop in a batch file:

:loop
miner.exe ...
timeout -t 20
goto loop


When the miner crashes this will restat it after 20 seconds. Monitoring GPU usage would be better as it would also trigger in case of a crash or server disconnect.

this doesnt work with EWBF Zec miner, as I wrote in his topic...

Yeah, but nor does this tool. Which is why I said a GPU usage tracking restart logic would be better. But ow do you easily check GPU usage for both AMD and nvidia cards?

Also, I have never had EWBF just do 0 sols. My problem is that I often get disconnected from the pool or not even connected when starting the miner and it just quits, there's no reconnect feature.

0 sols sounds like cards crashing because of too high overclock maybe.

Yeah, I agree, I downclocked my GPUs so it happens rarely, but nevertheless, every few days it happens on one of the rigs, and usually at 2AM, which costs me quite some hours of no mining.

I dont think there can be a unified solution for both AMD and Nvidia, rather a specific solution for each of them, but I'm no dev, so if someone is - please chime in.


Title: Re: KYMA: Keep Your Miners Alive! (Windows) (works for any miner) (Source in GitHub)
Post by: bathrobehero on June 18, 2017, 07:31:43 PM
Yeah, but nor does this tool. Which is why I said a GPU usage tracking restart logic would be better. But ow do you easily check GPU usage for both AMD and nvidia cards?

Also, I have never had EWBF just do 0 sols. My problem is that I often get disconnected from the pool or not even connected when starting the miner and it just quits, there's no reconnect feature.

0 sols sounds like cards crashing because of too high overclock maybe.

Yeah, I agree, I downclocked my GPUs so it happens rarely, but nevertheless, every few days it happens on one of the rigs, and usually at 2AM, which costs me quite some hours of no mining.

I dont think there can be a unified solution for both AMD and Nvidia, rather a specific solution for each of them, but I'm no dev, so if someone is - please chime in.
[/quote]

As a duct tape solution you could restart your miner let's say every hour with something like this:

restart.bat:

:loop
timeout -t 3600
taskkill -t -f /im miner.exe
goto loop

That is if you also run miner.exe in a loop.


Title: Re: KYMA: Keep Your Miners Alive! (Windows) (works for any miner) (Source in GitHub)
Post by: darkguy2008 on June 18, 2017, 10:08:19 PM
What's the difference between using this and using a simple loop in a batch file:

:loop
miner.exe ...
timeout -t 20
goto loop


When the miner crashes this will restat it after 20 seconds. Monitoring GPU usage would be better as it would also trigger in case of a crash or server disconnect.

As I've seen sometimes this solution does not work, which is in fact one of the reasons why I made this app for another friend who was using a zac miner or something like that. I think it was quoted in another post, which I'll quote here:

What's the difference between using this and using a simple loop in a batch file:

:loop
miner.exe ...
timeout -t 20
goto loop


When the miner crashes this will restat it after 20 seconds. Monitoring GPU usage would be better as it would also trigger in case of a crash or server disconnect.

this doesnt work with EWBF Zec miner, as I wrote in his topic...

Yeah, but nor does this tool. Which is why I said a GPU usage tracking restart logic would be better. But ow do you easily check GPU usage for both AMD and nvidia cards?

Also, I have never had EWBF just do 0 sols. My problem is that I often get disconnected from the pool or not even connected when starting the miner and it just quits, there's no reconnect feature.

0 sols sounds like cards crashing because of too high overclock maybe.
I can improve it as well with GPU usage monitoring instead of process monitoring, that's why I posted this here in order to get feedback and make an useful tool for all :)

I have a 1060 with me, what do I need to try that Zec miner and monitor GPU usage to make it another feature? If you can guide me, I'll improve the app so you will be able to use it too :)

Also, I can make it monitor a logfile or something if the miner has one, this way I can look for key strings (disconnections as you say, maybe?) and act accordingly.

Thanks for your feedback!


Title: Re: KYMA: Keep Your Miners Alive! (Windows) (works for any miner) (Source in GitHub)
Post by: xTommYx on June 19, 2017, 12:24:59 AM
Check this video, i found this to be the most spot on solution to the problem.

https://www.youtube.com/watch?v=mjQW58F-wHE&t=4s

But looks like it's hard to find that tool now. Coder doesn't develop it anymore.


Title: Re: KYMA: Keep Your Miners Alive! (Windows) (works for any miner) (Source in GitHub)
Post by: darkguy2008 on June 19, 2017, 12:40:28 AM
Check this video, i found this to be the most spot on solution to the problem.

https://www.youtube.com/watch?v=mjQW58F-wHE&t=4s

But looks like it's hard to find that tool now. Coder doesn't develop it anymore.

Interesting, that seems similar to what Bulletdodger means. Okay so it seems that Claymore's miner still has this problem? I could give it a try. Not sure about the dev fee block though, I don't know how cryptocurrencies work internally, but I can surely monitor GPU usage, logfiles and processes, I could give this a try and report back, thanks! :)


Title: Re: KYMA: Keep Your Miners Alive! (Windows) (works for any miner) (Source in GitHub)
Post by: car1999 on June 19, 2017, 02:04:48 AM
It's so cool.
I was a c# developer and started mining days ago, maybe I can contribute some code. ;D


Title: Re: KYMA: Keep Your Miners Alive! (Windows) (works for any miner) (Source in GitHub)
Post by: bathrobehero on June 21, 2017, 11:41:17 PM
Yeah, but nor does this tool. Which is why I said a GPU usage tracking restart logic would be better. But ow do you easily check GPU usage for both AMD and nvidia cards?

Also, I have never had EWBF just do 0 sols. My problem is that I often get disconnected from the pool or not even connected when starting the miner and it just quits, there's no reconnect feature.

0 sols sounds like cards crashing because of too high overclock maybe.
I can improve it as well with GPU usage monitoring instead of process monitoring, that's why I posted this here in order to get feedback and make an useful tool for all :)

I have a 1060 with me, what do I need to try that Zec miner and monitor GPU usage to make it another feature? If you can guide me, I'll improve the app so you will be able to use it too :)

Also, I can make it monitor a logfile or something if the miner has one, this way I can look for key strings (disconnections as you say, maybe?) and act accordingly.

Thanks for your feedback!
[/quote]

If you make a tool that tracks GPU usage (and possibly even power usage in watts) via nvidia-smi (and not the current miner running) I'll be definitely interested!