Bitcoin Forum
May 09, 2024, 03:58:16 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Bitcoin Technical Support / Limiting CPU usage while contributing to Bitcoin on: April 06, 2011, 01:10:06 PM
Audience: you could be interested on limiting CPU usage of bitcoind while mining (gen=1 in your bitcoin.conf) if:

  • You are motivated to contribute (modest, but actually) to the global effort to verify Bitcoin transactions.
  • Definitively, you are *not* suffering from BC-gold Fever.
  • You do *not* want to hear roaring fans every time Bitcoin is instructed to generate hashes.
  • You are an happy user of an Unix box

Assuming your bitcoin.conf file includes "gen=1", and you want to allow a 10% of CPU usage. A quite simple solution, from command line:
Code:
bitcoind
cpulimit -z -l 10 -p `pidof bitcoind` &

A more elaborated solution, i.e. this piece of code from a Bash script:
Code:
OPID=($(pidof bitcoind))
su bitcoin -c "$BITCOIND_DIR/bitcoind -datadir=$TEST_DATA $*"
BPID=$(pidof ${OPID[@]/#/-o } bitcoind)
if [[ -n $BPID ]]; then (cpulimit -z -l 10 -p $BPID &); fi

[Likely, you will need to get the cpulimit package: apt-get install cpulimit]

Please, test and feedback, JP
2  Bitcoin / Bitcoin Technical Support / Apache HTTPD Configuration for Bitcoin JS Remote on: March 27, 2011, 09:08:04 PM
Dear friends,
I have just added a short wiki fragment with the proper configuration to access remotely Bitcoin daemon using a browser.

Thanks for a great piece of code: Bitcoin JS Remote.

Please, test and feedback:
https://en.bitcoin.it/wiki/Bitcoin-js-remote

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!