Bitcoin Forum
October 21, 2017, 01:30:22 AM *
News: Latest stable version of Bitcoin Core: 0.15.0.1  [Torrent]. (New!)
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: cgminer_pipe.py - client for bash scripts, examples  (Read 827 times)
martivo
Newbie
*
Offline Offline

Activity: 1


View Profile
February 08, 2014, 11:06:22 AM
 #1

Hello,

i wrote a few scripts for my own mining rig, maybe someone else is also interested.
I have not tested this on windows/mac, so it might not work.

About my setup and how I use these scripts:
water cooled silent system, no noise or temp issues
I use the computer also for other stuff(work, movies, whatever)
when i move the mouse/press keys, then quiet profile is selected, memory and gpu and intensity go to a low level so that i can normally work and use my pc
If the system is idle for 5 minutes, then it goes to average profile, slightly higher clock and intensity, also if certain programs are runing (vlc, xmms ...) it will go there even if not idle, also it will not go to full load when these programs run.
When the system is idle for 60 minutes, it turns off displays and goes into full mining mode. (if the list of programs are not running) This way you can watch movies.
I also changed acpid configuration so when the power button is pressed it goes immediately to the full load, until the mouse or keyboard is moved again. ( it simply creates a file)

This is also awesome if you are testing new clocks, since you do not have to restart cgminer and you can immediately change back to lower clock by moving the mouse (here you might want to disable the turning off of the screens, just comment out the xset dpms...)
Can also be used for pool rotation, example included.


cgminer_pipe.py
  • send all supported api commands to cgminer api and get bash / shell script friendly output
  • easy to use from command line
  • grep and cut all you want

activity_monitor.sh
  • monitors X activity or running programs and change the "profile" accordingly.
  • force full load even if X is used (touch a file)
  • turn off monitors when full load is activated (save power!)
  • 3 profiles (quiet, average, fast)
  • profile changes intensity, memory clock and gpu clock
  • easy to adapt for multiple cards or just one card.
Be sure to modify the activity_monitor.sh for your rig!

Link also includes examples for cgminer_pipe.py usage
  • change intensity
  • change gpu clock
  • List pools
  • Add pool
  • Rotate 2 pools every X hours

See http://wiki.loovsys.eu/index.php/Cgminer_API_python_client_for_bash_and_shell_script_for_profiling_when_system_is_idle

If you don't like it don't use it, if you like it feel free to donate.
Just my contribution to the community.

BTC 12Nfc9LANAd4HNoVUxSw23kyKvpaLkKYGG
"Your bitcoin is secured in a way that is physically impossible for others to access, no matter for what reason, no matter how good the excuse, no matter a majority of miners, no matter what." -- gmaxwell
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1508549422
Hero Member
*
Offline Offline

Posts: 1508549422

View Profile Personal Message (Offline)

Ignore
1508549422
Reply with quote  #2

1508549422
Report to moderator
1508549422
Hero Member
*
Offline Offline

Posts: 1508549422

View Profile Personal Message (Offline)

Ignore
1508549422
Reply with quote  #2

1508549422
Report to moderator
1508549422
Hero Member
*
Offline Offline

Posts: 1508549422

View Profile Personal Message (Offline)

Ignore
1508549422
Reply with quote  #2

1508549422
Report to moderator
Mautje
Jr. Member
*
Offline Offline

Activity: 32


View Profile
April 30, 2014, 11:39:04 PM
 #2

I do like it!

I changed it a bit for my needs, I added a command line option to include an ip address (so I can run a crontab bash script every few minutes to check the cgminer API if there is a hashrate to detect hung rigs). I run the python script in a loop for all ip's.

Anyway here's the new script
http://pastebin.com/BYLVLCER

use it as follows:
echo summary@192.168.1.1 | cgminer_pipe.py

or for my needs, just check the hashrate:
echo summary@192.168.1.1 | cgminer_pipe.py | grep 'KHS 5s:\|MHS 5s:'

(other api calls just replace summary with call1:call2 etc.)

I'll give you a donation. Is your BTC address still valid? Don't want those coins to get lost Smiley

donation:
13Pfw8dexZ5kYi18LgCY6gDfRaKUEDyUqA


!Sharecoin! STVSaFxHcs7tabPCfHuNA82zUh5DPofbAr
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!