README 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. This is a multi-threaded multi-pool CPU and GPU miner for bitcoin.
  2. License: GPLv2. See COPYING for details.
  3. Dependencies:
  4. libcurl http://curl.haxx.se/libcurl/
  5. libncurses5-dev (or libpdcurses on WIN32)
  6. pkg-config http://www.freedesktop.org/wiki/Software/pkg-config
  7. jansson http://www.digip.org/jansson/
  8. (jansson is included in-tree and not necessary)
  9. Basic *nix build instructions:
  10. To build with GPU mining support:
  11. Install AMD APP sdk, latest version - there is no official place to
  12. install it so just keep track of where it is if you're not installing
  13. the include files and library files into the system directory.
  14. (Do NOT install the ati amd sdk if you are on nvidia)
  15. The easiest way to install the ATI AMD SPP sdk on linux is to actually put it
  16. into a system location. Then building will be simpler. Download the correct
  17. version for either 32 bit or 64 bit from here:
  18. http://developer.amd.com/sdks/AMDAPPSDK/downloads/Pages/default.aspx
  19. This will give you a file with a name like AMD-APP-SDK-v2.4-lnx64.tgz
  20. Then:
  21. sudo su
  22. cd /opt
  23. tar xf /path/to/AMD-APP-SDK-v2.4-lnx64.tgz
  24. cd /
  25. tar xf /opt/AMD-APP-SDK-v2.4-lnx64/icd-registration.tgz
  26. ln -s /opt/AMD-APP-SDK-v2.4-lnx64/include/CL /usr/include
  27. ln -s /opt/AMD-APP-SDK-v2.4-lnx64/lib/x86_64/* /usr/lib/
  28. ldconfig
  29. If you are on 32 bit, x86_64 in the 2nd last line should be x86
  30. To actually build:
  31. ./autogen.sh # only needed if building from git repo
  32. CFLAGS="-O2 -Wall -march=native" ./configure
  33. or if you haven't installed the ati files in system locations:
  34. CFLAGS="-O2 -Wall -march=native -I<path to AMD APP include>" LDFLAGS="-L<path to AMD APP lib/x86_64> ./configure
  35. make
  36. If it finds the opencl files it will inform you with
  37. "OpenCL: FOUND. GPU mining support enabled."
  38. Basic WIN32 build instructions (on Fedora 13; requires mingw32):
  39. ./autogen.sh # only needed if building from git repo
  40. rm -f mingw32-config.cache
  41. MINGW32_CFLAGS="-O2 -Wall -msse2" mingw32-configure
  42. make
  43. ./mknsis.sh
  44. Native WIN32 build instructions (on mingw32, on windows):
  45. Install the Microsoft platform SDK
  46. Install AMD APP sdk, latest version (only if you want GPU mining)
  47. (Do NOT install the ati amd sdk if you are on nvidia)
  48. Install mingw32
  49. Install libcurl, copy libcurl.m4 into /mingw/share/aclocal
  50. Install pkg-config, copy pkg.m4 into /mingw/share/aclocal
  51. Run:
  52. autoreconf -fvi
  53. CFLAGS="-O2 -msse2" ./configure
  54. make
  55. Usage instructions: Run "cgminer --help" to see options.
  56. ---
  57. EXECUTIVE SUMMARY ON USAGE:
  58. Single pool, regular desktop:
  59. cgminer -o http://pool:port -u username -p password
  60. Single pool, dedicated miner:
  61. cgminer -o http://pool:port -u username -p password -I 8
  62. Multiple pool, dedicated miner:
  63. cgminer -o http://pool1:port -u pool1username -p pool1password -o http://pool2:port -u pool2usernmae -p pool2password -I 8
  64. ---
  65. WHILE RUNNING:
  66. The following options are available while running with a single keypress:
  67. [P]ool management [S]ettings [D]isplay options [Q]uit
  68. P gives you:
  69. Current pool management strategy: Failover
  70. [A]dd pool [R]emove pool [D]isable pool [E]nable pool
  71. [C]hange management strategy [S]witch pool [I]nformation
  72. S gives you:
  73. [D]ynamic mode: On
  74. [L]ongpoll: On
  75. [I]ntensity: Dynamic
  76. [Q]ueue: 0
  77. [S]cantime: 60
  78. [R]etries: -1
  79. [P]ause: 5
  80. D gives you:
  81. Toggle: [D]ebug [N]ormal [S]ilent [V]erbose [R]PC debug
  82. [L]og interval [C]lear
  83. and Q quits the application.
  84. ---
  85. Also many issues and FAQs are covered in the forum thread
  86. dedicated to this program,
  87. http://forum.bitcoin.org/index.php?topic=28402.0
  88. The output line shows the following:
  89. [(5s):204.4 (avg):203.1 Mh/s] [Q:56 A:51 R:4 HW:0 E:91% U:2.47/m]
  90. Each column is as follows:
  91. A 5 second exponentially decaying average hash rate
  92. An all time average hash rate
  93. The number of requested work items
  94. The number of accepted shares
  95. The number of rejected shares
  96. The number of hardware erorrs
  97. The efficiency defined as the accepted shares / requested work
  98. The utility defines as the number of shares / minute
  99. The cgminer status line shows:
  100. TQ: 1 ST: 1 LS: 0 SS: 0 DW: 0 NB: 1 LW: 8 LO: 1 RF: 1 I: 2
  101. TQ is Total Queued work items.
  102. ST is STaged work items (ready to use).
  103. LS is Longpoll Staged work items (mandatory new work)
  104. SS is Stale Shares discarded (detected and not submitted so don't count as rejects)
  105. DW is Discarded Work items (work from block no longer valid to work on)
  106. NB is New Blocks detected on the network
  107. LW is Locally generated Work items (during slow server providing work)
  108. LO is Local generation Occasions (server slow to provide work)
  109. RF is Remote Fail occasions (server slow to accept work)
  110. I is current Intensity (changes in dynamic mode).
  111. NOTE: Running intensities above 9 with current hardware is likely to only
  112. diminish return performance even if the hash rate might appear better. A good
  113. starting baseline intensity to try on dedicated miners is 8. Higher values are
  114. there to cope with future improvements in hardware.
  115. FAILOVER STRATEGIES WITH MULTIPOOL:
  116. A number of different strategies for dealing with multipool setups are
  117. available. Each has their advantages and disadvantages so multiple strategies
  118. are available by user choice, as per the following list:
  119. FAILOVER:
  120. The default strategy is failover. This means that if you input a number of
  121. pools, it will try to use them as a priority list, moving away from the 1st
  122. to the 2nd, 2nd to 3rd and so on. If any of the earlier pools recover, it will
  123. move back to the higher priority ones.
  124. ROUND ROBIN:
  125. This strategy only moves from one pool to the next when the current one falls
  126. idle and makes no attempt to move otherwise.
  127. ROTATE:
  128. This strategy moves at user-defined intervals from one active pool to the next,
  129. skipping pools that are idle.
  130. LOAD BALANCE:
  131. This strategy sends work in equal amounts to all the pools specified. If any
  132. pool falls idle, the rest will take up the slack keeping the miner busy.
  133. ---
  134. LOGGING
  135. cgminer will log to stderr if it detects stderr is being redirected to a file.
  136. To enable logging simply add 2>logfile.txt to your command line and logfile.txt
  137. will contain the logged output at the log level you specify (normal, verbose,
  138. debug etc.)
  139. In other words if you would normally use:
  140. ./cgminer -o xxx -u yyy -p zzz
  141. if you use
  142. ./cgminer -o xxx -u yyy -p zzz 2>logfile.txt
  143. it will log to a file called logfile.txt and otherwise work the same.
  144. ---
  145. This code is provided entirely free of charge by the programmer in his spare
  146. time so donations would be greatly appreciated.
  147. Con Kolivas <kernel@kolivas.org>
  148. 15qSxP1SQcUX3o4nhkfdbgyoWEFMomJ4rZ