Pages:
Author

Topic: Need simple batch restart miner when GPU not working (Read 391 times)

newbie
Activity: 17
Merit: 0
here is the best solution, if you have a gpu that is having issues that means you've got an underlying problem somewhere which should be checked out, if you rig CANNOT RUN for 30+ days without any problems there's an issue you need to fix and its as simple as that, stop trying to use some script or little program to reboot the rig when clearly you've got a problem somewhere. the one thing everyone posted on this thread has FAILED to even mention.
a good running rig can run for months with no problems what so ever, the fact you are having issues shows there's a problem somewhere

Very true statement.

Sometimes, though, things are outside the average miner's control:  There could be an infrequent bug in the hashing algorithm; switching between algo's can make GPU's twitchy; dicey networks; etc.

All of those do require analysis to determine root cause and permanent corrective action (as you mention).  But until a person has enough time to dive into it, it's nice that the rig reboots itself to keep the mining process moving.  Now if the rig is rebooting frequently then jump on it immediately.  But if it's once a week it's not as urgent of an issue (as compared to other urgent issues... for me at least).
sr. member
Activity: 462
Merit: 258
Small Time Miner, Rig Builder, Crypto Trader
here is the best solution, if you have a gpu that is having issues that means you've got an underlying problem somewhere which should be checked out, if you rig CANNOT RUN for 30+ days without any problems there's an issue you need to fix and its as simple as that, stop trying to use some script or little program to reboot the rig when clearly you've got a problem somewhere. the one thing everyone posted on this thread has FAILED to even mention.
a good running rig can run for months with no problems what so ever, the fact you are having issues shows there's a problem somewhere
hero member
Activity: 1218
Merit: 534
Strange that there is no ready to go system to check if a teamviewer ID is not online or chrome remote desktop control API or app to check if an host is online or not.

I think is very simple but I searched nothing found for now.


It's not simple, I checked.
Read the TV API manual. You'll see.
sr. member
Activity: 616
Merit: 250
If using Anydesk instead Teamviewer I notice that I don't have license issues.

Then in Anydesk there is a function to know the status of a computer
 --get-status

Is there anyone can make a batch with  --get-status function?

If one or more rigs is not reached it can delivery an email to notify.
sr. member
Activity: 616
Merit: 250
Strange that there is no ready to go system to check if a teamviewer ID is not online or chrome remote desktop control API or app to check if an host is online or not.

I think is very simple but I searched nothing found for now.
hero member
Activity: 1218
Merit: 534
Issue I was having is these scripts don't work if the entire rig freezes so you 100% need a smart plug or another way to remote reboot the actual PSU

You would need one of these:
https://www.amazon.com/Computer-Dongle-Watchdog-Mining-Unattended/dp/B0767GL858

https://www.2dehands.be/computer-game-consoles/computer-onderdelen/videokaarten/usb-mining-crash-tool-394814590.html



I think 20 euros is not a lot if it actually works.
hero member
Activity: 1218
Merit: 534
Do you know if it is possible to ping a Teamviewer id instead ip number ?

Because ip number can be changed, teamviewer id still the same.


You _could_ use a No-IP service (https://www.noip.com/). Have the little program run in the back and you can always ping your hostname, no matter what your IP is.


I have been using 3 No-IP hostnames for my security cameras for over 3 years. Never had a problem.
sr. member
Activity: 616
Merit: 250
Totally agree!  One way I helped with the automation on that is to have a non-mining PC that is on the same network do a ping to the miner at a specific time interval.  If the ping fails, then it sends a text to my phone and make it my decision on whether or not to re-boot via the smart plug.

Here's what I do;

* Set up 'Mining Observer' (android) on your phone.
* It vibrates / illuminates / plays a sound when a rigs hashrate drops below a user-specified level (I set it to 90% indicating rig failure) You also set the query interval
* First attempt to remote in to see if it's miner-related, if remote viewer fails;
* Flick smart plug

I get about 5% false-positives on Mining Observer due to Cryptonight rigs hitting a lean spot.

I will admit this needs optimization - I want to monitor the hashrate of my windows rigs and automatically restart miner after a crash or when Vegas overheat and stop hashing.

I tried but it works only with public pools.
What if I need to check rig mining in solo?
full member
Activity: 325
Merit: 110
Totally agree!  One way I helped with the automation on that is to have a non-mining PC that is on the same network do a ping to the miner at a specific time interval.  If the ping fails, then it sends a text to my phone and make it my decision on whether or not to re-boot via the smart plug.

Here's what I do;

* Set up 'Mining Observer' (android) on your phone.
* It vibrates / illuminates / plays a sound when a rigs hashrate drops below a user-specified level (I set it to 90% indicating rig failure) You also set the query interval
* First attempt to remote in to see if it's miner-related, if remote viewer fails;
* Flick smart plug

I get about 5% false-positives on Mining Observer due to Cryptonight rigs hitting a lean spot.

I will admit this needs optimization - I want to monitor the hashrate of my windows rigs and automatically restart miner after a crash or when Vegas overheat and stop hashing.
newbie
Activity: 17
Merit: 0
Do you know if it is possible to ping a Teamviewer id instead ip number ?

Because ip number can be changed, teamviewer id still the same.

I haven't tried that.  But TeamViewer does have an extensive suite of API's:  https://dl.tvcdn.de/integrate/TeamViewer_API_Documentation.pdf
newbie
Activity: 17
Merit: 0
Totally agree!  One way I helped with the automation on that is to have a non-mining PC that is on the same network do a ping to the miner at a specific time interval.  If the ping fails, then it sends a text to my phone and make it my decision on whether or not to re-boot via the smart plug.  (That central PC could also issue the command to the smart plug to reboot, but I figured at some point a human has to get involved).

Here's a snippet of code from that .bat




can you attach here the bat file Smiley not so practice with that Cheesy

Hope it meets your needs...

echo off
rem *****************************************************************************************************************
rem *                                                                                                               *
rem *  Objective:  Determine if an IP address is pingable (online).  If not                                         *
rem *              send a text message using gmail.  (I know this code could be tightened up... but it works.       *
rem *                                                                                                               *
rem *  Components:  BLAT.exe ( https://sourceforge.net/projects/blat/?source=typ_redirect)                          *
rem *               STUNNEL.exe (https://www.stunnel.org/downloads.html)                                            *
rem *                    Follow these instructions to install the above:                                            *
rem *                    https://blog.frogslayer.com/sending-an-email-through-google-smtp-via-windows-command-line/ *
rem *                                                                                                               *
rem *  IMPORTANT:  Password is stored unencrypted in this batch file.  So do not use an important e-mail account    *
rem *                                                                                                               *
rem *  Create date:  2017-10-29 DJJ                                                                                 *
rem *  Change log:                                                                                                  *
rem *                                                                                                               *
rem *****************************************************************************************************************

rem *** This is gmail's server
set SERVER=127.0.0.1:1099

set [email protected]
set PW=your-gmail-password-here
set FROMNAME=your-name

rem ***   Put the send-to phone number for SMS below.  "@vtext.com" works for verizon, you'd have to find appropriate domain for your carrier.
set [email protected]
set SUBJECT1="Miner1 did not respond to ping"
set SUBJECT2="Miner2 did not respond to ping"
set SUBJECT3="Miner3 did not respond to ping"
set ONLINE1="Miner1 now responding to ping"
set ONLINE2="Miner2 now responding to ping"
set ONLINE3="Miner3 now responding to ping"

rem *** Note this will only work for static IP addresses.  You can also use computer name.  "set IPV4_MINER1=Miner1" (assuming "Miner1" is computer name).
set IPV4_MINER1=10.0.0.39
set IPV4_MINER2=10.0.0.40
set IPV4_MINER3=10.0.0.42
set IPV4_TEST=10.0.0.19

rem *** The idea behind the counter is I only want two messages sent to me when miner goes down.
set /a MINER1_CTR=1
set /a MINER2_CTR=1
set /a MINER3_CTR=1

:STARTPING1

PING -n 1 %IPV4_MINER1%
PING -n 1 %IPV4_MINER1%|find "TTL" >NUL
IF     ERRORLEVEL 1 goto :MINER1OFFLINE
IF %MINER1_CTR% NEQ 1 (
   blat -server %SERVER% -f %FROMNAME% -u %USER% -pw %PW% -to %TO% -subject %ONLINE1% -body "%DATE% - %TIME%"
   set /a MINER1_CTR=1
   )
goto :STARTPING2

:MINER1OFFLINE

if %MINER1_CTR% gtr 2 goto :STARTPING2
blat -server %SERVER% -f %FROMNAME% -u %USER% -pw %PW% -to %TO% -subject %SUBJECT1% -body "%DATE% - %TIME%"
set /a MINER1_CTR+=1

:STARTPING2
PING -n 1 %IPV4_MINER2%
PING -n 1 %IPV4_MINER2%|find "TTL" >NUL
IF     ERRORLEVEL 1 goto :MINER2OFFLINE
IF %MINER2_CTR% NEQ 1 (
   blat -server %SERVER% -f %FROMNAME% -u %USER% -pw %PW% -to %TO% -subject %ONLINE2% -body "%DATE% - %TIME%"
   set /a MINER2_CTR=1
   )
goto :STARTPING3

:MINER2OFFLINE

if %MINER2_CTR% gtr 2 goto :WAIT
blat -server %SERVER% -f %FROMNAME% -u %USER% -pw %PW% -to %TO% -subject %SUBJECT2% -body "%DATE% - %TIME%"
set /a MINER2_CTR+=1

:STARTPING3
PING -n 1 %IPV4_MINER3%
PING -n 1 %IPV4_MINER3%|find "TTL" >NUL
IF     ERRORLEVEL 1 goto :MINER3OFFLINE
IF %MINER2_CTR% NEQ 1 (
   blat -server %SERVER% -f %FROMNAME% -u %USER% -pw %PW% -to %TO% -subject %ONLINE3% -body "%DATE% - %TIME%"
   set /a MINER3_CTR=1
   )
goto :STARTPING4

:MINER3OFFLINE

if %MINER3_CTR% gtr 2 goto :WAIT
blat -server %SERVER% -f %FROMNAME% -u %USER% -pw %PW% -to %TO% -subject %SUBJECT3% -body "%DATE% - %TIME%"
set /a MINER3_CTR+=1

:STARTPING4

:WAIT

rem ** Wait 10 minutes and try again.
timeout /t 600
goto :STARTPING1
member
Activity: 146
Merit: 10
Totally agree!  One way I helped with the automation on that is to have a non-mining PC that is on the same network do a ping to the miner at a specific time interval.  If the ping fails, then it sends a text to my phone and make it my decision on whether or not to re-boot via the smart plug.  (That central PC could also issue the command to the smart plug to reboot, but I figured at some point a human has to get involved).

Here's a snippet of code from that .bat


:STARTPING1

PING -n 1 %IPV4_MINER1%
PING -n 1 %IPV4_MINER1%|find "TTL" >NUL
IF     ERRORLEVEL 1 goto :MINER1OFFLINE
IF %MINER1_CTR% NEQ 1 (
   blat -server %SERVER% -f %FROMNAME% -u %USER% -pw %PW% -to %TO% -subject %ONLINE1% -body "%DATE% - %TIME%"
   set /a MINER1_CTR=1
   )
goto :STARTPING2

:MINER1OFFLINE

if %MINER1_CTR% gtr 2 goto :STARTPING2
blat -server %SERVER% -f %FROMNAME% -u %USER% -pw %PW% -to %TO% -subject %SUBJECT1% -body "%DATE% - %TIME%"
set /a MINER1_CTR+=1

:STARTPING2

can you attach here the bat file Smiley not so practice with that Cheesy
sr. member
Activity: 616
Merit: 250
Do you know if it is possible to ping a Teamviewer id instead ip number ?

Because ip number can be changed, teamviewer id still the same.
newbie
Activity: 17
Merit: 0
Totally agree!  One way I helped with the automation on that is to have a non-mining PC that is on the same network do a ping to the miner at a specific time interval.  If the ping fails, then it sends a text to my phone and make it my decision on whether or not to re-boot via the smart plug.  (That central PC could also issue the command to the smart plug to reboot, but I figured at some point a human has to get involved).

Here's a snippet of code from that .bat


:STARTPING1

PING -n 1 %IPV4_MINER1%
PING -n 1 %IPV4_MINER1%|find "TTL" >NUL
IF     ERRORLEVEL 1 goto :MINER1OFFLINE
IF %MINER1_CTR% NEQ 1 (
   blat -server %SERVER% -f %FROMNAME% -u %USER% -pw %PW% -to %TO% -subject %ONLINE1% -body "%DATE% - %TIME%"
   set /a MINER1_CTR=1
   )
goto :STARTPING2

:MINER1OFFLINE

if %MINER1_CTR% gtr 2 goto :STARTPING2
blat -server %SERVER% -f %FROMNAME% -u %USER% -pw %PW% -to %TO% -subject %SUBJECT1% -body "%DATE% - %TIME%"
set /a MINER1_CTR+=1

:STARTPING2
full member
Activity: 350
Merit: 100
I’m glad I could help! 

I've found that the temperature falls pretty fast (within about 5-10 seconds).

I’d suggest putting a timer before automatically restarting… or some feature that allows you to stop the auto-restart.  It’s really annoying when I stop the miner for some rig maintenance, then the darn thing automatically reboots!

If you’re looking for information on how to send a text from a batch file, I found this article helpful.   https://blog.frogslayer.com/sending-an-email-through-google-smtp-via-windows-command-line/

One more thing I’ve found to help improve my uptime is the ability to reboot my rig from my phone when it’s totally hung up and I’m not home.  A device similar to “Z-Wave Plus Wireless Smart Lighting Control Appliance Module” ($40 Amazon) is very helpful!  Using that with TeamViewer on my phone really helps me monitor/control the health of my rigs.


Yes I put 30 seconds before it restarts the rig and in addition I check the internet connection,  if it is lost I don't want the rig loop restart.

I have similar device, if it lags i force restart, there is also usb watchdog do the same automatically i will test.

The email send maybe will be the long part to configure but for now i am pretty happy.



Issue I was having is these scripts don't work if the entire rig freezes so you 100% need a smart plug or another way to remote reboot the actual PSU
sr. member
Activity: 616
Merit: 250
I’m glad I could help! 

I've found that the temperature falls pretty fast (within about 5-10 seconds).

I’d suggest putting a timer before automatically restarting… or some feature that allows you to stop the auto-restart.  It’s really annoying when I stop the miner for some rig maintenance, then the darn thing automatically reboots!

If you’re looking for information on how to send a text from a batch file, I found this article helpful.   https://blog.frogslayer.com/sending-an-email-through-google-smtp-via-windows-command-line/

One more thing I’ve found to help improve my uptime is the ability to reboot my rig from my phone when it’s totally hung up and I’m not home.  A device similar to “Z-Wave Plus Wireless Smart Lighting Control Appliance Module” ($40 Amazon) is very helpful!  Using that with TeamViewer on my phone really helps me monitor/control the health of my rigs.


Yes I put 30 seconds before it restarts the rig and in addition I check the internet connection,  if it is lost I don't want the rig loop restart.

I have similar device, if it lags i force restart, there is also usb watchdog do the same automatically i will test.

The email send maybe will be the long part to configure but for now i am pretty happy.
newbie
Activity: 17
Merit: 0
I’m glad I could help! 

I've found that the temperature falls pretty fast (within about 5-10 seconds).

I’d suggest putting a timer before automatically restarting… or some feature that allows you to stop the auto-restart.  It’s really annoying when I stop the miner for some rig maintenance, then the darn thing automatically reboots!

If you’re looking for information on how to send a text from a batch file, I found this article helpful.   https://blog.frogslayer.com/sending-an-email-through-google-smtp-via-windows-command-line/

One more thing I’ve found to help improve my uptime is the ability to reboot my rig from my phone when it’s totally hung up and I’m not home.  A device similar to “Z-Wave Plus Wireless Smart Lighting Control Appliance Module” ($40 Amazon) is very helpful!  Using that with TeamViewer on my phone really helps me monitor/control the health of my rigs.
sr. member
Activity: 616
Merit: 250
Here’s an alternative for you.  Install Hardware Info64 (HWiNFO).  Within that tool on the “Alerts” tab you can trigger a batch file when a sensor exceeds a boundary you define.  For instance, I have it set to send me a text message (via BLAT) whenever my GPU temperatures fall below 30c (which means they are not working).

The batch file could also trigger the “shutdown /r” command.


Really cool is that what I am searching for months.

Thank you a lot.

Maybe is more faster to look at wattage instead temperature.

BTW i write a batch, when temperature is less than 55 degrees it restart miner automatically.

Maybe it is better make 2 alerts.
If a gpu still with low temp the system will restart.

newbie
Activity: 17
Merit: 0
Here’s an alternative for you.  Install Hardware Info64 (HWiNFO).  Within that tool on the “Alerts” tab you can trigger a batch file when a sensor exceeds a boundary you define.  For instance, I have it set to send me a text message (via BLAT) whenever my GPU temperatures fall below 30c (which means they are not working).

The batch file could also trigger the “shutdown /r” command.
sr. member
Activity: 616
Merit: 250
Pages:
Jump to: