This is the official thread for support and development of
cgminer, the ASIC bitcoin miner written in c, cross platform for windows,
linux, OSX and other, with monitoring, fanspeed control and remote interface
capabilities, completely overhauled based on the original code cpuminer. There
is NO
SUPPORT for CPU, GPU or altcoin mining in this thread, nor older versions with that functionality, nor any support for unofficial forks of this code.
Note that as maintainer of cgminer am FOR segwit and AGAINST Emergent Consensus.
This code is provided entirely free of charge by the programmer in his spare
time so donations would be greatly appreciated.
Help can also be obtained on IRC: irc.freenode.net #cgminer
READ THE README INCLUDED IN THE ARCHIVE BEFORE ASKING QUESTIONS WHICH CAN ALSO BE FOUND HERE:
http://ck.kolivas.org/apps/cgminer/README
Note that I can NOT provide personalised support via email or personal messages under normal circumstances so they will usually be ignored.
Apologies, but the demand is just far too great and I must prioritise my time.
All files available for DOWNLOAD from here:
http://ck.kolivas.org/apps/cgminer
Debug builds are in http://ck.kolivas.org/apps/cgminer/debug/
.lrz files are compressed with lrzip http://lrzip.kolivas.org for much better compression and supports extreme encryption technology which is ideal for securing wallets.
LATEST RELEASE: 4.10.0 see:
https://bitcointalk.org/index.php?topic=28402.msg17594456#msg17594456
Note that the x86_64 binary is a 64 bit binary for UBUNTU 16.10.
Git tree:
https://github.com/ckolivas/cgminer
Latest git source tarball:
https://github.com/ckolivas/cgminer/tarball/master
Unofficial OSX binaries:
http://spaceman.ca/cgminer/
NOTE: This code is licensed under the GPLv3. This means that the source to any
modifications you make to this code MUST be provided by law if you distribute
modified binaries. See COPYING for details.
Features:
- Very low overhead free c code for Linux and windows with very low non-mining CPU and ram usage
- Stratum and GBT pooled mining protocol support, including ultra low overhead solo mining
- Scaleable networking scheduler designed to scale to any size hashrate without networking delays yet minimise connection overhead
- long poll support - will use longpoll from any pool if primary pool does not support it
- Self detection of new blocks with a mini-database for slow/failing longpoll scenarios, maximum work efficiency and minimum rejects.
- Heavily threaded code hands out work retrieval and work submission to separate threads to not hinder devices working
- Caching of submissions during transient network outages
- Preemptive fetching of work prior to completion of current work
- Local generation of valid work (via stratum, GBT or ntime rollover) whenever possible, as supported on a per-work item basis
- Prevention of stale work submission on new block
- Summarised and discrete device data statistics of requests, accepts, rejects, hw errors and work utility
- Summary displayed when quitting
- Supports multiple pools with multiple intelligent failover mechanisms
- Temporary disabling of misbehaving pools rejecting all shares
- On the fly menu based management of most settings
- Trickling of extra work to backup pools if primary pool is responding but slow
- RPC +/- JSON interface for remote control
- Bitforce support - singles and minirig
- Icarus support
- Modminer support
- Ability to cope with slow routers
- Submit-old support
- X-Reject-Reason support
- Variable difficulty support
- Share difficulty reporting
- Target and block difficulty displays
- Block solve detection
- ASIC Avalon support
- Bitburner support
- Redfury/Bluefury USB stick support
- Bi*fury USB support
- Hexfury USB support
- Onestring miner support
- BlackArrow Bitfury support
- BFL SC asic support
- Drillbit support
- Klondike support
- KnCminer Saturn support
- KnCminer Jupiter support
- KnCminer Neptune support
- Hashfast support
- Nanofury support
- Minion support
- Antminer U1/2+ support
- Bitmine A1 support
- Avalon2/3 support
- Bitmain S1 support
- Cointerra support
- BFx2 support
- Spondoolies SP10 support
- Spondoolies SP30 support
- Rockminer R-Box support
- Hashratio support
- Avalon4/5/6/7 support
- Compac gekko support
- Direct USB communications
- Device hotplug
- Heavily featured RPC API
- Multicast support
- Proxy support
- Lots of other stuff I can't remember. See options.
Sample output:
SUPPORT for CPU, GPU or altcoin mining in this thread, nor older versions with that functionality, nor any support for unofficial forks of this code.
Note that as maintainer of cgminer am FOR segwit and AGAINST Emergent Consensus.
This code is provided entirely free of charge by the programmer in his spare
time so donations would be greatly appreciated.
Help can also be obtained on IRC: irc.freenode.net #cgminer
READ THE README INCLUDED IN THE ARCHIVE BEFORE ASKING QUESTIONS WHICH CAN ALSO BE FOUND HERE:
http://ck.kolivas.org/apps/cgminer/README
Note that I can NOT provide personalised support via email or personal messages under normal circumstances so they will usually be ignored.
Apologies, but the demand is just far too great and I must prioritise my time.
All files available for DOWNLOAD from here:
http://ck.kolivas.org/apps/cgminer
Debug builds are in http://ck.kolivas.org/apps/cgminer/debug/
.lrz files are compressed with lrzip http://lrzip.kolivas.org for much better compression and supports extreme encryption technology which is ideal for securing wallets.
LATEST RELEASE: 4.10.0 see:
https://bitcointalk.org/index.php?topic=28402.msg17594456#msg17594456
Note that the x86_64 binary is a 64 bit binary for UBUNTU 16.10.
Git tree:
https://github.com/ckolivas/cgminer
Latest git source tarball:
https://github.com/ckolivas/cgminer/tarball/master
Unofficial OSX binaries:
http://spaceman.ca/cgminer/
NOTE: This code is licensed under the GPLv3. This means that the source to any
modifications you make to this code MUST be provided by law if you distribute
modified binaries. See COPYING for details.
Features:
- Very low overhead free c code for Linux and windows with very low non-mining CPU and ram usage
- Stratum and GBT pooled mining protocol support, including ultra low overhead solo mining
- Scaleable networking scheduler designed to scale to any size hashrate without networking delays yet minimise connection overhead
- long poll support - will use longpoll from any pool if primary pool does not support it
- Self detection of new blocks with a mini-database for slow/failing longpoll scenarios, maximum work efficiency and minimum rejects.
- Heavily threaded code hands out work retrieval and work submission to separate threads to not hinder devices working
- Caching of submissions during transient network outages
- Preemptive fetching of work prior to completion of current work
- Local generation of valid work (via stratum, GBT or ntime rollover) whenever possible, as supported on a per-work item basis
- Prevention of stale work submission on new block
- Summarised and discrete device data statistics of requests, accepts, rejects, hw errors and work utility
- Summary displayed when quitting
- Supports multiple pools with multiple intelligent failover mechanisms
- Temporary disabling of misbehaving pools rejecting all shares
- On the fly menu based management of most settings
- Trickling of extra work to backup pools if primary pool is responding but slow
- RPC +/- JSON interface for remote control
- Bitforce support - singles and minirig
- Icarus support
- Modminer support
- Ability to cope with slow routers
- Submit-old support
- X-Reject-Reason support
- Variable difficulty support
- Share difficulty reporting
- Target and block difficulty displays
- Block solve detection
- ASIC Avalon support
- Bitburner support
- Redfury/Bluefury USB stick support
- Bi*fury USB support
- Hexfury USB support
- Onestring miner support
- BlackArrow Bitfury support
- BFL SC asic support
- Drillbit support
- Klondike support
- KnCminer Saturn support
- KnCminer Jupiter support
- KnCminer Neptune support
- Hashfast support
- Nanofury support
- Minion support
- Antminer U1/2+ support
- Bitmine A1 support
- Avalon2/3 support
- Bitmain S1 support
- Cointerra support
- BFx2 support
- Spondoolies SP10 support
- Spondoolies SP30 support
- Rockminer R-Box support
- Hashratio support
- Avalon4/5/6/7 support
- Compac gekko support
- Direct USB communications
- Device hotplug
- Heavily featured RPC API
- Multicast support
- Proxy support
- Lots of other stuff I can't remember. See options.
Sample output:
Code:
cgminer version 4.2.1 - Started:
[2014-03-29 10:06:52]
--------------------------------------------------------------------------------
(5s):4.300T (1m):4.324T (5m):4.240T (15m):4.219T (avg):4.242Th/s
A:9885432 R:64389 HW:1749 WU:59420.7/m
Connected to au.ozco.in diff 6.45K with stratum as user ckolivas.0
Block: a1e68974... Diff:5.01G Started: [12:48:48] Best share: 3.41M
--------------------------------------------------------------------------------
[U]SB management [P]ool management [S]ettings [D]isplay options [Q]uit
0: ANU 0 : | 1.989G / 1.980Gh/s
1: NF1 0 : | 2.417G / 2.404Gh/s
2: BXM 0 : | 3.798G / 3.781Gh/s
3: BXM 1 : | 3.879G / 3.867Gh/s
4: BXF 0 : 45.9C | 4.959G / 4.908Gh/s
5: CTA 013219f9: 850MHz 75.4C 0.68V | 1.056T / 803.3Gh/s
6: CTA 013219fa: 850MHz 116.1C 0.68V | 643.6G / 805.5Gh/s
7: HFS Random : 645MHz 86C 37% 0.79V | 1.314T / 1.369Th/s
8: BF1 0d110c15: | 2.275G / 2.288Gh/s
9: HFS IceDrill: 604MHz 86C 23% 0.80V | 1.214T / 1.250Th/s
--------------------------------------------------------------------------------
(5s):4.300T (1m):4.324T (5m):4.240T (15m):4.219T (avg):4.242Th/s
A:9885432 R:64389 HW:1749 WU:59420.7/m
Connected to au.ozco.in diff 6.45K with stratum as user ckolivas.0
Block: a1e68974... Diff:5.01G Started: [12:48:48] Best share: 3.41M
--------------------------------------------------------------------------------
[U]SB management [P]ool management [S]ettings [D]isplay options [Q]uit
0: ANU 0 : | 1.989G / 1.980Gh/s
1: NF1 0 : | 2.417G / 2.404Gh/s
2: BXM 0 : | 3.798G / 3.781Gh/s
3: BXM 1 : | 3.879G / 3.867Gh/s
4: BXF 0 : 45.9C | 4.959G / 4.908Gh/s
5: CTA 013219f9: 850MHz 75.4C 0.68V | 1.056T / 803.3Gh/s
6: CTA 013219fa: 850MHz 116.1C 0.68V | 643.6G / 805.5Gh/s
7: HFS Random : 645MHz 86C 37% 0.79V | 1.314T / 1.369Th/s
8: BF1 0d110c15: | 2.275G / 2.288Gh/s
9: HFS IceDrill: 604MHz 86C 23% 0.80V | 1.214T / 1.250Th/s
---
USB menu:
USB menu:
Code:
Hotplug
interval:5
8 USB devices, 7 enabled, 0 disabled, 1 zombie
[S]ummary of device information
[E]nable device
[D]isable device
[U]nplug to allow hotplug restart
[R]eset device USB
[L]ist all known devices
[B]lacklist current device from current instance of cgminer
[W]hitelist previously blacklisted device
[H]otplug interval (0 to disable)
Select an option or any other key to return
8 USB devices, 7 enabled, 0 disabled, 1 zombie
[S]ummary of device information
[E]nable device
[D]isable device
[U]nplug to allow hotplug restart
[R]eset device USB
[L]ist all known devices
[B]lacklist current device from current instance of cgminer
[W]hitelist previously blacklisted device
[H]otplug interval (0 to disable)
Select an option or any other key to return
Pool menu:
Code:
0:
Enabled Alive Quota 1 Prio 0: stratum+tcp://au.ozco.in:3333
User:ckolivas.0
1: Enabled Alive Quota 1 Prio 1: stratum+tcp://hash.mineb.tc:3333 User:ckolivas.0
2: Enabled Alive Quota 1 Prio 2: stratum+tcp://stratum.ozco.in:3333 User:ckolivas.0
3: Enabled Dead Quota 1 Prio 3: stratum+tcp://us1.eclipsemc.com:3333 User:ckolivas_0
4: Enabled Alive Quota 1 Prio 4: stratum+tcp://api-stratum.bitcoin.cz:3333 User:ckolivas.0
5: Enabled Alive Quota 1 Prio 5: stratum+tcp://stratum.btcguild.com:3333 User:ckolivas_0
Current pool management strategy: Failover
Pool [A]dd [R]emove [D]isable [E]nable [Q]uota change
[C]hange management strategy [S]witch pool [I]nformation
Or press any other key to continue
1: Enabled Alive Quota 1 Prio 1: stratum+tcp://hash.mineb.tc:3333 User:ckolivas.0
2: Enabled Alive Quota 1 Prio 2: stratum+tcp://stratum.ozco.in:3333 User:ckolivas.0
3: Enabled Dead Quota 1 Prio 3: stratum+tcp://us1.eclipsemc.com:3333 User:ckolivas_0
4: Enabled Alive Quota 1 Prio 4: stratum+tcp://api-stratum.bitcoin.cz:3333 User:ckolivas.0
5: Enabled Alive Quota 1 Prio 5: stratum+tcp://stratum.btcguild.com:3333 User:ckolivas_0
Current pool management strategy: Failover
Pool [A]dd [R]emove [D]isable [E]nable [Q]uota change
[C]hange management strategy [S]witch pool [I]nformation
Or press any other key to continue
Change settings menu:
Code:
[W]rite
config file
[C]gminer restart
Select an option or any other key to return
[C]gminer restart
Select an option or any other key to return
Display menu:
Code:
[N]ormal
[C]lear [S]ilent mode (disable all output)
[D]ebug:off
[P]er-device:off
[Q]uiet:off
[V]erbose:off
[R]PC debug:off
[W]orkTime details:off
co[M]pact: off
[T]oggle status switching:enabled
w[I]descreen:disabled
[Z]ero statistics
[L]og interval:5
[D]ebug:off
[P]er-device:off
[Q]uiet:off
[V]erbose:off
[R]PC debug:off
[W]orkTime details:off
co[M]pact: off
[T]oggle status switching:enabled
w[I]descreen:disabled
[Z]ero statistics
[L]og interval:5
On exiting:
Code:
Summary
of runtime statistics:
Started at [2011-07-19 14:40:09]
Runtime: 2 hrs : 31 mins : 18 secs
Average hashrate: 1680.1 Megahash/s
Queued work requests: 3317
Share submissions: 3489
Accepted shares: 3489
Rejected shares: 0
Reject ratio: 0.0
Hardware errors: 0
Efficiency (accepted / queued): 105%
Utility (accepted shares / min): 23.06/min
Discarded work due to new blocks: 0
Stale submissions discarded due to new blocks: 9
Unable to get work from server occasions: 16
Work items generated locally: 330
Submitting work remotely delay occasions: 33
New blocks detected on network: 10
Pool: http://ozco.in:8332
Queued work requests: 3253
Share submissions: 3426
Accepted shares: 3426
Rejected shares: 0
Reject ratio: 0.0
Efficiency (accepted / queued): 105%
Discarded work due to new blocks: 0
Stale submissions discarded due to new blocks: 9
Unable to get work from server occasions: 15
Submitting work remotely delay occasions: 33
Started at [2011-07-19 14:40:09]
Runtime: 2 hrs : 31 mins : 18 secs
Average hashrate: 1680.1 Megahash/s
Queued work requests: 3317
Share submissions: 3489
Accepted shares: 3489
Rejected shares: 0
Reject ratio: 0.0
Hardware errors: 0
Efficiency (accepted / queued): 105%
Utility (accepted shares / min): 23.06/min
Discarded work due to new blocks: 0
Stale submissions discarded due to new blocks: 9
Unable to get work from server occasions: 16
Work items generated locally: 330
Submitting work remotely delay occasions: 33
New blocks detected on network: 10
Pool: http://ozco.in:8332
Queued work requests: 3253
Share submissions: 3426
Accepted shares: 3426
Rejected shares: 0
Reject ratio: 0.0
Efficiency (accepted / queued): 105%
Discarded work due to new blocks: 0
Stale submissions discarded due to new blocks: 9
Unable to get work from server occasions: 15
Submitting work remotely delay occasions: 33
---
Usage instructions: Run "cgminer --help" to see options:
Usage: cgminer [-DdElmpPQqUsTouOchnV]
Options for both config file and command line:
--api-allow Allow API access (if enabled) only to the given list of [W:]IP[/Prefix] address[/subnets]
This overrides --api-network and you must specify 127.0.0.1 if it is required
W: in front of the IP address gives that address privileged access to all api commands
--api-description Description placed in the API status header (default: cgminer version)
--api-groups API one letter groups G:cmd:cmd[,P:cmd:*...]
See API-README for usage
--api-listen Listen for API requests (default: disabled)
By default any command that does not just display data returns access denied
See --api-allow to overcome this
--api-network Allow API (if enabled) to listen on/for any address (default: only 127.0.0.1)
--api-mcast Enable API Multicast listener, (default: disabled)
The listener will only run if the API is also enabled
--api-mcast-addr <arg> API Multicast listen address, (default: 224.0.0.75)
--api-mcast-code <arg> Code expected in the API Multicast message, don't use '-' (default: "FTW")
--api-mcast-port <arg> API Multicast listen port, (default: 4028)
--api-port Port number of miner API (default: 4028)
--balance Change multipool strategy from failover to even share balance
--benchmark Run cgminer in benchmark mode - produces no shares
--btc-address <arg> Set bitcoin target address when solo mining to bitcoind (mandatory)
--btc-sig <arg> Set signature to add to coinbase when solo mining (optional)
--compact Use compact display without per device statistics
--debug|-D Enable debug output
--disable-rejecting Automatically disable pools that continually reject shares
--fix-protocol Do not redirect to a different getwork protocol (eg. stratum)
--hotplug <arg> Set hotplug check time to <arg> seconds (0=never default: 5) - only with libusb
--kernel-path|-K <arg> Specify a path to where bitstream files are (default: "/usr/local/bin")
--load-balance Change multipool strategy from failover to quota based balance
--log|-l <arg> Interval in seconds between log output (default: 5)
--lowmem Minimise caching of shares for low memory applications
--monitor|-m <arg> Use custom pipe cmd for output messages
--net-delay Impose small delays in networking to not overload slow routers
--no-submit-stale Don't submit shares if they are detected as stale
--pass|-p <arg> Password for bitcoin JSON-RPC server
--per-device-stats Force verbose mode and output per-device statistics
--protocol-dump|-P Verbose dump of protocol-level activities
--quiet|-q Disable logging output, display status and errors
--real-quiet Disable all output
--rotate <arg> Change multipool strategy from failover to regularly rotate at N minutes (default: 0)
--round-robin Change multipool strategy from failover to round robin on failure
--sched-start <arg> Set a time of day in HH:MM to start mining (a once off without a stop time)
--sched-stop <arg> Set a time of day in HH:MM to stop mining (will quit without a start time)
--sharelog <arg> Append share log to file
--shares <arg> Quit after mining N shares (default: unlimited)
--socks-proxy <arg> Set socks4 proxy (host:port) for all pools without a proxy specified
--syslog Use system log for output messages (default: standard error)
--temp-cutoff <arg> Temperature where a device will be automatically disabled, one value or comma separated list (default: 95)
--text-only|-T Disable ncurses formatted screen output
--url|-o <arg> URL for bitcoin JSON-RPC server
--user|-u <arg> Username for bitcoin JSON-RPC server
--userpass|-O <arg> Username:Password pair for bitcoin JSON-RPC server
--verbose Log verbose output to stderr as well as status output
--widescreen Use extra wide display without toggling
Options for command line only:
--config|-c <arg> Load a JSON-format configuration file
See example.conf for an example configuration.
--default-config <arg> Specify the filename of the default config file
Loaded at start and used when saving without a name.
--help|-h Print this message
--version|-V Display version and exit
USB device (ASIC and FPGA) options:
--icarus-options <arg> Set specific FPGA board configurations - one set of values for all or comma separated
--icarus-timing <arg> Set how the Icarus timing is calculated - one setting/value for all or comma separated
--usb <arg> USB device selection (See below)
--usb-dump (See FPGA-README)
See FGPA-README or ASIC-README for more information regarding these.
ASIC only options:
--anu-freq <arg> Set AntminerU1 frequency in hex, range 150-500 (default: 200)
--avalon-auto Adjust avalon overclock frequency dynamically for best hashrate
--avalon-fan <arg> Set fanspeed percentage for avalon, single value or range (default: 20-100)
--avalon-freq <arg> Set frequency range for avalon-auto, single value or range
--avalon-cutoff <arg> Set avalon overheat cut off temperature (default: 60)
--avalon-options <arg> Set avalon options baud:miners:asic:timeout:freq
--avalon-temp <arg> Set avalon target temperature (default: 50)
--avalon2-freq Set frequency range for Avalon2, single value or range
--avalon2-voltage Set Avalon2 core voltage, in millivolts
--avalon2-fan Set Avalon2 target fan speed
--avalon2-cutoff <arg> Set Avalon2 overheat cut off temperature (default: 88)
--avalon2-fixed-speed Set Avalon2 fan to fixed speed
--avalon4-automatic-voltage Automatic adjust voltage base on module DH
--avalon4-voltage Set Avalon4 core voltage, in millivolts, step: 125
--avalon4-freq Set frequency for Avalon4, 1 to 3 values, example: 445:385:370
--avalon4-fan Set Avalon4 target fan speed range
--avalon4-temp <arg> Set Avalon4 target temperature (default: 42)
--avalon4-cutoff <arg> Set Avalon4 overheat cut off temperature (default: 65)
--avalon4-polling-delay <arg> Set Avalon4 polling delay value (ms) (default: 20)
--avalon4-ntime-offset <arg> Set Avalon4 MM ntime rolling max offset (default: 4)
--avalon4-aucspeed <arg> Set Avalon4 AUC IIC bus speed (default: 400000)
--avalon4-aucxdelay <arg> Set Avalon4 AUC IIC xfer read delay, 4800 ~= 1ms (default: 9600)
--bflsc-overheat <arg> Set overheat temperature where BFLSC devices throttle, 0 to disable (default: 90)
--bitburner-fury-options <arg> Override avalon-options for BitBurner Fury boards baud:miners:asic:timeout:freq
--bitburner-fury-voltage <arg> Set BitBurner Fury core voltage, in millivolts
--bitburner-voltage <arg> Set BitBurner (Avalon) core voltage, in millivolts
--bitmain-auto Adjust bitmain overclock frequency dynamically for best hashrate
--bitmain-cutoff Set bitmain overheat cut off temperature
--bitmain-fan Set fanspeed percentage for bitmain, single value or range (default: 20-100)
--bitmain-freq Set frequency range for bitmain-auto, single value or range
--bitmain-hwerror Set bitmain device detect hardware error
--bitmain-options Set bitmain options baud:miners:asic:timeout:freq
--bitmain-temp Set bitmain target temperature
--bxf-bits <arg> Set max BXF/HXF bits for overclocking (default: 54)
--bxf-temp-target <arg> Set target temperature for BXF/HXF devices (default: 82)
--bxm-bits <arg> Set BXM bits for overclocking (default: 50)
--compac-freq <arg> Set GekkoScience Compac frequency in MHz, range 100-500 (default: 150.0)
--hfa-hash-clock <arg> Set hashfast clock speed (default: 550)
--hfa-fail-drop <arg> Set how many MHz to drop clockspeed each failure on an overlocked hashfast device (default: 10)
--hfa-fan <arg> Set fanspeed percentage for hashfast, single value or range (default: 10-85)
--hfa-name <arg> Set a unique name for a single hashfast device specified with --usb or the first device found
--hfa-noshed Disable hashfast dynamic core disabling feature
--hfa-options <arg> Set hashfast options name:clock (comma separated)
--hfa-temp-overheat <arg> Set the hashfast overheat throttling temperature (default: 95)
--hfa-temp-target <arg> Set the hashfast target temperature (0 to disable) (default: 88)
--hfa-hash-clock <arg> Set hashfast clock speed (default: 550)
--hfa-fan <arg> Set fanspeed percentage for hashfast, single value or range (default: 10-85)
--hfa-temp-overheat <arg> Set the hashfast overheat throttling temperature (default: 95)
--hfa-temp-target <arg> Set the hashfast target temperature (0 to disable) (default: 88)
--hro-freq Set the hashratio clock frequency (default: 280)
--klondike-options <arg> Set klondike options clock:temptarget
--nfu-bits <arg> Set nanofury bits for overclocking, range 32-63 (default: 50)
--rock-freq <arg> Set RockMiner frequency in MHz, range 125-500 (default: 270.0)
See ASIC-README for more information regarding these.
FPGA only options:
--bfl-range Use nonce range on bitforce devices if supported
See FGPA-README for more information regarding this.
Cgminer should automatically find all of your Avalon ASIC, BFL ASIC, BitForce
FPGAs, Icarus bitstream FPGAs, Klondike ASIC, ASICMINER usb block erupters,
KnC ASICs, BaB ASICs, Hashfast ASICs and ModMiner FPGAs.
---
EXECUTIVE SUMMARY ON USAGE:
Single pool:
cgminer -o http://pool:port -u username -p password
Multiple pools:
cgminer -o http://pool1:port -u pool1username -p pool1password -o http://pool2:port -u pool2usernmae -p pool2password
Single pool with a standard http proxy:
cgminer -o "http:proxy:port|http://pool:port" -u username -p password
Single pool with a socks5 proxy:
cgminer -o "socks5:proxy:port|http://pool:port" -u username -p password
Single pool with stratum protocol support:
cgminer -o stratum+tcp://pool:port -u username -p password
Solo mining to local bitcoind:
cgminer -o http://localhost:8332 -u username -p password --btc-address 15qSxP1SQcUX3o4nhkfdbgyoWEFMomJ4rZ
The list of proxy types are:
http: standard http 1.1 proxy
http0: http 1.0 proxy
socks4: socks4 proxy
socks5: socks5 proxy
socks4a: socks4a proxy
socks5h: socks5 proxy using a hostname
If you compile cgminer with a version of CURL before 7.19.4 then some of the above will
not be available. All are available since CURL version 7.19.4
If you specify the --socks-proxy option to cgminer, it will only be applied to all pools
that don't specify their own proxy setting like above
After saving configuration from the menu, you do not need to give cgminer any
arguments and it will load your configuration.
Any configuration file may also contain a single
"include" : "filename"
to recursively include another configuration file.
Writing the configuration will save all settings from all files in the output.
---
Also many issues and FAQs are covered in the forum thread
dedicated to this program,
http://forum.bitcoin.org/index.php?topic=28402.0
The output line shows the following:
(5s):223.5G (avg):219.6Gh/s | A:330090 R:0 HW:6904 WU:3027.6/m
Each column is as follows:
5s: A 5 second exponentially decaying average hash rate
avg: An all time average hash rate
A: The number of Accepted shares
R: The number of Rejected shares
HW: The number of HardWare errors
WU: The Work Utility defined as the number of diff1 equivalent shares / minute
AVA 0: 23C/ 47C 2280R | 77.10G/83.20Gh/s | A:120029 R:0 HW:2295 WU:1162.5/m
Each column is as follows:
Temperature (if supported)
Fanspeed (if supported)
A 5 second exponentially decaying average hash rate
An all time average hash rate
The number of accepted shares
The number of rejected shares
The number of hardware erorrs
The Work Utility defined as the number of diff1 equivalent shares / minute
The cgminer status line shows:
TQ: 1 ST: 1 SS: 0 DW: 0 NB: 1 LW: 8 GF: 1 RF: 1
TQ is Total Queued work items.
ST is STaged work items (ready to use).
SS is Stale Shares discarded (detected and not submitted so don't count as rejects)
DW is Discarded Work items (work from block no longer valid to work on)
NB is New Blocks detected on the network
LW is Locally generated Work items
GF is Getwork Fail Occasions (server slow to provide work)
RF is Remote Fail occasions (server slow to accept work)
---
MULTIPOOL
FAILOVER STRATEGIES WITH MULTIPOOL:
A number of different strategies for dealing with multipool setups are
available. Each has their advantages and disadvantages so multiple strategies
are available by user choice, as per the following list:
FAILOVER:
The default strategy is failover. This means that if you input a number of
pools, it will try to use them as a priority list, moving away from the 1st
to the 2nd, 2nd to 3rd and so on. If any of the earlier pools recover, it will
move back to the higher priority ones.
ROUND ROBIN:
This strategy only moves from one pool to the next when the current one falls
idle and makes no attempt to move otherwise.
ROTATE:
This strategy moves at user-defined intervals from one active pool to the next,
skipping pools that are idle.
LOAD BALANCE:
This strategy sends work to all the pools to maintain optimum load. The most
efficient pools will tend to get a lot more shares. If any pool falls idle, the
rest will tend to take up the slack keeping the miner busy.
BALANCE:
This strategy monitors the amount of difficulty 1 shares solved for each pool
and uses it to try to end up doing the same amount of work for all pools.
---
SOLO MINING
Solo mining can be done efficiently as a single pool entry or a backup to
any other pooled mining and it is recommended everyone have solo mining set up
as their final backup in case all their other pools are DDoSed/down for the
security of the network. To enable solo mining, one must be running a local
bitcoind/bitcoin-qt or have one they have rpc access to. To do this, edit your
bitcoind configuration file (bitcoin.conf) with the following extra lines,
using your choice of username and password:
rpcuser=username
rpcpassword=password
Restart bitcoind, then start cgminer, pointing to the bitcoind and choose a
btc address with the following options, altering to suit their setup:
cgminer -o http://localhost:8332 -u username -p password --btc-address 15qSxP1SQcUX3o4nhkfdbgyoWEFMomJ4rZ
---
LOGGING
cgminer will log to stderr if it detects stderr is being redirected to a file.
To enable logging simply add 2>logfile.txt to your command line and logfile.txt
will contain the logged output at the log level you specify (normal, verbose,
debug etc.)
In other words if you would normally use:
./cgminer -o xxx -u yyy -p zzz
if you use
./cgminer -o xxx -u yyy -p zzz 2>logfile.txt
it will log to a file called logfile.txt and otherwise work the same.
There is also the -m option on linux which will spawn a command of your choice
and pipe the output directly to that command.
If you start cgminer with the --sharelog option, you can get detailed
information for each share found. The argument to the option may be "-" for
standard output (not advisable with the ncurses UI), any valid positive number
for that file descriptor, or a filename.
To log share data to a file named "share.log", you can use either:
./cgminer --sharelog 50 -o xxx -u yyy -p zzz 50>share.log
./cgminer --sharelog share.log -o xxx -u yyy -p zzz
For every share found, data will be logged in a CSV (Comma Separated Value)
format:
timestamp,disposition,target,pool,dev,thr,sharehash,sharedata
For example (this is wrapped, but it's all on one line for real):
1335313090,reject,
ffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000,
http://localhost:8337,GPU0,0,
6f983c918f3299b58febf95ec4d0c7094ed634bc13754553ec34fc3800000000,
00000001a0980aff4ce4a96d53f4b89a2d5f0e765c978640fe24372a000001c5
000000004a4366808f81d44f26df3d69d7dc4b3473385930462d9ab707b50498
f681634a4f1f63d01a0cd43fb338000000000080000000000000000000000000
0000000000000000000000000000000000000000000000000000000080020000
---
Usage instructions: Run "cgminer --help" to see options:
Usage: cgminer [-DdElmpPQqUsTouOchnV]
Options for both config file and command line:
--api-allow Allow API access (if enabled) only to the given list of [W:]IP[/Prefix] address[/subnets]
This overrides --api-network and you must specify 127.0.0.1 if it is required
W: in front of the IP address gives that address privileged access to all api commands
--api-description Description placed in the API status header (default: cgminer version)
--api-groups API one letter groups G:cmd:cmd[,P:cmd:*...]
See API-README for usage
--api-listen Listen for API requests (default: disabled)
By default any command that does not just display data returns access denied
See --api-allow to overcome this
--api-network Allow API (if enabled) to listen on/for any address (default: only 127.0.0.1)
--api-mcast Enable API Multicast listener, (default: disabled)
The listener will only run if the API is also enabled
--api-mcast-addr <arg> API Multicast listen address, (default: 224.0.0.75)
--api-mcast-code <arg> Code expected in the API Multicast message, don't use '-' (default: "FTW")
--api-mcast-port <arg> API Multicast listen port, (default: 4028)
--api-port Port number of miner API (default: 4028)
--balance Change multipool strategy from failover to even share balance
--benchmark Run cgminer in benchmark mode - produces no shares
--btc-address <arg> Set bitcoin target address when solo mining to bitcoind (mandatory)
--btc-sig <arg> Set signature to add to coinbase when solo mining (optional)
--compact Use compact display without per device statistics
--debug|-D Enable debug output
--disable-rejecting Automatically disable pools that continually reject shares
--fix-protocol Do not redirect to a different getwork protocol (eg. stratum)
--hotplug <arg> Set hotplug check time to <arg> seconds (0=never default: 5) - only with libusb
--kernel-path|-K <arg> Specify a path to where bitstream files are (default: "/usr/local/bin")
--load-balance Change multipool strategy from failover to quota based balance
--log|-l <arg> Interval in seconds between log output (default: 5)
--lowmem Minimise caching of shares for low memory applications
--monitor|-m <arg> Use custom pipe cmd for output messages
--net-delay Impose small delays in networking to not overload slow routers
--no-submit-stale Don't submit shares if they are detected as stale
--pass|-p <arg> Password for bitcoin JSON-RPC server
--per-device-stats Force verbose mode and output per-device statistics
--protocol-dump|-P Verbose dump of protocol-level activities
--quiet|-q Disable logging output, display status and errors
--real-quiet Disable all output
--rotate <arg> Change multipool strategy from failover to regularly rotate at N minutes (default: 0)
--round-robin Change multipool strategy from failover to round robin on failure
--sched-start <arg> Set a time of day in HH:MM to start mining (a once off without a stop time)
--sched-stop <arg> Set a time of day in HH:MM to stop mining (will quit without a start time)
--sharelog <arg> Append share log to file
--shares <arg> Quit after mining N shares (default: unlimited)
--socks-proxy <arg> Set socks4 proxy (host:port) for all pools without a proxy specified
--syslog Use system log for output messages (default: standard error)
--temp-cutoff <arg> Temperature where a device will be automatically disabled, one value or comma separated list (default: 95)
--text-only|-T Disable ncurses formatted screen output
--url|-o <arg> URL for bitcoin JSON-RPC server
--user|-u <arg> Username for bitcoin JSON-RPC server
--userpass|-O <arg> Username:Password pair for bitcoin JSON-RPC server
--verbose Log verbose output to stderr as well as status output
--widescreen Use extra wide display without toggling
Options for command line only:
--config|-c <arg> Load a JSON-format configuration file
See example.conf for an example configuration.
--default-config <arg> Specify the filename of the default config file
Loaded at start and used when saving without a name.
--help|-h Print this message
--version|-V Display version and exit
USB device (ASIC and FPGA) options:
--icarus-options <arg> Set specific FPGA board configurations - one set of values for all or comma separated
--icarus-timing <arg> Set how the Icarus timing is calculated - one setting/value for all or comma separated
--usb <arg> USB device selection (See below)
--usb-dump (See FPGA-README)
See FGPA-README or ASIC-README for more information regarding these.
ASIC only options:
--anu-freq <arg> Set AntminerU1 frequency in hex, range 150-500 (default: 200)
--avalon-auto Adjust avalon overclock frequency dynamically for best hashrate
--avalon-fan <arg> Set fanspeed percentage for avalon, single value or range (default: 20-100)
--avalon-freq <arg> Set frequency range for avalon-auto, single value or range
--avalon-cutoff <arg> Set avalon overheat cut off temperature (default: 60)
--avalon-options <arg> Set avalon options baud:miners:asic:timeout:freq
--avalon-temp <arg> Set avalon target temperature (default: 50)
--avalon2-freq Set frequency range for Avalon2, single value or range
--avalon2-voltage Set Avalon2 core voltage, in millivolts
--avalon2-fan Set Avalon2 target fan speed
--avalon2-cutoff <arg> Set Avalon2 overheat cut off temperature (default: 88)
--avalon2-fixed-speed Set Avalon2 fan to fixed speed
--avalon4-automatic-voltage Automatic adjust voltage base on module DH
--avalon4-voltage Set Avalon4 core voltage, in millivolts, step: 125
--avalon4-freq Set frequency for Avalon4, 1 to 3 values, example: 445:385:370
--avalon4-fan Set Avalon4 target fan speed range
--avalon4-temp <arg> Set Avalon4 target temperature (default: 42)
--avalon4-cutoff <arg> Set Avalon4 overheat cut off temperature (default: 65)
--avalon4-polling-delay <arg> Set Avalon4 polling delay value (ms) (default: 20)
--avalon4-ntime-offset <arg> Set Avalon4 MM ntime rolling max offset (default: 4)
--avalon4-aucspeed <arg> Set Avalon4 AUC IIC bus speed (default: 400000)
--avalon4-aucxdelay <arg> Set Avalon4 AUC IIC xfer read delay, 4800 ~= 1ms (default: 9600)
--bflsc-overheat <arg> Set overheat temperature where BFLSC devices throttle, 0 to disable (default: 90)
--bitburner-fury-options <arg> Override avalon-options for BitBurner Fury boards baud:miners:asic:timeout:freq
--bitburner-fury-voltage <arg> Set BitBurner Fury core voltage, in millivolts
--bitburner-voltage <arg> Set BitBurner (Avalon) core voltage, in millivolts
--bitmain-auto Adjust bitmain overclock frequency dynamically for best hashrate
--bitmain-cutoff Set bitmain overheat cut off temperature
--bitmain-fan Set fanspeed percentage for bitmain, single value or range (default: 20-100)
--bitmain-freq Set frequency range for bitmain-auto, single value or range
--bitmain-hwerror Set bitmain device detect hardware error
--bitmain-options Set bitmain options baud:miners:asic:timeout:freq
--bitmain-temp Set bitmain target temperature
--bxf-bits <arg> Set max BXF/HXF bits for overclocking (default: 54)
--bxf-temp-target <arg> Set target temperature for BXF/HXF devices (default: 82)
--bxm-bits <arg> Set BXM bits for overclocking (default: 50)
--compac-freq <arg> Set GekkoScience Compac frequency in MHz, range 100-500 (default: 150.0)
--hfa-hash-clock <arg> Set hashfast clock speed (default: 550)
--hfa-fail-drop <arg> Set how many MHz to drop clockspeed each failure on an overlocked hashfast device (default: 10)
--hfa-fan <arg> Set fanspeed percentage for hashfast, single value or range (default: 10-85)
--hfa-name <arg> Set a unique name for a single hashfast device specified with --usb or the first device found
--hfa-noshed Disable hashfast dynamic core disabling feature
--hfa-options <arg> Set hashfast options name:clock (comma separated)
--hfa-temp-overheat <arg> Set the hashfast overheat throttling temperature (default: 95)
--hfa-temp-target <arg> Set the hashfast target temperature (0 to disable) (default: 88)
--hfa-hash-clock <arg> Set hashfast clock speed (default: 550)
--hfa-fan <arg> Set fanspeed percentage for hashfast, single value or range (default: 10-85)
--hfa-temp-overheat <arg> Set the hashfast overheat throttling temperature (default: 95)
--hfa-temp-target <arg> Set the hashfast target temperature (0 to disable) (default: 88)
--hro-freq Set the hashratio clock frequency (default: 280)
--klondike-options <arg> Set klondike options clock:temptarget
--nfu-bits <arg> Set nanofury bits for overclocking, range 32-63 (default: 50)
--rock-freq <arg> Set RockMiner frequency in MHz, range 125-500 (default: 270.0)
See ASIC-README for more information regarding these.
FPGA only options:
--bfl-range Use nonce range on bitforce devices if supported
See FGPA-README for more information regarding this.
Cgminer should automatically find all of your Avalon ASIC, BFL ASIC, BitForce
FPGAs, Icarus bitstream FPGAs, Klondike ASIC, ASICMINER usb block erupters,
KnC ASICs, BaB ASICs, Hashfast ASICs and ModMiner FPGAs.
---
EXECUTIVE SUMMARY ON USAGE:
Single pool:
cgminer -o http://pool:port -u username -p password
Multiple pools:
cgminer -o http://pool1:port -u pool1username -p pool1password -o http://pool2:port -u pool2usernmae -p pool2password
Single pool with a standard http proxy:
cgminer -o "http:proxy:port|http://pool:port" -u username -p password
Single pool with a socks5 proxy:
cgminer -o "socks5:proxy:port|http://pool:port" -u username -p password
Single pool with stratum protocol support:
cgminer -o stratum+tcp://pool:port -u username -p password
Solo mining to local bitcoind:
cgminer -o http://localhost:8332 -u username -p password --btc-address 15qSxP1SQcUX3o4nhkfdbgyoWEFMomJ4rZ
The list of proxy types are:
http: standard http 1.1 proxy
http0: http 1.0 proxy
socks4: socks4 proxy
socks5: socks5 proxy
socks4a: socks4a proxy
socks5h: socks5 proxy using a hostname
If you compile cgminer with a version of CURL before 7.19.4 then some of the above will
not be available. All are available since CURL version 7.19.4
If you specify the --socks-proxy option to cgminer, it will only be applied to all pools
that don't specify their own proxy setting like above
After saving configuration from the menu, you do not need to give cgminer any
arguments and it will load your configuration.
Any configuration file may also contain a single
"include" : "filename"
to recursively include another configuration file.
Writing the configuration will save all settings from all files in the output.
---
Also many issues and FAQs are covered in the forum thread
dedicated to this program,
http://forum.bitcoin.org/index.php?topic=28402.0
The output line shows the following:
(5s):223.5G (avg):219.6Gh/s | A:330090 R:0 HW:6904 WU:3027.6/m
Each column is as follows:
5s: A 5 second exponentially decaying average hash rate
avg: An all time average hash rate
A: The number of Accepted shares
R: The number of Rejected shares
HW: The number of HardWare errors
WU: The Work Utility defined as the number of diff1 equivalent shares / minute
AVA 0: 23C/ 47C 2280R | 77.10G/83.20Gh/s | A:120029 R:0 HW:2295 WU:1162.5/m
Each column is as follows:
Temperature (if supported)
Fanspeed (if supported)
A 5 second exponentially decaying average hash rate
An all time average hash rate
The number of accepted shares
The number of rejected shares
The number of hardware erorrs
The Work Utility defined as the number of diff1 equivalent shares / minute
The cgminer status line shows:
TQ: 1 ST: 1 SS: 0 DW: 0 NB: 1 LW: 8 GF: 1 RF: 1
TQ is Total Queued work items.
ST is STaged work items (ready to use).
SS is Stale Shares discarded (detected and not submitted so don't count as rejects)
DW is Discarded Work items (work from block no longer valid to work on)
NB is New Blocks detected on the network
LW is Locally generated Work items
GF is Getwork Fail Occasions (server slow to provide work)
RF is Remote Fail occasions (server slow to accept work)
---
MULTIPOOL
FAILOVER STRATEGIES WITH MULTIPOOL:
A number of different strategies for dealing with multipool setups are
available. Each has their advantages and disadvantages so multiple strategies
are available by user choice, as per the following list:
FAILOVER:
The default strategy is failover. This means that if you input a number of
pools, it will try to use them as a priority list, moving away from the 1st
to the 2nd, 2nd to 3rd and so on. If any of the earlier pools recover, it will
move back to the higher priority ones.
ROUND ROBIN:
This strategy only moves from one pool to the next when the current one falls
idle and makes no attempt to move otherwise.
ROTATE:
This strategy moves at user-defined intervals from one active pool to the next,
skipping pools that are idle.
LOAD BALANCE:
This strategy sends work to all the pools to maintain optimum load. The most
efficient pools will tend to get a lot more shares. If any pool falls idle, the
rest will tend to take up the slack keeping the miner busy.
BALANCE:
This strategy monitors the amount of difficulty 1 shares solved for each pool
and uses it to try to end up doing the same amount of work for all pools.
---
SOLO MINING
Solo mining can be done efficiently as a single pool entry or a backup to
any other pooled mining and it is recommended everyone have solo mining set up
as their final backup in case all their other pools are DDoSed/down for the
security of the network. To enable solo mining, one must be running a local
bitcoind/bitcoin-qt or have one they have rpc access to. To do this, edit your
bitcoind configuration file (bitcoin.conf) with the following extra lines,
using your choice of username and password:
rpcuser=username
rpcpassword=password
Restart bitcoind, then start cgminer, pointing to the bitcoind and choose a
btc address with the following options, altering to suit their setup:
cgminer -o http://localhost:8332 -u username -p password --btc-address 15qSxP1SQcUX3o4nhkfdbgyoWEFMomJ4rZ
---
LOGGING
cgminer will log to stderr if it detects stderr is being redirected to a file.
To enable logging simply add 2>logfile.txt to your command line and logfile.txt
will contain the logged output at the log level you specify (normal, verbose,
debug etc.)
In other words if you would normally use:
./cgminer -o xxx -u yyy -p zzz
if you use
./cgminer -o xxx -u yyy -p zzz 2>logfile.txt
it will log to a file called logfile.txt and otherwise work the same.
There is also the -m option on linux which will spawn a command of your choice
and pipe the output directly to that command.
If you start cgminer with the --sharelog option, you can get detailed
information for each share found. The argument to the option may be "-" for
standard output (not advisable with the ncurses UI), any valid positive number
for that file descriptor, or a filename.
To log share data to a file named "share.log", you can use either:
./cgminer --sharelog 50 -o xxx -u yyy -p zzz 50>share.log
./cgminer --sharelog share.log -o xxx -u yyy -p zzz
For every share found, data will be logged in a CSV (Comma Separated Value)
format:
timestamp,disposition,target,pool,dev,thr,sharehash,sharedata
For example (this is wrapped, but it's all on one line for real):
1335313090,reject,
ffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000,
http://localhost:8337,GPU0,0,
6f983c918f3299b58febf95ec4d0c7094ed634bc13754553ec34fc3800000000,
00000001a0980aff4ce4a96d53f4b89a2d5f0e765c978640fe24372a000001c5
000000004a4366808f81d44f26df3d69d7dc4b3473385930462d9ab707b50498
f681634a4f1f63d01a0cd43fb338000000000080000000000000000000000000
0000000000000000000000000000000000000000000000000000000080020000
---
No comments:
Post a Comment