Bitcoin Forum
April 26, 2024, 09:06:02 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: [ANN] cgminer-keep-alive - a cgminer watchdog  (Read 1279 times)
dbsnurr (OP)
Newbie
*
Offline Offline

Activity: 30
Merit: 0


View Profile
January 09, 2014, 06:29:06 PM
 #1

Hi everyone!

Last night I started working on a script to monitor cgminer and restart it when it crashes. I've tried it out during the day and it is pretty stable now so I thought I'd share it with you all.

All in all it consists of two files, a powershell script and an optional batch file. The powershell script parses cgminer's log and looks for "bad" words, like SICK, DEAD, etc. Whenever it detects one of these words in the log it kills the cgminer process (as well as WerFault.exe, which is the standard windows 7 error message informing the user of an app crash).

After the cgminer process is killed it starts a new instance of cgminer by calling the accompanying startmine.bat file. If you don't like batch files you can easily configure the script to start cgminer.exe directly (more info on the github).

Tell me what you think about it or if you have any issues just ask me here or add a new issue on the github.

Github: https://github.com/dbsnurr/cgminer-keep-alive
1714122362
Hero Member
*
Offline Offline

Posts: 1714122362

View Profile Personal Message (Offline)

Ignore
1714122362
Reply with quote  #2

1714122362
Report to moderator
"With e-currency based on cryptographic proof, without the need to trust a third party middleman, money can be secure and transactions effortless." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714122362
Hero Member
*
Offline Offline

Posts: 1714122362

View Profile Personal Message (Offline)

Ignore
1714122362
Reply with quote  #2

1714122362
Report to moderator
_4Char
Newbie
*
Offline Offline

Activity: 22
Merit: 0


View Profile WWW
January 15, 2014, 06:32:44 PM
 #2

CGWatcher..?
dbsnurr (OP)
Newbie
*
Offline Offline

Activity: 30
Merit: 0


View Profile
January 17, 2014, 02:24:56 PM
Last edit: January 22, 2014, 11:59:41 PM by dbsnurr
 #3

CGWatcher..?

Sure you can use cgwatcher or any other of the multiple cgminer monitor programs out there. Personally, I was a bit deterred to use cgwatcher seeing as the author hasn't published the source code. The other programs all required something to be installed on the machine (python, php, libraries/dependencies etc.). I wrote this program to use for my own needs using only the tools that recent versions of Windows provide by default.

Update regarding cgminer-keep-alive
This weekend I'll update the repo with some new features such as:

  • Email - Send an email when cgminer craches (smtp server required).
  • Simple statistics - number of cgminer/server restarts, cgminer/server uptime
  • Better log monitoring - Check if log has been written to since the last cycle, otherwise restart cgminer

If you want to request a feature to be added or have discovered a bug, feel free to add an issue on the github.

EDIT: Unfortunately I didn't have time to implement any of those things and instead had to work on polishing up the existing code. Will update when the planned features are added.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!