]>
Commit | Line | Data |
---|---|---|
e576d073 | 1 | .TH MINERD 1 "May 2014" "cpuminer 2.4" |
b089cc9f LJ |
2 | .SH NAME |
3 | minerd \- CPU miner for Bitcoin and Litecoin | |
4 | .SH SYNOPSIS | |
5 | .B minerd | |
6 | [\fIOPTION\fR]... | |
7 | .SH DESCRIPTION | |
8 | .B minerd | |
9 | is a multi-threaded CPU miner for Bitcoin, Litecoin and other cryptocurrencies. | |
6a5cae3d TP |
10 | It supports the getwork and getblocktemplate (BIP 22) methods, |
11 | as well as the Stratum mining protocol. | |
b089cc9f LJ |
12 | .PP |
13 | In its normal mode of operation, \fBminerd\fR connects to a mining server | |
14 | (specified with the \fB\-o\fR option), receives work from it and starts hashing. | |
15 | As soon as a solution is found, it is submitted to the same mining server, | |
16 | which can accept or reject it. | |
b5b26327 | 17 | When using getwork or getblocktemplate, |
18 | \fBminerd\fR can take advantage of long polling, if the server supports it; | |
b089cc9f LJ |
19 | in any case, fresh work is fetched as needed. |
20 | When using the Stratum protocol this is not possible, | |
21 | and the server is responsible for sending fresh work at least every minute; | |
22 | if it fails to do so, | |
23 | \fBminerd\fR may drop the connection and try reconnecting again. | |
24 | .PP | |
25 | By default, \fBminerd\fR writes all its messages to standard error. | |
26 | On systems that have a syslog, the \fB\-\-syslog\fR option can be used | |
27 | to write to it instead. | |
28 | .PP | |
29 | On start, the nice value of all miner threads is set to 19. | |
30 | On Linux, the scheduling policy is also changed to SCHED_IDLE, | |
31 | or to SCHED_BATCH if that fails. | |
32 | On multiprocessor systems, \fBminerd\fR | |
33 | automatically sets the CPU affinity of miner threads | |
34 | if the number of threads is a multiple of the number of processors. | |
35 | .SH EXAMPLES | |
36 | To connect to a Litecoin mining pool that provides a Stratum server | |
37 | at example.com on port 3333, authenticating as worker "foo" with password "bar": | |
38 | .PP | |
39 | .nf | |
40 | .RS | |
41 | minerd \-o stratum+tcp://example.com:3333 \-O foo:bar | |
42 | .RE | |
43 | .fi | |
44 | .PP | |
45 | To mine to a local Bitcoin testnet instance running on port 18332, | |
46 | authenticating with username "rpcuser" and password "rpcpass": | |
47 | .PP | |
48 | .nf | |
49 | .RS | |
6a5cae3d TP |
50 | minerd \-a sha256d \-o http://localhost:18332 \-O rpcuser:rpcpass \\ |
51 | \-\-coinbase\-addr=mpXwg4jMtRhuSpVq4xS3HFHmCmWp9NyGKt | |
b089cc9f LJ |
52 | .RE |
53 | .fi | |
54 | .PP | |
55 | To connect to a Litecoin P2Pool node running on my.server on port 9327, | |
56 | mining in the background and having output sent to the syslog facility, | |
57 | omitting the per-thread hashmeter output: | |
58 | .PP | |
59 | .nf | |
60 | .RS | |
61 | minerd \-BSq \-o http://my.server:9327 | |
62 | .RE | |
63 | .fi | |
64 | .SH OPTIONS | |
65 | .TP | |
66 | \fB\-a\fR, \fB\-\-algo\fR=\fIALGORITHM\fR | |
67 | Set the hashing algorithm to use. | |
68 | Default is scrypt. | |
69 | Possible values are: | |
70 | .RS 11 | |
71 | .TP 10 | |
72 | .B scrypt | |
73 | scrypt(1024, 1, 1) (used by Litecoin) | |
74 | .TP | |
c0841fb4 | 75 | .B scrypt:\fIN\fR |
76 | scrypt(\fIN\fR, 1, 1) (\fIN\fR must be a power of 2 greater than 1) | |
77 | .TP | |
b089cc9f LJ |
78 | .B sha256d |
79 | SHA-256d (used by Bitcoin) | |
80 | .RE | |
81 | .TP | |
82 | \fB\-\-benchmark\fR | |
83 | Run in offline benchmark mode. | |
84 | .TP | |
85 | \fB\-B\fR, \fB\-\-background\fR | |
86 | Run in the background as a daemon. | |
87 | .TP | |
88 | \fB\-\-cert\fR=\fIFILE\fR | |
89 | Set an SSL certificate to use with the mining server. | |
90 | Only supported when using the HTTPS protocol. | |
91 | .TP | |
6a5cae3d TP |
92 | \fB\-\-coinbase\-addr\fR=\fIADDRESS\fR |
93 | Set a payout address for solo mining. | |
94 | This is only used in getblocktemplate mode, | |
95 | and only if the server does not provide a coinbase transaction. | |
96 | .TP | |
95f3c7db | 97 | \fB\-\-coinbase\-sig\fR=\fITEXT\fR |
98 | Set a string to be included in the coinbase (if allowed by the server). | |
99 | This is only used in getblocktemplate mode. | |
100 | .TP | |
b089cc9f LJ |
101 | \fB\-c\fR, \fB\-\-config\fR=\fIFILE\fR |
102 | Load options from a configuration file. | |
103 | \fIFILE\fR must contain a JSON object | |
104 | mapping long options to their arguments (as strings), | |
105 | or to \fBtrue\fR if no argument is required. | |
106 | Sample configuration file: | |
107 | ||
108 | .nf | |
109 | { | |
110 | "url": "stratum+tcp://example.com:3333", | |
111 | "userpass": "foo:bar", | |
112 | "retry-pause": "10", | |
113 | "quiet": true | |
114 | } | |
115 | .fi | |
116 | .TP | |
117 | \fB\-D\fR, \fB\-\-debug\fR | |
118 | Enable debug output. | |
119 | .TP | |
120 | \fB\-h\fR, \fB\-\-help\fR | |
121 | Print a help message and exit. | |
122 | .TP | |
6a5cae3d TP |
123 | \fB\-\-no\-gbt\fR |
124 | Do not use the getblocktemplate RPC method. | |
125 | .TP | |
126 | \fB\-\-no\-getwork\fR | |
127 | Do not use the getwork RPC method. | |
128 | .TP | |
b089cc9f LJ |
129 | \fB\-\-no\-longpoll\fR |
130 | Do not use long polling. | |
131 | .TP | |
132 | \fB\-\-no\-redirect\fR | |
133 | Ignore requests from the server to switch to a different URL. | |
134 | .TP | |
135 | \fB\-\-no\-stratum\fR | |
136 | Do not switch to Stratum, even if the server advertises support for it. | |
137 | .TP | |
138 | \fB\-o\fR, \fB\-\-url\fR=[\fISCHEME\fR://][\fIUSERNAME\fR[:\fIPASSWORD\fR]@]\fIHOST\fR:\fIPORT\fR[/\fIPATH\fR] | |
139 | Set the URL of the mining server to connect to. | |
140 | Supported schemes are \fBhttp\fR, \fBhttps\fR and \fBstratum+tcp\fR. | |
141 | If no scheme is specified, http is assumed. | |
142 | Specifying a \fIPATH\fR is only supported for HTTP and HTTPS. | |
143 | Specifying credentials has the same effect as using the \fB\-O\fR option. | |
6a5cae3d TP |
144 | |
145 | By default, on HTTP and HTTPS, | |
146 | the miner tries to use the getblocktemplate RPC method, | |
147 | and falls back to using getwork if getblocktemplate is unavailable. | |
148 | This behavior can be modified by using the \fB\-\-no\-gbt\fR | |
149 | and \fB\-\-no\-getwork\fR options. | |
b089cc9f LJ |
150 | .TP |
151 | \fB\-O\fR, \fB\-\-userpass\fR=\fIUSERNAME\fR:\fIPASSWORD\fR | |
152 | Set the credentials to use for connecting to the mining server. | |
153 | Any value previously set with \fB\-u\fR or \fB\-p\fR is discarded. | |
154 | .TP | |
155 | \fB\-p\fR, \fB\-\-pass\fR=\fIPASSWORD\fR | |
156 | Set the password to use for connecting to the mining server. | |
157 | Any password previously set with \fB\-O\fR is discarded. | |
158 | .TP | |
159 | \fB\-P\fR, \fB\-\-protocol\-dump\fR | |
160 | Enable output of all protocol-level activities. | |
161 | .TP | |
162 | \fB\-q\fR, \fB\-\-quiet\fR | |
163 | Disable per-thread hashmeter output. | |
164 | .TP | |
165 | \fB\-r\fR, \fB\-\-retries\fR=\fIN\fR | |
166 | Set the maximum number of times to retry if a network call fails. | |
167 | If not specified, the miner will retry indefinitely. | |
168 | .TP | |
169 | \fB\-R\fR, \fB\-\-retry\-pause\fR=\fISECONDS\fR | |
170 | Set how long to wait between retries. Default is 30 seconds. | |
171 | .TP | |
172 | \fB\-s\fR, \fB\-\-scantime\fR=\fISECONDS\fR | |
173 | Set an upper bound on the time the miner can go without fetching fresh work. | |
174 | This setting has no effect in Stratum mode or when long polling is activated. | |
175 | Default is 5 seconds. | |
176 | .TP | |
177 | \fB\-S\fR, \fB\-\-syslog\fR | |
178 | Log to the syslog facility instead of standard error. | |
179 | .TP | |
180 | \fB\-t\fR, \fB\-\-threads\fR=\fIN\fR | |
181 | Set the number of miner threads. | |
182 | If not specified, the miner will try to detect the number of available processors | |
183 | and use that. | |
184 | .TP | |
185 | \fB\-T\fR, \fB\-\-timeout\fR=\fISECONDS\fR | |
186 | Set a timeout for long polling. | |
187 | .TP | |
188 | \fB\-u\fR, \fB\-\-user\fR=\fIUSERNAME\fR | |
189 | Set the username to use for connecting to the mining server. | |
190 | Any username previously set with \fB\-O\fR is discarded. | |
191 | .TP | |
192 | \fB\-V\fR, \fB\-\-version\fR | |
193 | Display version information and quit. | |
194 | .TP | |
195 | \fB\-x\fR, \fB\-\-proxy\fR=[\fISCHEME\fR://][\fIUSERNAME\fR:\fIPASSWORD\fR@]\fIHOST\fR:\fIPORT\fR | |
196 | Connect to the mining server through a proxy. | |
197 | Supported schemes are: \fBhttp\fR, \fBsocks4\fR, \fBsocks5\fR. | |
198 | Since libcurl 7.18.0, the following are also supported: | |
199 | \fBsocks4a\fR, \fBsocks5h\fR (SOCKS5 with remote name resolving). | |
200 | If no scheme is specified, the proxy is treated as an HTTP proxy. | |
201 | .SH ENVIRONMENT | |
202 | The following environment variables can be specified in lower case or upper case; | |
203 | the lower-case version has precedence. \fBhttp_proxy\fR is an exception | |
204 | as it is only available in lower case. | |
205 | .PP | |
206 | .RS | |
207 | .TP | |
208 | \fBhttp_proxy\fR [\fISCHEME\fR://]\fIHOST\fR:\fIPORT\fR | |
209 | Sets the proxy server to use for HTTP. | |
210 | .TP | |
211 | \fBHTTPS_PROXY\fR [\fISCHEME\fR://]\fIHOST\fR:\fIPORT\fR | |
212 | Sets the proxy server to use for HTTPS. | |
213 | .TP | |
214 | \fBALL_PROXY\fR [\fISCHEME\fR://]\fIHOST\fR:\fIPORT\fR | |
215 | Sets the proxy server to use if no protocol-specific proxy is set. | |
216 | .RE | |
217 | .PP | |
218 | Using an environment variable to set the proxy has the same effect as | |
219 | using the \fB\-x\fR option. | |
220 | .SH AUTHOR | |
221 | Most of the code in the current version of minerd was written by | |
222 | Pooler <[email protected]> with contributions from others. | |
223 | ||
224 | The original minerd was written by Jeff Garzik <[email protected]>. |