-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Command to quit miner on error #97
Comments
A much safer solution would be to have your restart script monitor the GPUs usage and restart the miner when any of the GPUs usage drops below 50% for several seconds. This is easily done on NVIDIA. |
@DLS-bau Do you have working example of a script? May be you can share with rest of us, thanks |
I think there should be an exit command regardless of error or not.. Press Q for example and it shuts down properly instead of just killing the process.. |
Yeah command -k or so that will quit miner on any error, so simple batch loop will restart it, I use it for most miners |
reb0rn21 can you share a sample bat file for batch loop restart? |
:loop just disable widows error reporting, thats what I do |
see here [Issue 72] There are some solutions with batch, powershell or php available.. |
My very basic (but effective) solution is to monitor the miner with a bash watchdog script.
|
Here's something I am using for my nvidia cards.
|
I'm using this with nvidia cards and tmux: #!/bin/bash
file=/tmp/ethminer-restarts.log
POWER_THRESHOLD=50
PROBE_DELAY=30
STARTUP_DELAY=60
RED='\033[0;31m'
GREEN='\033[0;32m'
NC='\033[0m' # no color
while true
do
sleep $PROBE_DELAY
power_draw=$(nvidia-smi --id=0 --query-gpu=power.draw --format=csv,noheader,nounits)
if (( $(echo "$power_draw < $POWER_THRESHOLD" | bc -l) ))
then
echo -ne " $RED$(date +'%H:%M') ✘$NC " | tee -a $file
tmux respawn-pane -k -t ethminer:0.0
sleep $STARTUP_DELAY
else
echo -ne "$(date +'%M') ${GREEN}✔$NC "
fi
done |
This method doesn't work everytime. If GPU fails nvidia-smi is executed in a loop without output. I am currently working on finding a better way to implement watchdog function. |
@ddobreff When nvidia-smi stops working, the driver will log a XID error. You can check with: |
We shouldn't be using this function at all, it may cause other dificulties like I forgot that I stopped the miner and while compiling the system rebooted...A better approach is to use miner as instructor for watchdog. |
True. I haven't tried it but I think checking exit code from nvidia-smi should allow to catch this. Another thing that should be accounted for is when nvidia-smi hangs (I think I've seen such cases). |
After #757 (added --exit parameter to exit whenever an error occurred) you can use a watchdog. Try ETHminerWatchDogDmW Windows7/8/10 [32/64] & Linux (Any Dist/Any Ver/Any Arch) (#735). Check and feedback please. |
If the mining card is OC-ed to the limit, miner just stop with some "cuda error" it would be nice to have command just to quit miner on error so we can use restart scrypt
The text was updated successfully, but these errors were encountered: