cgminer-monitorSimple 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 modecgminer-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
![](https://ip.bitcointalk.org/?u=http%3A%2F%2Fwww.shazbits.com%2Fimages%2Fcgminer-monitor.png&t=665&c=EGYwVCcMX7t3zg)
![](https://ip.bitcointalk.org/?u=http%3A%2F%2Fwww.shazbits.com%2Fimages%2Fcgminer-monitor-iphone_tn.png&t=665&c=0-_BW0yZs4tsgw)
Command modecgminer-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
CreditsCGMinerClient class based on WyseNynja's gist
https://gist.github.com/WyseNynja/1500780NotesI 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.
Updates06/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-monitorBTC 1Kcn1Hs76pbnBpBQHwdsDmr3CZYcoCAwjj