Post
Topic
Board Mining (Altcoins)
Re: [OS] nvOC easy-to-use Linux Nvidia Mining v0017
by
salfter
on 10/07/2017, 15:30:50 UTC
I think I've figured out why my profitability switcher was having problems with some coins.  I noticed it when I tried switching my rig from Genoil back to Claymore (I'm having trouble getting Genoil to run for more than 24 hours without crashing)...the script would run, and I'd end up with two or more instances of the Claymore miner running.

pgrep and pkill, when called with the -f option (to look at the whole command line), need to have "+" escaped for some reason...most likely the pattern is processed as a regular expression and not a simple string.  Any miner command string that included "stratum+tcp" (that's basically all of them except the equihash and Genoil daggerhashimoto miners) thus wasn't searchable or killable.

I've committed a fix that should take care of that.  It also prepends the search string with "^" to match on the miner process itself, not the screen process that spawned it.  (Killing the miner will automatically kill the parent screen process.)

Please test and ensure with confidence; that it is rock solid: then I will integrate these changes. 

It would be helpful if you did so with the integrated oneBash + switch version I made (swap the relevant part of switch with your updated code); so I can be sure it works as intended.

The script looks like it's stopping and starting miners properly, but that has only caused another problem to surface: GPUs start crashing on the switch, and the only way to reboot is either SysRq-B or the reset switch.  I've had this problem in the past with my other switchers; if I had to guess, some miners leave the GPU in a state that other miners don't expect when they start up.

I've done some testing with shell scripts that shows a way forward: stop the previous miner, stop X, unload the nVidia driver, reload the driver, restart X, and start the next miner.  This puts the GPUs back to a known-good state before getting back to mining.  I've switched back and forth between a known-troublesome pair of miners, and it hasn't failed yet.  I'm going to put these changes into the switcher next and see how it goes.