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