Bitcoin Forum
May 14, 2024, 08:58:50 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Mining software (miners) / cgminer-monitor: Simple monitor script for cgminer in python. Alert/HTTP/console on: June 12, 2013, 12:24:19 AM
cgminer-monitor

Simple monitor script for cgminer in python.
Console display, http server, email alerts. No additional modules required.


Tested with python 2.7.2 and cgminer 3.2.0.

usage: cgminer-monitor.py [command] [parameter]


Monitor mode
cgminer-monitor.py
 - Monitors cgminer by checking a few critical values
 - Emails if something is wrong
 - Restarts cgminer if the GPU is sick or dead
 - Runs a dead simple http server that only serves a page with the results of the monitor (identical to the console output with a nice display)
 - Monitors MMFCE pools and display the current balance in their currencies
 - Could support multi-gpus very easily (see comment in the code)
 - CTRL+C to stop everything








Command mode
cgminer-monitor.py somecommand someoptionalparameter
 - Ouputs the results returned by cgminer miner and exits
 - Examples:
    - cgminer-monitor.py summary
    - cgminer-monitor.py gpu 0
    - See cgminer's API-README for all available commands


Credits
CGMinerClient class based on WyseNynja's gist https://gist.github.com/WyseNynja/1500780

Notes
I know there are a bunch of watchers, web interfaces and all but they are far too advanced for my light mining. I didn't want to have to run somone's .exe or have to compile it myself, or install apache/php, etc.
I just wanted the simplest thing so I made this single python script (about 200 lines without the comments) to do everything listed above. There is no install or anything, just set a couple of config values at the top and run it.

It only supports 1 GPU (because I've only one :/) but that should be as simple as adding a for loop and changing a couple of indexes to support multi gpus.

Updates

06/22/2013:
Monitors MMFCE pools + minor improvements
  • Monitors MMFCE pools and display the current balance in their currencies (web page only)
  • Display the current pool URL
  • Don't send a warning email in the first 10 seconds (hashrate takes a bit to get stable)
  • Use a smaller font for the web page
  • Ignore requests on /favicon.ico that most browsers send
  • Faster shutdown with CTRL+C (within 1 second)


https://github.com/shazbits/cgminer-monitor

BTC 1Kcn1Hs76pbnBpBQHwdsDmr3CZYcoCAwjj
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!