CGMiner-Monitor and CommanderAdvanced monitoring and commanding python script with console display, http server, and email alerts.
Enables cgminer to be controlled remotely without ssh by using encrypted emails with specific subjects and bodies to communicate from the commander script to the monitor script. This script is also extremely configurable, allowing for every aspect of it to be modified to the user's liking.
Works on GNU/Linux, may need some modification to work on other platforms.
https://github.com/JSmith-BitFlipper/cgminer-monitorTested with python 2.7.3 and cgminer 3.7.2.
Additional crypto modules for the email encryption may be needed.
CGMiner-Monitor scriptcgminer-monitor.py
- Supports multi-gpu setups
- Checks for incoming commands from the Commander script as a system for remote commanding of miner without ssh
- Supports Email encryption (AES) for added security
- Monitors cgminer by checking critical values
- Emails if something is wrong
- Checks the Internet connection periodically
- 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
- CTRL+C to stop the script
- Extremely configurable allowing all aspects to be changed to the user's liking
Usage for the Cgminer-Commander Scriptcgminer-commander.py
- If configured correctly, handles all of the formating and encryption of emails
- When sending command emails, specific format must be followed
- The commands are from cgminer's API, a list of the commands can be found in cgminer's API-README file
Format: command, parameter1, parameter2, etc;
Example:
gpu, 0;
gpuintensity, 0, 13;
status;
quit;
- API commands executed from top to bottom
- Replies from cgminer's API will be emailed back
CreditsCGMinerClient class based on WyseNynja's gist
https://gist.github.com/WyseNynja/1500780cgminer-monitor.py based on
https://github.com/shazbits/cgminer-monitorCommentsI know there are plenty of monitors for miners, yet none suited my needs. I improved this monitor from shazbits' to be able to command my miner remotely. I also added some more customization and created an entire commander script that does the formating and encryption. This monitor/commander bundle is a simple alternative to ssh'ing and is easier to setup. It is fairly lightweight and small in size, and there is no need for compilation. It still does not compensate the security factor.
Setup1. Install python-pip in order to install the necessary modules (replace apt-get with your distro installation manager)
sudo apt-get install python-pip
2. Install the python development headers needed to install the crypto modules
sudo apt-get install python-dev
3. Install crypto modules
sudo pip install pycrypto
4. Open cgminer-monitor.py in an editor and set the user configurations at the top
5. Open cgminer-commander.py in an editor and set the user configurations at the top
6. Run the scripts
sudo python cgminer-monitor.py
Starts the monitor, run this on the mining rig
python cgminer-commander.py
Starts the commander, run this on the commanding computer
*Note*In order for the script to use the cgminer's api, '--api-listen --api-allow W:127.0.0.1' must be included in the cgminer command or configuration file