erer


SUBMITTED BY: Guest

DATE: May 20, 2014, 6:58 p.m.

FORMAT: Text only

SIZE: 17.1 kB

HITS: 1195

  1. # sgminer
  2. ## Introduction
  3. This is a multi-threaded multi-pool GPU miner with ATI GPU monitoring,
  4. (over)clocking and fanspeed support for scrypt-based coins. It is based on
  5. cgminer by Con Kolivas (ckolivas), which is in turn based on cpuminer by
  6. Jeff Garzik (jgarzik).
  7. **releases**: https://github.com/veox/sgminer/releases
  8. **git tree**: https://github.com/veox/sgminer
  9. **issues**: https://github.com/veox/sgminer/issues
  10. **irc**: `#sgminer` on freenode
  11. License: GPLv3. See `COPYING` for details.
  12. ## Documentation
  13. Documentation is available in directory `doc`. For details on several topics, see:
  14. * `API` for the RPC API specification;
  15. * `FAQ` for frequently asked questions;
  16. * `GPU` for semi-obsolete information on GPU configuration options and mining SHA256d-based coins;
  17. * `KERNEL.md` for OpenCL kernel-related information;
  18. * `MINING` for how to find the right balance in GPU configuration to mine Scrypt-based coins effectively;
  19. * `windows-build.txt` for information on how to build on Windows.
  20. Note that **most of the documentation is outdated**. If you want to contribute, fork this repository, update as needed, and submit a pull request.
  21. ## Building
  22. ### Dependencies
  23. Mandatory:
  24. curl dev library http://curl.haxx.se/libcurl/
  25. (libcurl4-openssl-dev)
  26. pkg-config http://www.freedesktop.org/wiki/Software/pkg-config
  27. libtool hhttp://www.gnu.org/software/libtool/
  28. AMD APP SDK http://developer.amd.com/tools-and-sdks/heterogeneous-computing/amd-accelerated-parallel-processing-app-sdk/downloads/
  29. Optional:
  30. curses dev library
  31. (libncurses5-dev or libpdcurses on WIN32 for text user interface)
  32. AMD ADL SDK http://developer.amd.com/tools-and-sdks/graphics-development/display-library-adl-sdk/
  33. (Version 5 or 6, required for ATI GPU monitoring & clocking)
  34. If building from git:
  35. autoconf
  36. automake
  37. sgminer-specific configuration options:
  38. --disable-adl Override detection and disable building with adl
  39. --without-curses Do not compile support for curses TUI
  40. ### *nix build instructions
  41. If needed, place include headers (`*.h` files) from `ADL_SDK_*<VERSION>*.zip` in `sgminer/ADL_SDK`.
  42. Then:
  43. autoreconf -i
  44. CFLAGS="-O2 -Wall -march=native" ./configure <options>
  45. make
  46. To compile a debug version, replace `-O2` with `-ggdb`.
  47. Systemwide installation is optional. You may run `sgminer` from the build
  48. directory directly, or `make install` if you wish to install
  49. `sgminer` to a system location or a location you specified with `--prefix`.
  50. ### Windows build instructions
  51. See `doc/windows-build.txt` (might be outdated).
  52. ## Basic Usage
  53. **WARNING**: documentation below this point has not been updated since the
  54. fork.
  55. After saving configuration from the menu, you do not need to give sgminer
  56. any arguments and it will load your configuration.
  57. Any configuration file may also contain a single
  58. "include" : "filename"
  59. to recursively include another configuration file.
  60. Writing the configuration will save all settings from all files in the
  61. output.
  62. Single pool:
  63. sgminer -o http://pool:port -u username -p password
  64. Multiple pools:
  65. sgminer -o http://pool1:port -u pool1username -p pool1password -o http://pool2:port -u pool2usernmae -p pool2password
  66. Single pool with a standard http proxy, regular desktop:
  67. sgminer -o "http:proxy:port|http://pool:port" -u username -p password
  68. Single pool with a socks5 proxy, regular desktop:
  69. sgminer -o "socks5:proxy:port|http://pool:port" -u username -p password
  70. Single pool with stratum protocol support:
  71. sgminer -o stratum+tcp://pool:port -u username -p password
  72. The list of proxy types are:
  73. http: standard http 1.1 proxy
  74. http0: http 1.0 proxy
  75. socks4: socks4 proxy
  76. socks5: socks5 proxy
  77. socks4a: socks4a proxy
  78. socks5h: socks5 proxy using a hostname
  79. If you compile sgminer with a version of CURL before 7.19.4 then some of
  80. the above will not be available. All are available since CURL version
  81. 7.19.4.
  82. If you specify the --socks-proxy option to sgminer, it will only be
  83. applied to all pools that don't specify their own proxy setting like
  84. above.
  85. For more advanced usage , run `sgminer --help`.
  86. See `doc/GPU` for more information regarding GPU mining and
  87. `doc/SCRYPT` for more information regarding Scrypt mining.
  88. ## Runtime usage
  89. The following options are available while running with a single keypress:
  90. [P]ool management [G]PU management [S]ettings [D]isplay options [Q]uit
  91. P gives you:
  92. Current pool management strategy: Failover
  93. [F]ailover only disabled
  94. [A]dd pool [R]emove pool [D]isable pool [E]nable pool
  95. [C]hange management strategy [S]witch pool [I]nformation
  96. S gives you:
  97. [Q]ueue: 1
  98. [S]cantime: 60
  99. [E]xpiry: 120
  100. [W]rite config file
  101. [C]gminer restart
  102. D gives you:
  103. [N]ormal [C]lear [S]ilent mode (disable all output)
  104. [D]ebug:off
  105. [P]er-device:off
  106. [Q]uiet:off
  107. [V]erbose:off
  108. [R]PC debug:off
  109. [W]orkTime details:off
  110. co[M]pact: off
  111. [L]og interval:5
  112. Q quits the application.
  113. G gives you something like:
  114. GPU 0: [124.2 / 191.3 Mh/s] [A:77 R:33 HW:0 U:1.73/m WU 1.73/m]
  115. Temp: 67.0 C
  116. Fan Speed: 35% (2500 RPM)
  117. Engine Clock: 960 MHz
  118. Memory Clock: 480 Mhz
  119. Vddc: 1.200 V
  120. Activity: 93%
  121. Powertune: 0%
  122. Last initialised: [2011-09-06 12:03:56]
  123. Thread 0: 62.4 Mh/s Enabled ALIVE
  124. Thread 1: 60.2 Mh/s Enabled ALIVE
  125. [E]nable [D]isable [R]estart GPU [C]hange settings
  126. Or press any other key to continue
  127. The running log shows output like this:
  128. [2012-10-12 18:02:20] Accepted f0c05469 Diff 1/1 GPU 0 pool 1
  129. [2012-10-12 18:02:22] Accepted 218ac982 Diff 7/1 GPU 1 pool 1
  130. [2012-10-12 18:02:23] Accepted d8300795 Diff 1/1 GPU 3 pool 1
  131. [2012-10-12 18:02:24] Accepted 122c1ff1 Diff 14/1 GPU 1 pool 1
  132. The 8 byte hex value are the 2nd 8 bytes of the share being submitted to the
  133. pool. The 2 diff values are the actual difficulty target that share reached
  134. followed by the difficulty target the pool is currently asking for.
  135. The output line shows the following:
  136. (5s):1713.6 (avg):1707.8 Mh/s | A:729 R:8 HW:0 WU:22.53/m
  137. Each column is as follows:
  138. 5s: A 5 second exponentially decaying average hash rate
  139. avg: An all time average hash rate
  140. A: The total difficulty of Accepted shares
  141. R: The total difficulty of Rejected shares
  142. HW: The number of HardWare errors
  143. WU: The Work Utility defined as the number of diff1 shares work / minute
  144. (accepted or rejected).
  145. GPU 1: 73.5C 2551RPM | 427.3/443.0Mh/s | A:8 R:0 HW:0 WU:4.39/m
  146. Each column is as follows:
  147. Temperature (if supported)
  148. Fanspeed (if supported)
  149. A 5 second exponentially decaying average hash rate
  150. An all time average hash rate
  151. The total difficulty of accepted shares
  152. The total difficulty of rejected shares
  153. The number of hardware erorrs
  154. The work utility defined as the number of diff1 shares work / minute
  155. The sgminer status line shows:
  156. ST: 1 SS: 0 NB: 1 LW: 8 GF: 1 RF: 1
  157. ST is STaged work items (ready to use).
  158. SS is Stale Shares discarded (detected and not submitted so don't count as rejects)
  159. NB is New Blocks detected on the network
  160. LW is Locally generated Work items
  161. GF is Getwork Fail Occasions (server slow to provide work)
  162. RF is Remote Fail occasions (server slow to accept work)
  163. The block display shows:
  164. Block: 0074c5e482e34a506d2a051a... Started: [17:17:22] Best share: 2.71K
  165. This shows a short stretch of the current block, when the new block started,
  166. and the all time best difficulty share you've found since starting sgminer
  167. this time.
  168. ## Multipool
  169. ### Failover strategies
  170. A number of different strategies for dealing with multipool setups are
  171. available. Each has their advantages and disadvantages so multiple strategies
  172. are available by user choice, as per the following list:
  173. #### Failover
  174. The default strategy is failover. This means that if you input a number of
  175. pools, it will try to use them as a priority list, moving away from the 1st
  176. to the 2nd, 2nd to 3rd and so on. If any of the earlier pools recover, it will
  177. move back to the higher priority ones.
  178. #### Round robin
  179. This strategy only moves from one pool to the next when the current one falls
  180. idle and makes no attempt to move otherwise.
  181. #### Rotate
  182. This strategy moves at user-defined intervals from one active pool to the next,
  183. skipping pools that are idle.
  184. #### Load balance
  185. This strategy sends work to all the pools on a quota basis. By default, all
  186. pools are allocated equal quotas unless specified with --quota. This
  187. apportioning of work is based on work handed out, not shares returned so is
  188. independent of difficulty targets or rejected shares. While a pool is disabled
  189. or dead, its quota is dropped until it is re-enabled. Quotas are forward
  190. looking, so if the quota is changed on the fly, it only affects future work.
  191. If all pools are set to zero quota or all pools with quota are dead, it will
  192. fall back to a failover mode. See quota below for more information.
  193. The failover-only flag has special meaning in combination with load-balance
  194. mode and it will distribute quota back to priority pool 0 from any pools that
  195. are unable to provide work for any reason so as to maintain quota ratios
  196. between the rest of the pools.
  197. #### Balance
  198. This strategy monitors the amount of difficulty 1 shares solved for each pool
  199. and uses it to try to end up doing the same amount of work for all pools.
  200. ### Quotas
  201. The load-balance multipool strategy works off a quota based scheduler. The
  202. quotas handed out by default are equal, but the user is allowed to specify any
  203. arbitrary ratio of quotas. For example, if all the quota values add up to 100,
  204. each quota value will be a percentage, but if 2 pools are specified and pool0
  205. is given a quota of 1 and pool1 is given a quota of 9, pool0 will get 10% of
  206. the work and pool1 will get 90%. Quotas can be changed on the fly by the API,
  207. and do not act retrospectively. Setting a quota to zero will effectively
  208. disable that pool unless all other pools are disabled or dead. In that
  209. scenario, load-balance falls back to regular failover priority-based strategy.
  210. While a pool is dead, it loses its quota and no attempt is made to catch up
  211. when it comes back to life.
  212. To specify quotas on the command line, pools should be specified with a
  213. semicolon separated --quota(or -U) entry instead of --url. Pools specified with
  214. --url are given a nominal quota value of 1 and entries can be mixed.
  215. For example:
  216. --url poola:porta -u usernamea -p passa --quota "2;poolb:portb" -u usernameb -p passb
  217. Will give poola 1/3 of the work and poolb 2/3 of the work.
  218. Writing configuration files with quotas is likewise supported. To use
  219. the above quotas in a configuration file they would be specified thus:
  220. "pools" : [
  221. {
  222. "url" : "poola:porta",
  223. "user" : "usernamea",
  224. "pass" : "passa"
  225. },
  226. {
  227. "quota" : "2;poolb:portb",
  228. "user" : "usernameb",
  229. "pass" : "passb"
  230. }
  231. ]
  232. ### Extra File Configuration
  233. If you want to store a number of pools in your configuration file, but
  234. don't always want them automatically enabled at start up (or restart),
  235. then the "state" option with a value of "disabled" can be used:
  236. "pools" : [
  237. {
  238. "url" : "poola:porta",
  239. "user" : "usernamea",
  240. "pass" : "passa"
  241. },
  242. {
  243. "quota" : "2;poolb:portb",
  244. "user" : "usernameb",
  245. "pass" : "passb",
  246. "state" : "disabled"
  247. }
  248. ]
  249. It is then trivial to change the "state" setting to "enabled" in the
  250. configuration file at anytime and then restart the miner (see below).
  251. You can enable the pool whilst the miner is still running ('p' followed
  252. by 'e' followed by pool number) - but the pool will still be disabled on
  253. restart if the config file is not changed.
  254. "state" can also be set to "hidden". This allows the json file to
  255. contain a large number of pools, of which some could be automatically
  256. culled at start up. This makes it easy to swap pools in and out of the
  257. runtime selection, without having a large list of pools cluttering up
  258. the display.
  259. "pools" : [
  260. {
  261. "poolname" : "Main Pool",
  262. "url" : "poola:porta",
  263. "user" : "usernamea",
  264. "pass" : "passa",
  265. "state" : "disabled"
  266. },
  267. {
  268. "poolname" : "Joe's Weekend Pool",
  269. "quota" : "2;poolb:portb",
  270. "user" : "usernameb",
  271. "pass" : "passb",
  272. "state" : "hidden"
  273. }
  274. ]
  275. These options are considered experimental and therefore will NOT be
  276. created when the 'Write config file' option is used ('s' followed by
  277. 'w').
  278. A restart of the miner ('s' followed by 'c') will reload the config
  279. file and any changes that may have been made.
  280. ## Logging
  281. sgminer will log to stderr if it detects stderr is being redirected to a
  282. file. To enable logging simply append `2>logfile.txt` to your command line
  283. and `logfile.txt` will contain the logged output at the log level you
  284. specify (normal, verbose, debug etc.)
  285. There is also the -m option on Linux which will spawn a command of your choice
  286. and pipe the output directly to that command.
  287. The WorkTime details 'debug' option adds details on the end of each line
  288. displayed for Accepted or Rejected work done. An example would be:
  289. <-00000059.ed4834a3 M:X D:1.0 G:17:02:38:0.405 C:1.855 (2.995) W:3.440 (0.000) S:0.461 R:17:02:47
  290. The first 2 hex codes are the previous block hash, the rest are reported in
  291. seconds unless stated otherwise:
  292. The previous hash is followed by the getwork mode used M:X where X is one of
  293. P:Pool, T:Test Pool, L:LP or B:Benchmark,
  294. then D:d.ddd is the difficulty required to get a share from the work,
  295. then G:hh:mm:ss:n.nnn, which is when the getwork or LP was sent to the pool and
  296. the n.nnn is how long it took to reply,
  297. followed by 'O' on it's own if it is an original getwork, or 'C:n.nnn' if it was
  298. a clone with n.nnn stating how long after the work was recieved that it was cloned,
  299. (m.mmm) is how long from when the original work was received until work started,
  300. W:n.nnn is how long the work took to process until it was ready to submit,
  301. (m.mmm) is how long from ready to submit to actually doing the submit, this is
  302. usually 0.000 unless there was a problem with submitting the work,
  303. S:n.nnn is how long it took to submit the completed work and await the reply,
  304. R:hh:mm:ss is the actual time the work submit reply was received
  305. If you start sgminer with the --sharelog option, you can get detailed
  306. information for each share found. The argument to the option may be "-" for
  307. standard output (not advisable with the ncurses UI), any valid positive number
  308. for that file descriptor, or a filename.
  309. To log share data to a file named "share.log", you can use either:
  310. ./sgminer --sharelog 50 -o xxx -u yyy -p zzz 50>share.log
  311. ./sgminer --sharelog share.log -o xxx -u yyy -p zzz
  312. For every share found, data will be logged in a CSV (Comma Separated Value)
  313. format:
  314. timestamp,disposition,target,pool,dev,thr,sharehash,sharedata
  315. For example (this is wrapped, but it's all on one line for real):
  316. 1335313090,reject,
  317. ffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000,
  318. http://localhost:8337,GPU0,0,
  319. 6f983c918f3299b58febf95ec4d0c7094ed634bc13754553ec34fc3800000000,
  320. 00000001a0980aff4ce4a96d53f4b89a2d5f0e765c978640fe24372a000001c5
  321. 000000004a4366808f81d44f26df3d69d7dc4b3473385930462d9ab707b50498
  322. f681634a4f1f63d01a0cd43fb338000000000080000000000000000000000000
  323. 0000000000000000000000000000000000000000000000000000000080020000

comments powered by Disqus