/ README
README
1 This is a multi-threaded multi-pool FPGA and ASIC miner for bitcoin. 2 3 This code is provided entirely free of charge by the programmer in his spare 4 time so donations would be greatly appreciated. Please consider donating to the 5 address below. Driver development for new ASIC only bitcoin hardware can be 6 suitably sponsored. 7 8 Con Kolivas <kernel@kolivas.org> 9 15qSxP1SQcUX3o4nhkfdbgyoWEFMomJ4rZ 10 11 NOTE: This code is licensed under the GPLv3. This means that the source to any 12 modifications you make to this code MUST be provided by law if you distribute 13 modified binaries. See COPYING for details. 14 15 16 DOWNLOADS: 17 18 http://ck.kolivas.org/apps/cgminer 19 20 GIT TREE: 21 22 https://github.com/ckolivas/cgminer 23 24 Support thread: 25 26 http://bitcointalk.org/index.php?topic=28402.0 27 28 IRC Channel: 29 30 irc://irc.freenode.net/cgminer 31 32 SEE ALSO API-README, ASIC-README and FGPA-README FOR MORE INFORMATION ON EACH. 33 34 --- 35 36 EXECUTIVE SUMMARY ON USAGE: 37 38 Single pool: 39 40 cgminer -o http://pool:port -u username -p password 41 42 Multiple pools: 43 44 cgminer -o http://pool1:port -u pool1username -p pool1password -o http://pool2:port -u pool2usernmae -p pool2password 45 46 Single pool with a standard http proxy: 47 48 cgminer -o "http:proxy:port|http://pool:port" -u username -p password 49 50 Single pool with a socks5 proxy: 51 52 cgminer -o "socks5:proxy:port|http://pool:port" -u username -p password 53 54 Single pool with stratum protocol support: 55 56 cgminer -o stratum+tcp://pool:port -u username -p password 57 58 Solo mining to local bitcoind: 59 60 cgminer -o http://localhost:8332 -u username -p password --btc-address 15qSxP1SQcUX3o4nhkfdbgyoWEFMomJ4rZ 61 62 The list of proxy types are: 63 http: standard http 1.1 proxy 64 http0: http 1.0 proxy 65 socks4: socks4 proxy 66 socks5: socks5 proxy 67 socks4a: socks4a proxy 68 socks5h: socks5 proxy using a hostname 69 70 If you compile cgminer with a version of CURL before 7.19.4 then some of the above will 71 not be available. All are available since CURL version 7.19.4 72 73 If you specify the --socks-proxy option to cgminer, it will only be applied to all pools 74 that don't specify their own proxy setting like above 75 76 77 After saving configuration from the menu, you do not need to give cgminer any 78 arguments and it will load your configuration. 79 80 Any configuration file may also contain a single 81 "include" : "filename" 82 to recursively include another configuration file. 83 Writing the configuration will save all settings from all files in the output. 84 85 86 --- 87 BUILDING CGMINER FOR YOURSELF 88 89 DEPENDENCIES: 90 Mandatory: 91 pkg-config http://www.freedesktop.org/wiki/Software/pkg-config 92 libtool http://www.gnu.org/software/libtool/ 93 Optional: 94 curl dev library http://curl.haxx.se/libcurl/ 95 (libcurl4-openssl-dev - Must tell configure --disable-libcurl otherwise 96 it will attempt to compile it in) 97 98 curses dev library 99 (libncurses5-dev or libpdcurses on WIN32 for text user interface) 100 101 libusb-1 dev library (libusb-1.0-0-dev) 102 (This is only required for USB device support) 103 104 libudev dev library (libudev-dev) 105 (This is only required for USB device support and is linux only) 106 107 uthash dev (uthash-dev) 108 Will use a copy included with the source if unavailable. 109 110 libjansson dev (libjansson-dev) 111 Will use a copy included with the source if unavailable. 112 113 If building from git: 114 autoconf 115 automake 116 117 If building on Ubuntu: 118 sudo apt-get install build-essential autoconf automake libtool pkg-config \ 119 libcurl4-openssl-dev libudev-dev libusb-1.0-0-dev \ 120 libncurses5-dev 121 122 CGMiner specific configuration options: 123 --enable-ants1 Compile support for Antminer S1 Bitmain (default 124 disabled) 125 --enable-ants2 Compile support for Antminer S2 Bitmain (default 126 disabled) 127 --enable-avalon Compile support for Avalon (default disabled) 128 --enable-avalon2 Compile support for Avalon2/3 (default disabled) 129 --enable-avalon4 Compile support for Avalon4/4.1/6 (default disabled) 130 --enable-avalon7 Compile support for Avalon7 (default disabled) 131 --enable-avalon8 Compile support for Avalon8 (default disabled) 132 --enable-bab Compile support for BlackArrow Bitfury (default 133 disabled) 134 --enable-bflsc Compile support for BFL ASICs (default disabled) 135 --enable-bitforce Compile support for BitForce FPGAs (default 136 disabled) 137 --enable-bitfury Compile support for BitFury ASICs (default disabled) 138 --enable-bitmine_A1 Compile support for Bitmine.ch A1 ASICs (default 139 disabled) 140 --enable-blockerupter Compile support for ASICMINER BlockErupter Tube/Prisma 141 (default disabled) 142 --enable-cointerra Compile support for Cointerra ASICs (default disabled) 143 --enable-drillbit Compile support for Drillbit BitFury ASICs (default 144 disabled) 145 --enable-hashfast Compile support for Hashfast (default disabled) 146 --enable-icarus Compile support for Icarus (default disabled) 147 --enable-klondike Compile support for Klondike (default disabled) 148 --enable-knc Compile support for KnC miners (default disabled) 149 --enable-minion Compile support for Minion BlackArrow ASIC (default 150 disabled) 151 --enable-modminer Compile support for ModMiner FPGAs(default disabled) 152 --enable-sp10 Compile support for Spondoolies SP10 (default 153 disabled) 154 --enable-sp30 Compile support for Spondoolies SP30 (default 155 disabled) 156 --disable-libcurl Disable building with libcurl for GBT support 157 --enable-libsystemd Compile support for system watchdog and status 158 notifications (default disabled) 159 --without-curses Compile support for curses TUI (default enabled) 160 --with-system-jansson Compile against dynamic system jansson (default use 161 included static jansson) 162 163 Basic *nix build instructions: 164 To actually build: 165 166 ./autogen.sh # only needed if building from git repo 167 CFLAGS="-O2 -Wall -march=native" ./configure <options> 168 make 169 170 No installation is necessary. You may run cgminer from the build 171 directory directly, but you may do make install if you wish to install 172 cgminer to a system location or location you specified. 173 174 Building for windows: 175 176 It is actually easiest to build a windows binary using cross compilation tools 177 provided by "mxe" available at http://mxe.cc/ (use the 32 bit one!) 178 Once you have followed the instructions for building mxe: 179 export PATH=(path/to/mxe)/usr/bin/:$PATH 180 CFLAGS="-O2 -Wall -W -march=i686" ./configure --host=i686-pc-mingw32 <options> 181 make 182 183 Native WIN32 build instructions: see windows-build.txt but these instructions 184 are now hopelessly out of date. 185 186 --- 187 188 Usage instructions: Run "cgminer --help" to see options: 189 190 Usage: cgminer [-DdElmpPQqUsTouOchnV] 191 192 Options for both config file and command line: 193 --anu-freq <arg> Set AntminerU1/2 frequency in MHz, range 125-500 (default: 250.0) 194 --api-allow <arg> Allow API access only to the given list of [G:]IP[/Prefix] addresses[/subnets] 195 --api-description <arg> Description placed in the API status header, default: cgminer version 196 --api-groups <arg> API one letter groups G:cmd:cmd[,P:cmd:*...] defining the cmds a groups can use 197 --api-listen Enable API, default: disabled 198 --api-mcast Enable API Multicast listener, default: disabled 199 --api-mcast-addr <arg> API Multicast listen address 200 --api-mcast-code <arg> Code expected in the API Multicast message, don't use '-' 201 --api-mcast-des <arg> Description appended to the API Multicast reply, default: '' 202 --api-mcast-port <arg> API Multicast listen port (default: 4028) 203 --api-network Allow API (if enabled) to listen on/for any address, default: only 127.0.0.1 204 --api-port <arg> Port number of miner API (default: 4028) 205 --au3-freq <arg> Set AntminerU3 frequency in MHz, range 100-250 (default: 225.0) 206 --au3-volt <arg> Set AntminerU3 voltage in mv, range 725-850, 0 to not set (default: 775) 207 --avalon-auto Adjust avalon overclock frequency dynamically for best hashrate 208 --avalon-cutoff <arg> Set avalon overheat cut off temperature (default: 60) 209 --avalon-fan <arg> Set fanspeed percentage for avalon, single value or range (default: 20-100) 210 --avalon-freq <arg> Set frequency range for avalon-auto, single value or range 211 --avalon-options <arg> Set avalon options baud:miners:asic:timeout:freq:tech 212 --avalon-temp <arg> Set avalon target temperature (default: 50) 213 --avalon2-freq Set frequency range for Avalon2, single value or range 214 --avalon2-voltage Set Avalon2 core voltage, in millivolts 215 --avalon2-fan Set Avalon2 target fan speed 216 --avalon2-cutoff <arg> Set Avalon2 overheat cut off temperature (default: 88) 217 --avalon2-fixed-speed Set Avalon2 fan to fixed speed 218 --avalon4-automatic-voltage Automatic adjust voltage base on module DH 219 --avalon4-voltage Set Avalon4 core voltage, in millivolts, step: 125 220 --avalon4-freq Set frequency for Avalon4, 1 to 3 values, example: 445:385:370 221 --avalon4-fan Set Avalon4 target fan speed range 222 --avalon4-temp <arg> Set Avalon4 target temperature (default: 42) 223 --avalon4-cutoff <arg> Set Avalon4 overheat cut off temperature (default: 65) 224 --avalon4-polling-delay <arg> Set Avalon4 polling delay value (ms) (default: 20) 225 --avalon4-ntime-offset <arg> Set Avalon4 MM ntime rolling max offset (default: 4) 226 --avalon4-aucspeed <arg> Set Avalon4 AUC IIC bus speed (default: 400000) 227 --avalon4-aucxdelay <arg> Set Avalon4 AUC IIC xfer read delay, 4800 ~= 1ms (default: 9600) 228 --avalon4-miningmode <arg> Set Avalon4 mining mode(0:custom, 1:eco, 2:normal, 3:turbo (default: 0) 229 --avalon4-freezesafe Make Avalon4 running as a radiator when stratum server failed 230 --avalon4-ntcb <arg> Set Avalon4 MM NTC B value (default: 3450) 231 --avalon4-freq-min <arg> Set minimum frequency for Avalon4 (default: 100) 232 --avalon4-freq-max <arg> Set maximum frequency for Avalon4 (default: 1000) 233 --avalon4-noncecheck-off Disable A3218 inside nonce check function 234 --avalon4-smart-speed <arg> Set smart speed, range 0-3. 0 means Disable (default: 2) 235 --avalon4-speed-bingo <arg> Set A3218 speed bingo for smart speed mode 1 (default: 255) 236 --avalon4-speed-error <arg> Set A3218 speed error for smart speed mode 1 (default: 3) 237 --avalon4-least-pll <arg> Set least pll check threshold for smart speed mode 2 (default: 768) 238 --avalon4-most-pll <arg> Set most pll check threshold for smart speed mode 2 (default: 256) 239 --avalon7-voltage Set Avalon7 default core voltage, in millivolts, step: 78 240 --avalon7-voltage-level Set Avalon7 default level of core voltage, range:[0, 15], step: 1 241 --avalon7-voltage-offset Set Avalon7 default offset of core voltage, range:[-2, 1], step: 1 242 --avalon7-freq Set Avalon7 default frequency, range:[24, 1404], step: 12, example: 500 243 --avalon7-freq-sel <arg> Set Avalon7 default frequency select, range:[0, 5], step: 1, example: 3 (default: 0) 244 --avalon7-fan Set Avalon7 target fan speed, range:[0, 100], step: 1, example: 0-100 245 --avalon7-temp <arg> Set Avalon7 target temperature, range:[0, 100] (default: 99) 246 --avalon7-polling-delay <arg> Set Avalon7 polling delay value (ms) (default: 20) 247 --avalon7-aucspeed <arg> Set AUC3 IIC bus speed (default: 400000) 248 --avalon7-aucxdelay <arg> Set AUC3 IIC xfer read delay, 4800 ~= 1ms (default: 19200) 249 --avalon7-smart-speed <arg> Set Avalon7 smart speed, range 0-1. 0 means Disable (default: 1) 250 --avalon7-th-pass <arg> Set A3212 th pass value (default: 162) 251 --avalon7-th-fail <arg> Set A3212 th fail value (default: 10921) 252 --avalon7-th-init <arg> Set A3212 th init value (default: 32767) 253 --avalon7-th-ms <arg> Set A3212 th ms value (default: 1) 254 --avalon7-th-timeout <arg> Set A3212 th timeout value (default: 0) 255 --avalon7-iic-detect Enable Avalon7 detect through iic controller 256 --avalon7-freqadj-time <arg> Set Avalon7 check interval when run in AVA7_FREQ_TEMPADJ_MODE (default: 60) 257 --avalon7-delta-temp <arg> Set Avalon7 delta temperature when reset freq in AVA7_FREQ_TEMPADJ_MODE (default: 0) 258 --avalon7-delta-freq <arg> Set Avalon7 delta freq when adjust freq in AVA7_FREQ_TEMPADJ_MODE (default: 100) 259 --avalon7-freqadj-temp <arg> Set Avalon7 check temperature when run into AVA7_FREQ_TEMPADJ_MODE (default: 104) 260 --avalon7-nonce-mask <arg> Set A3212 nonce mask, range 24-32. (default: 31) 261 --no-avalon7-asic-debug Disable A3212 debug. 262 --avalon8-voltage-level Set Avalon8 default level of core voltage, range:[0, 15], step: 1 263 --avalon8-voltage-level-offset Set Avalon8 default offset of core voltage level, range:[-2, 1], step: 1 264 --avalon8-freq Set Avalon8 default frequency, range:[25, 1200], step: 25, example: 800 265 --avalon8-freq-sel <arg> Set Avalon8 default frequency select, range:[0, 3], step: 1, example: 3 (default: 3) 266 --avalon8-fan Set Avalon8 target fan speed, range:[0, 100], step: 1, example: 0-100 267 --avalon8-temp <arg> Set Avalon8 target temperature, range:[0, 100] (default: 90) 268 --avalon8-polling-delay <arg> Set Avalon8 polling delay value (ms) (default: 20) 269 --avalon8-aucspeed <arg> Set AUC3 IIC bus speed (default: 400000) 270 --avalon8-aucxdelay <arg> Set AUC3 IIC xfer read delay, 4800 ~= 1ms (default: 19200) 271 --avalon8-smart-speed <arg> Set Avalon8 smart speed, range 0-1. 0 means Disable (default: 1) 272 --avalon8-th-pass <arg> Set A3210 th pass value (default: -1) 273 --avalon8-th-fail <arg> Set A3210 th fail value (default: -1) 274 --avalon8-th-init <arg> Set A3210 th init value (default: 32767) 275 --avalon8-th-ms <arg> Set A3210 th ms value (default: 5) 276 --avalon8-th-timeout <arg> Set A3210 th timeout value (default: 4294967295) 277 --avalon8-th-add <arg> Set A3210 th add value (default: 1) 278 --avalon8-iic-detect Enable Avalon8 detect through iic controller 279 --avalon8-nonce-mask <arg> Set A3210 nonce mask, range 24-32. (default: -1) 280 --avalon8-nonce-check <arg> Set A3210 nonce check, range 0-1. (default: 1) 281 --avalon8-roll-enable <arg> Set A3210 roll enable, range 0-1. (default: 1) 282 --avalon8-mux-l2h <arg> Set Avalon8 mux l2h, range 0-2. (default: 0) 283 --avalon8-mux-h2l <arg> Set Avalon8 mux h2l, range 0-1. (default: 1) 284 --avalon8-h2ltime0-spd <arg> Set Avalon8 h2ltime0 spd, range 0-255. (default: 3) 285 --avalon8-spdlow <arg> Set Avalon8 spdlow, range 0-3. (default: -1) 286 --avalon8-spdhigh <arg> Set Avalon8 spdhigh, range 0-3. (default: 3) 287 --avalon8-cinfo-asic Set Avalon8 cinfo asic index, range:[0, 25], step: 1 288 --avalon8-pid-p <arg> Set Avalon8 pid-p, range 0-9999. (default: 2) 289 --avalon8-pid-i <arg> Set Avalon8 pid-i, range 0-9999. (default: 5) 290 --avalon8-pid-d <arg> Set Avalon8 pid-d, range 0-9999. (default: 0) 291 --bab-options <arg> Set BaB options max:def:min:up:down:hz:delay:trf 292 --balance Change multipool strategy from failover to even share balance 293 --benchfile <arg> Run cgminer in benchmark mode using a work file - produces no shares 294 --benchfile-display Display each benchfile nonce found 295 --benchmark Run cgminer in benchmark mode - produces no shares 296 --bet-clk <arg> Set clockspeed of ASICMINER Tube/Prisma to (arg+1)*10MHz (default: 23) 297 --bfl-range Use nonce range on bitforce devices if supported 298 --bflsc-overheat <arg> Set overheat temperature where BFLSC devices throttle, 0 to disable (default: 85) 299 --bitburner-fury-voltage <arg> Set BitBurner Fury core voltage, in millivolts 300 --bitburner-fury-options <arg> Override avalon-options for BitBurner Fury boards baud:miners:asic:timeout:freq 301 --bitburner-voltage <arg> Set BitBurner (Avalon) core voltage, in millivolts 302 --bitmain-auto Adjust bitmain overclock frequency dynamically for best hashrate 303 --bitmain-cutoff <arg> Set bitmain overheat cut off temperature 304 --bitmain-fan <arg> Set fanspeed percentage for bitmain, single value or range (default: 20-100) 305 --bitmain-freq <arg> Set bitmain freq options timeout:freq:regdata 306 --bitmain-hwerror Set bitmain device detect hardware error 307 --bitmain-options <arg> Set bitmain options baud:miners:asic:timeout:freq:regdata 308 --bitmain-temp <arg> Set bitmain target temperature 309 --bitmain-workdelay <arg> Set bitmain work delay (ms) 0-100 310 --bitmain-voltage <arg> Set bitmain voltage - S2/S3 only 311 --bitmain-dev <arg> Set bitmain device - S2 only 312 --bitmainbeeper Set bitmain beeper ringing 313 --bitmaintempoverctrl Set bitmain stop runing when temprerature is over 80 degree Celsius 314 --bxf-bits <arg> Set max BXF/HXF bits for overclocking (default: 54) 315 --bxf-temp-target <arg> Set target temperature for BXF/HXF devices (default: 82) 316 --bxm-bits <arg> Set BXM bits for overclocking (default: 54) 317 --btc-address <arg> Set bitcoin target address when solo mining to bitcoind 318 --btc-sig <arg> Set signature to add to coinbase when solo mining (optional) 319 --compac-freq <arg> Set GekkoScience Compac frequency in MHz, range 100-500 (default: 150.0) 320 --compact Use compact display without per device statistics 321 --debug|-D Enable debug output 322 --decode Decode 2nd pool stratum coinbase transactions (1st must be bitcoind) and exit 323 --disable-rejecting Automatically disable pools that continually reject shares 324 --dragonmint-t1-options <arg> Dragonmint T1 options ref_clk_khz:sys_clk_khz:spi_clk_khz:override_chip_num 325 --T1efficient Tune Dragonmint T1 per chain voltage and frequency for optimal efficiency 326 --T1noauto Disable Dragonmint T1 per chain auto voltage and frequency tuning 327 --T1performance Tune Dragonmint T1 per chain voltage and frequency for maximum performance 328 --T1fantarget <arg> Throttle T1 frequency to keep fan less than target fan speed (default: 100) 329 --T1Pll1 <arg> Set PLL Clock 1 in Dragonmint T1 broad 1 chip (-1: 1000MHz, >0:Lookup PLL table) (default: 1332) 330 --T1Pll2 <arg> Set PLL Clock 2 in Dragonmint T1 broad 1 chip (-1: 1000MHz, >0:Lookup PLL table) (default: 1332) 331 --T1Pll3 <arg> Set PLL Clock 3 in Dragonmint T1 broad 1 chip (-1: 1000MHz, >0:Lookup PLL table) (default: 1332) 332 --T1Pll4 <arg> Set PLL Clock 4 in Dragonmint T1 broad 1 chip (-1: 1000MHz, >0:Lookup PLL table) (default: 1332) 333 --T1Pll5 <arg> Set PLL Clock 5 in Dragonmint T1 broad 1 chip (-1: 1000MHz, >0:Lookup PLL table) (default: 1332) 334 --T1Pll6 <arg> Set PLL Clock 6 in Dragonmint T1 broad 1 chip (-1: 1000MHz, >0:Lookup PLL table) (default: 1332) 335 --T1Pll7 <arg> Set PLL Clock 7 in Dragonmint T1 broad 1 chip (-1: 1000MHz, >0:Lookup PLL table) (default: 1332) 336 --T1Pll8 <arg> Set PLL Clock 8 in Dragonmint T1 broad 1 chip (-1: 1000MHz, >0:Lookup PLL table) (default: 1332) 337 --T1Volt1 <arg> Dragonmint T1 set voltage 1 - VID overrides if set (390-425) (default: 404) 338 --T1Volt2 <arg> Dragonmint T1 set voltage 2 - VID overrides if set (390-425) (default: 404) 339 --T1Volt3 <arg> Dragonmint T1 set voltage 3 - VID overrides if set (390-425) (default: 404) 340 --T1Volt4 <arg> Dragonmint T1 set voltage 4 - VID overrides if set (390-425) (default: 404) 341 --T1Volt5 <arg> Dragonmint T1 set voltage 5 - VID overrides if set (390-425) (default: 404) 342 --T1Volt6 <arg> Dragonmint T1 set voltage 6 - VID overrides if set (390-425) (default: 404) 343 --T1Volt7 <arg> Dragonmint T1 set voltage 7 - VID overrides if set (390-425) (default: 404) 344 --T1Volt8 <arg> Dragonmint T1 set voltage 8 - VID overrides if set (390-425) (default: 404) 345 --T1VID1 <arg> Dragonmint T1 set VID 1 in noauto - Overrides voltage if set (1-31) (default: 0) 346 --T1VID2 <arg> Dragonmint T1 set VID 2 in noauto - Overrides voltage if set (1-31) (default: 0) 347 --T1VID3 <arg> Dragonmint T1 set VID 3 in noauto - Overrides voltage if set (1-31) (default: 0) 348 --T1VID4 <arg> Dragonmint T1 set VID 4 in noauto - Overrides voltage if set (1-31) (default: 0) 349 --T1VID5 <arg> Dragonmint T1 set VID 5 in noauto - Overrides voltage if set (1-31) (default: 0) 350 --T1VID6 <arg> Dragonmint T1 set VID 6 in noauto - Overrides voltage if set (1-31) (default: 0) 351 --T1VID7 <arg> Dragonmint T1 set VID 7 in noauto - Overrides voltage if set (1-31) (default: 0) 352 --T1VID8 <arg> Dragonmint T1 set VID 8 in noauto - Overrides voltage if set (1-31) (default: 0) 353 --drillbit-options <arg> Set drillbit options <int|ext>:clock[:clock_divider][:voltage] 354 --expiry|-E <arg> Upper bound on how many seconds after getting work we consider a share from it stale (default: 120) 355 --failover-only Don't leak work to backup pools when primary pool is lagging 356 --fix-protocol Do not redirect to stratum protocol from GBT 357 --hfa-hash-clock <arg> Set hashfast clock speed (default: 550) 358 --hfa-fail-drop <arg> Set how many MHz to drop clockspeed each failure on an overlocked hashfast device (default: 10) 359 --hfa-fan <arg> Set fanspeed percentage for hashfast, single value or range (default: 10-85) 360 --hfa-name <arg> Set a unique name for a single hashfast device specified with --usb or the first device found 361 --hfa-noshed Disable hashfast dynamic core disabling feature 362 --hfa-options <arg> Set hashfast options name:clock (comma separated) 363 --hfa-temp-overheat <arg> Set the hashfast overheat throttling temperature (default: 95) 364 --hfa-temp-target <arg> Set the hashfast target temperature (0 to disable) (default: 88) 365 --hro-freq Set the hashratio clock frequency (default: 280) 366 --hotplug <arg> Seconds between hotplug checks (0 means never check) 367 --klondike-options <arg> Set klondike options clock:temptarget 368 --load-balance Change multipool strategy from failover to quota based balance 369 --log|-l <arg> Interval in seconds between log output (default: 5) 370 --lowmem Minimise caching of shares for low memory applications 371 --minion-chipreport <arg> Seconds to report chip 5min hashrate, range 0-100 (default: 0=disabled) 372 --minion-freq <arg> Set minion chip frequencies in MHz, single value or comma list, range 100-1400 (default: 1200) 373 --minion-freqchange Millisecond total time to do frequency changes (default: 1000) 374 --minion-freqpercent Percentage to use when starting up a chip (default: 70%) 375 --minion-idlecount Report when IdleCount is >0 or changes 376 --minion-ledcount Turn off led when more than this many chips below the ledlimit (default: 0) 377 --minion-ledlimit Turn off led when chips GHs are below this (default: 90) 378 --minion-noautofreq Disable automatic frequency adjustment 379 --minion-overheat Enable directly halting any chip when the status exceeds 100C 380 --minion-spidelay Add a delay in microseconds after each SPI I/O 381 --minion-spireset SPI regular reset: iNNN for I/O count or sNNN for seconds - 0 means none 382 --minion-spisleep Sleep time in milliseconds when doing an SPI reset 383 --minion-temp <arg> Set minion chip temperature threshold, single value or comma list, range 120-160 (default: 135C) 384 --monitor|-m <arg> Use custom pipe cmd for output messages 385 --nfu-bits <arg> Set nanofury bits for overclocking, range 32-63 (default: 50) 386 --net-delay Impose small delays in networking to not overload slow routers 387 --no-submit-stale Don't submit shares if they are detected as stale 388 --osm-led-mode <arg> Set LED mode for OneStringMiner devices (default: 4) 389 --pass|-p <arg> Password for bitcoin JSON-RPC server 390 --per-device-stats Force verbose mode and output per-device statistics 391 --protocol-dump|-P Verbose dump of protocol-level activities 392 --queue|-Q <arg> Minimum number of work items to have queued (0+) (default: 1) 393 --quiet|-q Disable logging output, display status and errors 394 --quota|-U <arg> quota;URL combination for server with load-balance strategy quotas 395 --real-quiet Disable all output 396 --rock-freq <arg> Set RockMiner frequency in MHz, range 200-400 (default: 270) 397 --rotate <arg> Change multipool strategy from failover to regularly rotate at N minutes (default: 0) 398 --round-robin Change multipool strategy from failover to round robin on failure 399 --scan-time|-s <arg> Upper bound on time spent scanning current work, in seconds (default: -1) 400 --sched-start <arg> Set a time of day in HH:MM to start mining (a once off without a stop time) 401 --sched-stop <arg> Set a time of day in HH:MM to stop mining (will quit without a start time) 402 --sharelog <arg> Append share log to file 403 --shares <arg> Quit after mining N shares (default: unlimited) 404 --socks-proxy <arg> Set socks4 proxy (host:port) 405 --suggest-diff <arg> Suggest miner difficulty for pool to user (default: none) 406 --syslog Use system log for output messages (default: standard error) 407 --temp-cutoff <arg> Temperature where a device will be automatically disabled, one value or comma separated list (default: 95) 408 --text-only|-T Disable ncurses formatted screen output 409 --url|-o <arg> URL for bitcoin JSON-RPC server 410 --usb <arg> USB device selection 411 --user|-u <arg> Username for bitcoin JSON-RPC server 412 --userpass|-O <arg> Username:Password pair for bitcoin JSON-RPC server 413 --verbose Log verbose output to stderr as well as status output 414 --widescreen Use extra wide display without toggling 415 --worktime Display extra work time debug information 416 Options for command line only: 417 --config|-c <arg> Load a JSON-format configuration file 418 See example.conf for an example configuration. 419 --default-config <arg> Specify the filename of the default config file 420 Loaded at start and used when saving without a name. 421 --help|-h Print this message 422 --ndevs|-n Display all USB devices and exit 423 --version|-V Display version and exit 424 425 426 Silent USB device (ASIC and FPGA) options: 427 428 --icarus-options <arg> Set specific FPGA board configurations - one set of values for all or comma separated 429 --icarus-timing <arg> Set how the Icarus timing is calculated - one setting/value for all or comma separated 430 --usb-dump (See FPGA-README) 431 432 See FGPA-README or ASIC-README for more information regarding these. 433 434 435 ASIC only options: 436 437 --anu-freq <arg> Set AntminerU1/2 frequency in MHz, range 125-500 (default: 250.0) 438 --au3-freq <arg> Set AntminerU3 frequency in MHz, range 100-250 (default: 225.0) 439 --au3-volt <arg> Set AntminerU3 voltage in mv, range 725-850, 0 to not set (default: 750) 440 --avalon-auto Adjust avalon overclock frequency dynamically for best hashrate 441 --avalon-cutoff <arg> Set avalon overheat cut off temperature (default: 60) 442 --avalon-fan <arg> Set fanspeed percentage for avalon, single value or range (default: 20-100) 443 --avalon-freq <arg> Set frequency range for avalon-auto, single value or range 444 --avalon-options <arg> Set avalon options baud:miners:asic:timeout:freq:tech 445 --avalon-temp <arg> Set avalon target temperature (default: 50) 446 --avalon2-freq Set frequency range for Avalon2, single value or range 447 --avalon2-voltage Set Avalon2 core voltage, in millivolts 448 --avalon2-fan Set Avalon2 target fan speed 449 --avalon2-cutoff <arg> Set Avalon2 overheat cut off temperature (default: 88) 450 --avalon2-fixed-speed Set Avalon2 fan to fixed speed 451 --avalon4-automatic-voltage Automatic adjust voltage base on module DH 452 --avalon4-voltage Set Avalon4 core voltage, in millivolts, step: 125 453 --avalon4-freq Set frequency for Avalon4, 1 to 3 values, example: 445:385:370 454 --avalon4-fan Set Avalon4 target fan speed range 455 --avalon4-temp <arg> Set Avalon4 target temperature (default: 42) 456 --avalon4-cutoff <arg> Set Avalon4 overheat cut off temperature (default: 65) 457 --avalon4-polling-delay <arg> Set Avalon4 polling delay value (ms) (default: 20) 458 --avalon4-ntime-offset <arg> Set Avalon4 MM ntime rolling max offset (default: 4) 459 --avalon4-aucspeed <arg> Set Avalon4 AUC IIC bus speed (default: 400000) 460 --avalon4-aucxdelay <arg> Set Avalon4 AUC IIC xfer read delay, 4800 ~= 1ms (default: 9600) 461 --avalon7-voltage Set Avalon7 default core voltage, in millivolts, step: 78 462 --avalon7-voltage-level Set Avalon7 default level of core voltage, range:[0, 15], step: 1 463 --avalon7-voltage-offset Set Avalon7 default offset of core voltage, range:[-2, 1], step: 1 464 --avalon7-freq Set Avalon7 default frequency, range:[24, 1404], step: 12, example: 500 465 --avalon7-freq-sel <arg> Set Avalon7 default frequency select, range:[0, 5], step: 1, example: 3 (default: 0) 466 --avalon7-fan Set Avalon7 target fan speed, range:[0, 100], step: 1, example: 0-100 467 --avalon7-temp <arg> Set Avalon7 target temperature, range:[0, 100] (default: 99) 468 --avalon7-polling-delay <arg> Set Avalon7 polling delay value (ms) (default: 20) 469 --avalon7-aucspeed <arg> Set AUC3 IIC bus speed (default: 400000) 470 --avalon7-aucxdelay <arg> Set AUC3 IIC xfer read delay, 4800 ~= 1ms (default: 19200) 471 --avalon7-smart-speed <arg> Set Avalon7 smart speed, range 0-1. 0 means Disable (default: 1) 472 --avalon7-th-pass <arg> Set A3212 th pass value (default: 162) 473 --avalon7-th-fail <arg> Set A3212 th fail value (default: 10921) 474 --avalon7-th-init <arg> Set A3212 th init value (default: 32767) 475 --avalon7-th-ms <arg> Set A3212 th ms value (default: 1) 476 --avalon7-th-timeout <arg> Set A3212 th timeout value (default: 0) 477 --avalon7-iic-detect Enable Avalon7 detect through iic controller 478 --avalon7-freqadj-time <arg> Set Avalon7 check interval when run in AVA7_FREQ_TEMPADJ_MODE (default: 60) 479 --avalon7-delta-temp <arg> Set Avalon7 delta temperature when reset freq in AVA7_FREQ_TEMPADJ_MODE (default: 0) 480 --avalon7-delta-freq <arg> Set Avalon7 delta freq when adjust freq in AVA7_FREQ_TEMPADJ_MODE (default: 100) 481 --avalon7-freqadj-temp <arg> Set Avalon7 check temperature when run into AVA7_FREQ_TEMPADJ_MODE (default: 104) 482 --avalon7-nonce-mask <arg> Set A3212 nonce mask, range 24-32. (default: 31) 483 --no-avalon7-asic-debug Disable A3212 debug. 484 --avalon8-voltage-level Set Avalon8 default level of core voltage, range:[0, 15], step: 1 485 --avalon8-voltage-level-offset Set Avalon8 default offset of core voltage level, range:[-2, 1], step: 1 486 --avalon8-freq Set Avalon8 default frequency, range:[25, 1200], step: 25, example: 800 487 --avalon8-freq-sel <arg> Set Avalon8 default frequency select, range:[0, 3], step: 1, example: 3 (default: 3) 488 --avalon8-fan Set Avalon8 target fan speed, range:[0, 100], step: 1, example: 0-100 489 --avalon8-temp <arg> Set Avalon8 target temperature, range:[0, 100] (default: 90) 490 --avalon8-polling-delay <arg> Set Avalon8 polling delay value (ms) (default: 20) 491 --avalon8-aucspeed <arg> Set AUC3 IIC bus speed (default: 400000) 492 --avalon8-aucxdelay <arg> Set AUC3 IIC xfer read delay, 4800 ~= 1ms (default: 19200) 493 --avalon8-smart-speed <arg> Set Avalon8 smart speed, range 0-1. 0 means Disable (default: 1) 494 --avalon8-th-pass <arg> Set A3210 th pass value (default: -1) 495 --avalon8-th-fail <arg> Set A3210 th fail value (default: -1) 496 --avalon8-th-init <arg> Set A3210 th init value (default: 32767) 497 --avalon8-th-ms <arg> Set A3210 th ms value (default: 5) 498 --avalon8-th-timeout <arg> Set A3210 th timeout value (default: 4294967295) 499 --avalon8-th-add <arg> Set A3210 th add value (default: 1) 500 --avalon8-iic-detect Enable Avalon8 detect through iic controller 501 --avalon8-nonce-mask <arg> Set A3210 nonce mask, range 24-32. (default: -1) 502 --avalon8-nonce-check <arg> Set A3210 nonce check, range 0-1. (default: 1) 503 --avalon8-roll-enable <arg> Set A3210 roll enable, range 0-1. (default: 1) 504 --avalon8-mux-l2h <arg> Set Avalon8 mux l2h, range 0-2. (default: 0) 505 --avalon8-mux-h2l <arg> Set Avalon8 mux h2l, range 0-1. (default: 1) 506 --avalon8-h2ltime0-spd <arg> Set Avalon8 h2ltime0 spd, range 0-255. (default: 3) 507 --avalon8-spdlow <arg> Set Avalon8 spdlow, range 0-3. (default: -1) 508 --avalon8-spdhigh <arg> Set Avalon8 spdhigh, range 0-3. (default: 3) 509 --avalon8-cinfo-asic Set Avalon8 cinfo asic index, range:[0, 25], step: 1 510 --avalon8-pid-p <arg> Set Avalon8 pid-p, range 0-9999. (default: 2) 511 --avalon8-pid-i <arg> Set Avalon8 pid-i, range 0-9999. (default: 5) 512 --avalon8-pid-d <arg> Set Avalon8 pid-d, range 0-9999. (default: 0) 513 --bab-options <arg> Set BaB options max:def:min:up:down:hz:delay:trf 514 --bflsc-overheat <arg> Set overheat temperature where BFLSC devices throttle, 0 to disable (default: 90) 515 --bitburner-fury-options <arg> Override avalon-options for BitBurner Fury boards baud:miners:asic:timeout:freq 516 --bitburner-fury-voltage <arg> Set BitBurner Fury core voltage, in millivolts 517 --bitburner-voltage <arg> Set BitBurner (Avalon) core voltage, in millivolts 518 --bitmine-a1-options <ref_clk>:<sys_clk>:<spi_clk>:<max_chip> 519 --bxf-temp-target <arg> Set target temperature for BXF devices (default: 82) 520 --bxm-bits <arg> Set BXM bits for overclocking (default: 50) 521 --compac-freq <arg> Set GekkoScience Compac frequency in MHz, range 100-500 (default: 150.0) 522 --dragonmint-t1-options <arg> Dragonmint T1 options ref_clk_khz:sys_clk_khz:spi_clk_khz:override_chip_num 523 --T1efficient Tune Dragonmint T1 per chain voltage and frequency for optimal efficiency 524 --T1noauto Disable Dragonmint T1 per chain auto voltage and frequency tuning 525 --T1performance Tune Dragonmint T1 per chain voltage and frequency for maximum performance 526 --T1fantarget <arg> Throttle T1 frequency to keep fan less than target fan speed (default: 100) 527 --T1Pll1 <arg> Set PLL Clock 1 in Dragonmint T1 broad 1 chip (-1: 1000MHz, >0:Lookup PLL table) (default: 1332) 528 --T1Pll2 <arg> Set PLL Clock 2 in Dragonmint T1 broad 1 chip (-1: 1000MHz, >0:Lookup PLL table) (default: 1332) 529 --T1Pll3 <arg> Set PLL Clock 3 in Dragonmint T1 broad 1 chip (-1: 1000MHz, >0:Lookup PLL table) (default: 1332) 530 --T1Pll4 <arg> Set PLL Clock 4 in Dragonmint T1 broad 1 chip (-1: 1000MHz, >0:Lookup PLL table) (default: 1332) 531 --T1Pll5 <arg> Set PLL Clock 5 in Dragonmint T1 broad 1 chip (-1: 1000MHz, >0:Lookup PLL table) (default: 1332) 532 --T1Pll6 <arg> Set PLL Clock 6 in Dragonmint T1 broad 1 chip (-1: 1000MHz, >0:Lookup PLL table) (default: 1332) 533 --T1Pll7 <arg> Set PLL Clock 7 in Dragonmint T1 broad 1 chip (-1: 1000MHz, >0:Lookup PLL table) (default: 1332) 534 --T1Pll8 <arg> Set PLL Clock 8 in Dragonmint T1 broad 1 chip (-1: 1000MHz, >0:Lookup PLL table) (default: 1332) 535 --T1Volt1 <arg> Dragonmint T1 set voltage 1 - VID overrides if set (390-425) (default: 404) 536 --T1Volt2 <arg> Dragonmint T1 set voltage 2 - VID overrides if set (390-425) (default: 404) 537 --T1Volt3 <arg> Dragonmint T1 set voltage 3 - VID overrides if set (390-425) (default: 404) 538 --T1Volt4 <arg> Dragonmint T1 set voltage 4 - VID overrides if set (390-425) (default: 404) 539 --T1Volt5 <arg> Dragonmint T1 set voltage 5 - VID overrides if set (390-425) (default: 404) 540 --T1Volt6 <arg> Dragonmint T1 set voltage 6 - VID overrides if set (390-425) (default: 404) 541 --T1Volt7 <arg> Dragonmint T1 set voltage 7 - VID overrides if set (390-425) (default: 404) 542 --T1Volt8 <arg> Dragonmint T1 set voltage 8 - VID overrides if set (390-425) (default: 404) 543 --T1VID1 <arg> Dragonmint T1 set VID 1 in noauto - Overrides voltage if set (1-31) (default: 0) 544 --T1VID2 <arg> Dragonmint T1 set VID 2 in noauto - Overrides voltage if set (1-31) (default: 0) 545 --T1VID3 <arg> Dragonmint T1 set VID 3 in noauto - Overrides voltage if set (1-31) (default: 0) 546 --T1VID4 <arg> Dragonmint T1 set VID 4 in noauto - Overrides voltage if set (1-31) (default: 0) 547 --T1VID5 <arg> Dragonmint T1 set VID 5 in noauto - Overrides voltage if set (1-31) (default: 0) 548 --T1VID6 <arg> Dragonmint T1 set VID 6 in noauto - Overrides voltage if set (1-31) (default: 0) 549 --T1VID7 <arg> Dragonmint T1 set VID 7 in noauto - Overrides voltage if set (1-31) (default: 0) 550 --T1VID8 <arg> Dragonmint T1 set VID 8 in noauto - Overrides voltage if set (1-31) (default: 0) 551 --hfa-hash-clock <arg> Set hashfast clock speed (default: 550) 552 --hfa-fail-drop <arg> Set how many MHz to drop clockspeed each failure on an overlocked hashfast device (default: 10) 553 --hfa-fan <arg> Set fanspeed percentage for hashfast, single value or range (default: 10-85) 554 --hfa-name <arg> Set a unique name for a single hashfast device specified with --usb or the first device found 555 --hfa-noshed Disable hashfast dynamic core disabling feature 556 --hfa-temp-overheat <arg> Set the hashfast overheat throttling temperature (default: 95) 557 --hfa-temp-target <arg> Set the hashfast target temperature (0 to disable) (default: 88) 558 --hro-freq Set the hashratio clock frequency (default: 280) 559 --klondike-options <arg> Set klondike options clock:temptarget 560 --rock-freq <arg> Set RockMiner frequency in MHz, range 125-500 (default: 270) 561 562 See ASIC-README for more information regarding these. 563 564 565 FPGA only options: 566 567 --bfl-range Use nonce range on bitforce devices if supported 568 569 See FGPA-README for more information regarding this. 570 571 572 Cgminer should automatically find all of your Avalon ASIC, BFL ASIC, BitForce 573 FPGAs, Icarus bitstream FPGAs, Klondike ASIC, ASICMINER usb block erupters, 574 KnC ASICs, BaB ASICs, Hashfast ASICs, ModMiner FPGAs, BPMC/BGMC BF1 USB ASICs, 575 Bi*fury USB ASICs, Onestring miner USB ASICs, Hexfury USB ASICs, Nanofury USB 576 ASICs, Antminer U1/U2/U2+ U3 USB ASICs, Cointerra devices, BFx2 USB ASICs, 577 Rockminer R-Box/RK-Box/T1 USB ASICs, Avalon2/3/4 USB ASICs and Hashratio USB 578 ASICs. 579 580 --- 581 582 SETTING UP USB DEVICES 583 584 WINDOWS: 585 586 On windows, the direct USB support requires the installation of a WinUSB 587 driver (NOT the ftdi_sio driver), and attach it to the chosen USB device. 588 When configuring your device, plug it in and wait for windows to attempt to 589 install a driver on its own. It may think it has succeeded or failed but wait 590 for it to finish regardless. This is NOT the driver you want installed. At this 591 point you need to associate your device with the WinUSB driver. The easiest 592 way to do this is to use the zadig utility which you must right click on and 593 run as administrator. Then once you plug in your device you can choose the 594 "list all devices" from the "option" menu and you should be able to see the 595 device as something like: "BitFORCE SHA256 SC". Choose the install or replace 596 driver option and select WinUSB. You can either google for zadig or download 597 it from the cgminer directory in the DOWNLOADS link above. 598 599 When you first switch a device over to WinUSB with zadig and it shows that 600 correctly on the left of the zadig window, but it still gives permission 601 errors, you may need to unplug the USB miner and then plug it back in. Some 602 users may need to reboot at this point. 603 604 605 LINUX: 606 607 The short version: 608 609 sudo cp 01-cgminer.rules /etc/udev/rules.d/ 610 611 612 The long version: 613 614 On linux, the direct USB support requires no drivers at all. However due to 615 permissions issues, you may not be able to mine directly on the devices as a 616 regular user without giving the user access to the device or by mining as 617 root (administrator). In order to give your regular user access, you can make 618 him a member of the plugdev group with the following commands: 619 620 sudo usermod -G plugdev -a `whoami` 621 622 If your distribution does not have the plugdev group you can create it with: 623 624 sudo groupadd plugdev 625 626 In order for the USB devices to instantly be owned by the plugdev group and 627 accessible by anyone from the plugdev group you can copy the file 628 "01-cgminer.rules" from the cgminer archive into the /etc/udev/rules.d 629 directory with the following command: 630 631 sudo cp 01-cgminer.rules /etc/udev/rules.d/ 632 633 After this you can either manually restart udev and re-login, or more easily 634 just reboot. 635 636 637 OSX: 638 639 On OSX, like Linux, no drivers need to be installed. However some devices 640 like the bitfury USB sticks automatically load a driver thinking they're a 641 modem and the driver needs to be unloaded for cgminer to work: 642 643 sudo kextunload -b com.apple.driver.AppleUSBCDC 644 sudo kextunload -b com.apple.driver.AppleUSBCDCACMData 645 646 There may be a limit to the number of USB devices that you are allowed to start. 647 The following set of commands, followed by a reboot will increase that: 648 649 sudo su 650 touch /etc/sysctl.conf 651 echo kern.sysv.semume=100 >> /etc/sysctl.conf 652 chown root:wheel /etc/sysctl.conf 653 chmod 0644 /etc/sysctl.conf 654 655 Some devices need superuser access to mine on them so cgminer may need to 656 be started with sudo 657 i.e.: 658 sudo cgminer <insert commands here> 659 660 661 --- 662 663 Advanced USB options: 664 665 The --usb option can restrict how many USB devices are found: 666 667 --usb 1:2,1:3,1:4,1:* 668 or 669 --usb BAS:1,BFL:1,MMQ:0,ICA:0,KLN:0 670 or 671 --usb :10 672 673 You can only use one of the above 3 674 675 The first version 676 --usb 1:2,1:3,1:4,1:* 677 allows you to select which devices to mine on with a list of USB 678 bus_number:device_address 679 All other USB devices will be ignored 680 Hotplug will also only look at the devices matching the list specified and 681 find nothing new if they are all in use 682 You can specify just the USB bus_number to find all devices like 1:* 683 which means any devices on USB bus_number 1 684 This is useful if you unplug a device then plug it back in the same port, 685 it usually reappears with the same bus_number but a different device_address 686 687 You can see the list of all USB devices on linux with 'sudo lsusb' 688 Cgminer will list the recognised USB devices 689 690 with the '-n' option or the 691 '--usb-dump 0' option 692 The '--usb-dump N' option with a value of N greater than 0 will dump a lot 693 of details about each recognised USB device 694 If you wish to see all USB devices, include the --usb-list-all option 695 696 The second version 697 --usb BAS:1,BFL:1,MMQ:0,ICA:0,KLN:0 698 allows you to specify how many devices to choose based on each device 699 driver cgminer has - the current USB drivers are: 700 AVA, BAS, BFL, BF1, DRB, HFA, ICA, KLN and MMQ. 701 702 N.B. you can only specify which device driver to limit, not the type of 703 each device, e.g. with BAS:n you can limit how many BFL ASIC devices will 704 be checked, but you cannot limit the number of each type of BFL ASIC 705 706 Also note that the MMQ count is the number of MMQ backplanes you have 707 not the number of MMQ FPGAs 708 709 The third version 710 --usb :10 711 means only use a maximum of 10 devices of any supported USB devices 712 Once cgminer has 10 devices it will not configure any more and hotplug will 713 not scan for any more 714 If one of the 10 devices stops working, hotplug - if enabled, as is default 715 - will scan normally again until it has 10 devices 716 717 --usb :0 will disable all USB I/O other than to initialise libusb 718 719 --- 720 721 WHILE RUNNING: 722 723 The following options are available while running with a single keypress: 724 725 [U]SB management [P]ool management [S]ettings [D]isplay options [Q]uit 726 727 728 U gives you: 729 730 [S]ummary of device information 731 [E]nable device 732 [D]isable device 733 [U]nplug to allow hotplug restart 734 [R]eset device USB 735 [L]ist all known devices 736 [B]lacklist current device from current instance of cgminer 737 [W]hitelist previously blacklisted device 738 [H]otplug interval (0 to disable) 739 740 741 P gives you: 742 743 Current pool management strategy: Failover 744 [F]ailover only disabled 745 [A]dd pool [R]emove pool [D]isable pool [E]nable pool 746 [C]hange management strategy [S]witch pool [I]nformation 747 748 749 S gives you: 750 751 [Q]ueue: 1 752 [S]cantime: 60 753 [E]xpiry: 120 754 [W]rite config file 755 [C]gminer restart 756 757 758 D gives you: 759 760 [N]ormal [C]lear [S]ilent mode (disable all output) 761 [D]ebug:off 762 [P]er-device:off 763 [Q]uiet:off 764 [V]erbose:off 765 [R]PC debug:off 766 [W]orkTime details:off 767 co[M]pact: off 768 [T]oggle status switching:enabled 769 [Z]ero statistics 770 [L]og interval:5 771 772 773 Q quits the application. 774 775 776 The running log shows output like this: 777 778 [2013-11-09 11:04:41] Accepted 01b3bde7 Diff 150/128 AVA 1 pool 0 779 [2013-11-09 11:04:49] Accepted 015df995 Diff 187/128 AVA 1 pool 0 780 [2013-11-09 11:04:50] Accepted 01163b68 Diff 236/128 AVA 1 pool 0 781 [2013-11-09 11:04:53] Accepted 9f745840 Diff 411/128 BAS 1 pool 0 782 783 The 8 byte hex value are the 1st nonzero bytes of the share being submitted to 784 the pool. The 2 diff values are the actual difficulty target that share reached 785 followed by the difficulty target the pool is currently asking for. 786 787 --- 788 Also many issues and FAQs are covered in the forum thread 789 dedicated to this program, 790 http://forum.bitcoin.org/index.php?topic=28402.0 791 792 DISPLAY: 793 794 The display is roughly split into two portions, the top status window and the 795 bottom scrolling log window. 796 797 798 STATUS WINDOW 799 The status window is split into overall status and per device status. 800 801 Overall status: 802 803 The output line shows the following: 804 (5s):2.469T (1m):2.677T (5m):2.040T (15m):1.014T (avg):2.733Th/s 805 806 These are exponentially decaying average hashrates over 5s/1m/5m/15m and an 807 average since the start. 808 809 Followed by: 810 A:290391 R:5101 HW:145 WU:37610.4/m 811 812 Each column is as follows: 813 A: The total difficulty of Accepted shares 814 R: The total difficulty of Rejected shares 815 HW: The number of HardWare errors 816 WU: The Work Utility defined as the number of diff1 shares work / minute 817 (accepted or rejected). 818 819 alternating with: 820 ST: 22 SS: 0 NB: 2 LW: 356090 GF: 0 RF: 0 821 822 ST is STaged work items (ready to use). 823 SS is Stale Shares discarded (detected and not submitted so don't count as rejects) 824 NB is New Blocks detected on the network 825 LW is Locally generated Work items 826 GF is Getwork Fail Occasions (server slow to provide work) 827 RF is Remote Fail occasions (server slow to accept work) 828 829 Followed by: 830 Connected to pool.com diff 3.45K with stratum as user me 831 832 The diff shown is the current vardiff requested by the pool currently being 833 mined at. 834 835 Followed by: 836 Block: ca0d237f... Diff:5.01G Started: [00:14:27] Best share: 1.18M 837 838 This shows a short stretch about the current block, when the new block started, 839 and the all time best difficulty share you've found since starting cgminer 840 this time. 841 842 Per device status: 843 844 6: HFS Random : 645MHz 85C 13% 0.79V | 2.152T / 1.351Th/s 845 846 Each column is as follows: 847 Temperature (if supported) 848 Fanspeed (if supported) 849 Voltage (if supported) 850 851 A 5 second exponentially decaying average hash rate 852 An all time average hash rate 853 854 alternating with 855 856 6: HFS Random : 645MHz 86C 13% 0.80V | A:290348 R:1067 HW:88 WU:18901.8/m 857 858 The total difficulty of accepted shares 859 The total difficulty of rejected shares 860 The number of hardware erorrs 861 The work utility defined as the number of diff1 shares work / minute 862 863 864 LOG WINDOW 865 866 All running information is shown here, usually share submission results and 867 block update notifications, along with device messages and warnings. 868 869 [2014-03-29 00:24:09] Accepted 1397768d Diff 3.35K/2727 HFS 0 pool 0 870 [2014-03-29 00:24:13] Stratum from pool 0 detected new block 871 872 873 --- 874 MULTIPOOL 875 876 FAILOVER STRATEGIES WITH MULTIPOOL: 877 A number of different strategies for dealing with multipool setups are 878 available. Each has their advantages and disadvantages so multiple strategies 879 are available by user choice, as per the following list: 880 881 FAILOVER: 882 The default strategy is failover. This means that if you input a number of 883 pools, it will try to use them as a priority list, moving away from the 1st 884 to the 2nd, 2nd to 3rd and so on. If any of the earlier pools recover, it will 885 move back to the higher priority ones. 886 887 ROUND ROBIN: 888 This strategy only moves from one pool to the next when the current one falls 889 idle and makes no attempt to move otherwise. 890 891 ROTATE: 892 This strategy moves at user-defined intervals from one active pool to the next, 893 skipping pools that are idle. 894 895 LOAD BALANCE: 896 This strategy sends work to all the pools on a quota basis. By default, all 897 pools are allocated equal quotas unless specified with --quota. This 898 apportioning of work is based on work handed out, not shares returned so is 899 independent of difficulty targets or rejected shares. While a pool is disabled 900 or dead, its quota is dropped until it is re-enabled. Quotas are forward 901 looking, so if the quota is changed on the fly, it only affects future work. 902 If all pools are set to zero quota or all pools with quota are dead, it will 903 fall back to a failover mode. See quota below for more information. 904 905 The failover-only flag has special meaning in combination with load-balance 906 mode and it will distribute quota back to priority pool 0 from any pools that 907 are unable to provide work for any reason so as to maintain quota ratios 908 between the rest of the pools. 909 910 BALANCE: 911 This strategy monitors the amount of difficulty 1 shares solved for each pool 912 and uses it to try to end up doing the same amount of work for all pools. 913 914 915 --- 916 QUOTAS 917 918 The load-balance multipool strategy works off a quota based scheduler. The 919 quotas handed out by default are equal, but the user is allowed to specify any 920 arbitrary ratio of quotas. For example, if all the quota values add up to 100, 921 each quota value will be a percentage, but if 2 pools are specified and pool0 922 is given a quota of 1 and pool1 is given a quota of 9, pool0 will get 10% of 923 the work and pool1 will get 90%. Quotas can be changed on the fly by the API, 924 and do not act retrospectively. Setting a quota to zero will effectively 925 disable that pool unless all other pools are disabled or dead. In that 926 scenario, load-balance falls back to regular failover priority-based strategy. 927 While a pool is dead, it loses its quota and no attempt is made to catch up 928 when it comes back to life. 929 930 To specify quotas on the command line, pools should be specified with a 931 semicolon separated --quota(or -U) entry instead of --url. Pools specified with 932 --url are given a nominal quota value of 1 and entries can be mixed. 933 934 For example: 935 --url poola:porta -u usernamea -p passa --quota "2;poolb:portb" -u usernameb -p passb 936 Will give poola 1/3 of the work and poolb 2/3 of the work. 937 938 Writing configuration files with quotas is likewise supported. To use the above 939 quotas in a configuration file they would be specified thus: 940 941 "pools" : [ 942 { 943 "url" : "poola:porta", 944 "user" : "usernamea", 945 "pass" : "passa" 946 }, 947 { 948 "quota" : "2;poolb:portb", 949 "user" : "usernameb", 950 "pass" : "passb" 951 } 952 ] 953 954 955 --- 956 SOLO MINING 957 958 Solo mining can be done efficiently as a single pool entry or a backup to 959 any other pooled mining and it is recommended everyone have solo mining set up 960 as their final backup in case all their other pools are DDoSed/down for the 961 security of the network. To enable solo mining, one must be running a local 962 bitcoind/bitcoin-qt or have one they have rpc access to. To do this, edit your 963 bitcoind configuration file (bitcoin.conf) with the following extra lines, 964 using your choice of username and password: 965 966 rpcuser=username 967 rpcpassword=password 968 969 Restart bitcoind, then start cgminer, pointing to the bitcoind and choose a 970 btc address with the following options, altering to suit their setup: 971 972 cgminer -o http://localhost:8332 -u username -p password --btc-address 15qSxP1SQcUX3o4nhkfdbgyoWEFMomJ4rZ 973 974 Note the http:// is mandatory for solo mining. 975 976 --- 977 LOGGING 978 979 cgminer will log to stderr if it detects stderr is being redirected to a file. 980 To enable logging simply add 2>logfile.txt to your command line and logfile.txt 981 will contain the logged output at the log level you specify (normal, verbose, 982 debug etc.) 983 984 In other words if you would normally use: 985 ./cgminer -o xxx -u yyy -p zzz 986 if you use 987 ./cgminer -o xxx -u yyy -p zzz 2>logfile.txt 988 it will log to a file called logfile.txt and otherwise work the same. 989 990 There is also the -m option on linux which will spawn a command of your choice 991 and pipe the output directly to that command. 992 993 The WorkTime details 'debug' option adds details on the end of each line 994 displayed for Accepted or Rejected work done. An example would be: 995 996 <-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 997 998 The first 2 hex codes are the previous block hash, the rest are reported in 999 seconds unless stated otherwise: 1000 The previous hash is followed by the getwork mode used M:X where X is one of 1001 P:Pool, T:Test Pool, L:LP or B:Benchmark, 1002 then D:d.ddd is the difficulty required to get a share from the work, 1003 then G:hh:mm:ss:n.nnn, which is when the getwork or LP was sent to the pool and 1004 the n.nnn is how long it took to reply, 1005 followed by 'O' on it's own if it is an original getwork, or 'C:n.nnn' if it was 1006 a clone with n.nnn stating how long after the work was recieved that it was cloned, 1007 (m.mmm) is how long from when the original work was received until work started, 1008 W:n.nnn is how long the work took to process until it was ready to submit, 1009 (m.mmm) is how long from ready to submit to actually doing the submit, this is 1010 usually 0.000 unless there was a problem with submitting the work, 1011 S:n.nnn is how long it took to submit the completed work and await the reply, 1012 R:hh:mm:ss is the actual time the work submit reply was received 1013 1014 If you start cgminer with the --sharelog option, you can get detailed 1015 information for each share found. The argument to the option may be "-" for 1016 standard output (not advisable with the ncurses UI), any valid positive number 1017 for that file descriptor, or a filename. 1018 1019 To log share data to a file named "share.log", you can use either: 1020 ./cgminer --sharelog 50 -o xxx -u yyy -p zzz 50>share.log 1021 ./cgminer --sharelog share.log -o xxx -u yyy -p zzz 1022 1023 For every share found, data will be logged in a CSV (Comma Separated Value) 1024 format: 1025 timestamp,disposition,target,pool,dev,thr,sharehash,sharedata 1026 For example (this is wrapped, but it's all on one line for real): 1027 1335313090,reject, 1028 ffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000, 1029 http://localhost:8337,ASC0,0, 1030 6f983c918f3299b58febf95ec4d0c7094ed634bc13754553ec34fc3800000000, 1031 00000001a0980aff4ce4a96d53f4b89a2d5f0e765c978640fe24372a000001c5 1032 000000004a4366808f81d44f26df3d69d7dc4b3473385930462d9ab707b50498 1033 f681634a4f1f63d01a0cd43fb338000000000080000000000000000000000000 1034 0000000000000000000000000000000000000000000000000000000080020000 1035 1036 --- 1037 1038 BENCHMARK 1039 1040 The --benchmark option hashes a single fixed work item over and over and does 1041 not submit shares to any pools. 1042 1043 The --benchfile <arg> option hashes the work given in the file <arg> supplied. 1044 The format of the work file is: 1045 version,merkleroot,prevhash,diffbits,noncetime 1046 Any empty line or any line starting with '#' or '/' is ignored. 1047 When it reaches the end of the file it continues back at the top. 1048 1049 The format of the data items matches the byte ordering and format of the 1050 the bitcoind getblock RPC output. 1051 1052 An example file containing bitcoin block #1 would be: 1053 1054 # Block 1 1055 1,0e3e2357e806b6cdb1f70b54c3a3a17b6714ee1f0e68bebb44a74b1efd512098,00000000001 1056 9d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f,1d00ffff,1231469665 1057 1058 However, the work data should be one line without the linebreak in the middle 1059 1060 If you use --benchfile <arg>, then --benchfile-display will output a log line, 1061 for each nonce found, showing the nonce value in decimal and hex and the work 1062 used to find it in hex. 1063 1064 --- 1065 1066 RPC API 1067 1068 For RPC API details see the API-README file 1069 1070 --- 1071 1072 FAQ 1073 1074 Q: Help, I've started cgminer and everything reads zero!? 1075 A: Welcome to bitcoin mining. Your computer by itself cannot mine bitcoin no 1076 matter how powerful it is. You have to purchase dedicated mining hardware 1077 called ASICs to plug into your computer. See Q regarding ASICs below. 1078 1079 Q: I have multiple USB stick devices but I can't get them all to work at once? 1080 A: Very few USB hubs deliver the promised power required to run as many devices 1081 as they fit if all of them draw power from USB. 1082 1083 Q: I've plugged my devices into my USB hub but nothing shows up? 1084 A: RPis and Windows have incomplete or non-standard USB3 support so they may 1085 never work. It may be possible to get a USB3 hub to work by plugging it into 1086 a USB2 hub. When choosing a hub, USB2 hubs are preferable whenever possible 1087 due to better support all round. 1088 1089 Q: Can I mine on servers from different networks (eg xxxcoin and bitcoin) at 1090 the same time? 1091 A: No, cgminer keeps a database of the block it's working on to ensure it does 1092 not work on stale blocks, and having different blocks from two networks would 1093 make it invalidate the work from each other. 1094 1095 Q: Can I configure cgminer to mine with different login credentials or pools 1096 for each separate device? 1097 A: No. 1098 1099 Q: Can I put multiple pools in the config file? 1100 A: Yes, check the example.conf file. Alternatively, set up everything either on 1101 the command line or via the menu after startup and choose settings->write 1102 config file and the file will be loaded one each startup. 1103 1104 Q: The build fails with gcc is unable to build a binary. 1105 A: Remove the "-march=native" component of your CFLAGS as your version of gcc 1106 does not support it. Also -O2 is capital o 2, not zero 2. 1107 1108 Q: Can you implement feature X? 1109 A: I can, but time is limited, and people who donate are more likely to get 1110 their feature requests implemented. 1111 1112 Q: Work keeps going to my backup pool even though my primary pool hasn't 1113 failed? 1114 A: Cgminer checks for conditions where the primary pool is lagging and will 1115 pass some work to the backup servers under those conditions. The reason for 1116 doing this is to try its absolute best to keep the devices working on something 1117 useful and not risk idle periods. You can disable this behaviour with the 1118 option --failover-only. 1119 1120 Q: Is this a virus? 1121 A: Cgminer is being packaged with other trojan scripts and some antivirus 1122 software is falsely accusing cgminer.exe as being the actual virus, rather 1123 than whatever it is being packaged with. If you installed cgminer yourself, 1124 then you do not have a virus on your computer. Complain to your antivirus 1125 software company. They seem to be flagging even source code now from cgminer 1126 as viruses, even though text source files can't do anything by themself. 1127 1128 Q: Can you modify the display to include more of one thing in the output and 1129 less of another, or can you change the quiet mode or can you add yet another 1130 output mode? 1131 A: Everyone will always have their own view of what's important to monitor. 1132 The defaults are very sane and I have very little interest in changing this 1133 any further. There is far more detail in the API output than can be reasonably 1134 displayed on the small console window, and using an external interface such 1135 as miner.php is much more useful for setups with many devices. 1136 1137 Q: What are the best parameters to pass for X pool/hardware/device. 1138 A: Virtually always, the DEFAULT parameters give the best results. Most user 1139 defined settings lead to worse performance. 1140 1141 Q: What happened to CPU and GPU mining? 1142 A: Their efficiency makes them irrelevant in the bitcoin mining world today 1143 and the author has no interest in supporting alternative coins that are better 1144 mined by these devices. 1145 1146 Q: GUI version? 1147 A: No. The RPC interface makes it possible for someone else to write one 1148 though. 1149 1150 Q: I'm having an issue. What debugging information should I provide? 1151 A: Start cgminer with your regular commands and add -D -T --verbose and provide 1152 the full startup output and a summary of your hardware and operating system. 1153 1154 Q: Why don't you provide win64 builds? 1155 A: Win32 builds work everywhere and there is precisely zero advantage to a 1156 64 bit build on windows. 1157 1158 Q: Is it faster to mine on windows or linux? 1159 A: It makes no difference in terms of performance. It comes down to choice of 1160 operating system for their various features and your comfort level. However 1161 linux is the primary development platform and is virtually guaranteed to be 1162 more stable. 1163 1164 Q: My network gets slower and slower and then dies for a minute? 1165 A; Try the --net-delay option if you are on a GBT server. This does nothing 1166 with stratum mining. 1167 1168 Q: How do I tune for p2pool? 1169 A: It is also recommended to use --failover-only since the work is effectively 1170 like a different block chain, and not enabling --no-submit-stale. If mining with 1171 a BFL (fpga) minirig, it is worth adding the --bfl-range option. 1172 1173 Q: I run PHP on windows to access the API with the example miner.php. Why does 1174 it fail when php is installed properly but I only get errors about Sockets not 1175 working in the logs? 1176 A: http://us.php.net/manual/en/sockets.installation.php 1177 1178 Q: What is a PGA? 1179 A: Cgminer supports 3 FPGAs: BitForce, Icarus and ModMiner. 1180 They are Field-Programmable Gate Arrays that have been programmed to do Bitcoin 1181 mining. Since the acronym needs to be only 3 characters, the "Field-" part has 1182 been skipped. 1183 1184 Q: What is an ASIC? 1185 A: They are Application Specify Integrated Circuit devices and provide the 1186 highest performance per unit power due to being dedicated to only one purpose. 1187 They are the only meaningful way to mine bitcoin today. 1188 1189 Q: What is stratum and how do I use it? 1190 A: Stratum is a protocol designed for pooled mining in such a way as to 1191 minimise the amount of network communications, yet scale to hardware of any 1192 speed. With versions of cgminer 2.8.0+, if a pool has stratum support, cgminer 1193 will automatically detect it and switch to the support as advertised if it can. 1194 If you input the stratum port directly into your configuration, or use the 1195 special prefix "stratum+tcp://" instead of "http://", cgminer will ONLY try to 1196 use stratum protocol mining. The advantages of stratum to the miner are no 1197 delays in getting more work for the miner, less rejects across block changes, 1198 and far less network communications for the same amount of mining hashrate. If 1199 you do NOT wish cgminer to automatically switch to stratum protocol even if it 1200 is detected, add the --fix-protocol option. 1201 1202 Q: Why don't the statistics add up: Accepted, Rejected, Stale, Hardware Errors, 1203 Diff1 Work, etc. when mining greater than 1 difficulty shares? 1204 A: As an example, if you look at 'Difficulty Accepted' in the RPC API, the number 1205 of difficulty shares accepted does not usually exactly equal the amount of work 1206 done to find them. If you are mining at 8 difficulty, then you would expect on 1207 average to find one 8 difficulty share, per 8 single difficulty shares found. 1208 However, the number is actually random and converges over time, it is an average, 1209 not an exact value, thus you may find more or less than the expected average. 1210 1211 Q: My keyboard input momentarily pauses or repeats keys every so often on 1212 windows while mining? 1213 A: The USB implementation on windows can be very flaky on some hardware and 1214 every time cgminer looks for new hardware to hotplug it it can cause these 1215 sorts of problems. You can disable hotplug with: 1216 --hotplug 0 1217 1218 Q: What should my Work Utility (WU) be? 1219 A: Work utility is the product of hashrate * luck and only stabilises over a 1220 very long period of time. Assuming all your work is valid work, bitcoin mining 1221 should produce a work utility of approximately 1 per 71.6MH. This means at 1222 5GH you should have a WU of 5000 / 71.6 or ~ 69. You cannot make your machine 1223 do "better WU" than this - it is luck related. However you can make it much 1224 worse if your machine produces a lot of hardware errors producing invalid work. 1225 1226 Q: What should I build in for a generic distribution binary? 1227 A: There are a number of drivers that expect to be used on dedicated standalone 1228 hardware. That said, the drivers that are designed to work generically with 1229 USB on any hardware are the following: 1230 1231 --enable-avalon 1232 --enable-avalon2 1233 --enable-avalon4 1234 --enable-avalon7 1235 --enable-avalon8 1236 --enable-bflsc 1237 --enable-bitfury 1238 --enable-cointerra 1239 --enable-drillbit 1240 --enable-hashfast 1241 --enable-hashratio 1242 --enable-icarus 1243 --enable-klondike 1244 1245 Q: How do I use the --decode function to decode a pool's coinbase? 1246 A: You need to have a bitcoind with server functionality and pass it the 1247 credentials as the first pool in your config, and pass the pool's address that 1248 you wish to decode as the second pool configured. Note the bitcoind NEEDS the 1249 http:// prefix. 1250 1251 e.g.: 1252 ./cgminer -o http://localhost:8332 -u user -p pass -o solo.ckpool.org:3333 -u 15qSxP1SQcUX3o4nhkfdbgyoWEFMomJ4rZ --decode 1253 1254 1255 --- 1256 1257 This code is provided entirely free of charge by the programmer in his spare 1258 time so donations would be greatly appreciated. Please consider donating to the 1259 address below. Driver development for new ASIC only bitcoin hardware can be 1260 suitably sponsored. 1261 1262 Con Kolivas <kernel@kolivas.org> 1263 15qSxP1SQcUX3o4nhkfdbgyoWEFMomJ4rZ