mirror of
https://github.com/xmrig/xmrig.git
synced 2024-11-18 18:11:05 +00:00
Added command line option --daemon and --daemon-poll-interval
This commit is contained in:
parent
5e369a5af8
commit
867478b983
4 changed files with 71 additions and 42 deletions
|
@ -161,6 +161,7 @@ void xmrig::BaseTransform::transform(rapidjson::Document &doc, int key, const ch
|
|||
case IConfig::PrintTimeKey: /* --print-time */
|
||||
case IConfig::HttpPort: /* --http-port */
|
||||
case IConfig::DonateLevelKey: /* --donate-level */
|
||||
case IConfig::DaemonPollKey: /* --daemon-poll-interval */
|
||||
# ifdef XMRIG_DEPRECATED
|
||||
case IConfig::ApiPort: /* --api-port */
|
||||
# endif
|
||||
|
@ -173,6 +174,7 @@ void xmrig::BaseTransform::transform(rapidjson::Document &doc, int key, const ch
|
|||
case IConfig::TlsKey: /* --tls */
|
||||
case IConfig::DryRunKey: /* --dry-run */
|
||||
case IConfig::HttpEnabledKey: /* --http-enabled */
|
||||
case IConfig::DaemonKey: /* --daemon */
|
||||
return transformBoolean(doc, key, true);
|
||||
|
||||
case IConfig::ColorKey: /* --no-color */
|
||||
|
@ -204,6 +206,9 @@ void xmrig::BaseTransform::transformBoolean(rapidjson::Document &doc, int key, b
|
|||
case IConfig::TlsKey: /* --tls */
|
||||
return add(doc, kPools, "tls", enable);
|
||||
|
||||
case IConfig::DaemonKey: /* --daemon */
|
||||
return add(doc, kPools, "daemon", enable);
|
||||
|
||||
# ifndef XMRIG_PROXY_PROJECT
|
||||
case IConfig::NicehashKey: /* --nicehash */
|
||||
return add<bool>(doc, kPools, "nicehash", enable);
|
||||
|
@ -265,6 +270,9 @@ void xmrig::BaseTransform::transformUint64(rapidjson::Document &doc, int key, ui
|
|||
case IConfig::PrintTimeKey: /* --print-time */
|
||||
return set(doc, "print-time", arg);
|
||||
|
||||
case IConfig::DaemonPollKey: /* --daemon-poll-interval */
|
||||
return add(doc, kPools, "daemon-poll-interval", arg);
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -70,6 +70,8 @@ public:
|
|||
TlsKey = 1013,
|
||||
FingerprintKey = 1014,
|
||||
ProxyDonateKey = 1017,
|
||||
DaemonKey = 1018,
|
||||
DaemonPollKey = 1019,
|
||||
|
||||
# ifdef XMRIG_DEPRECATED
|
||||
ApiPort = 4000,
|
||||
|
|
|
@ -82,6 +82,8 @@ static const option options[] = {
|
|||
{ "tls", 0, nullptr, IConfig::TlsKey },
|
||||
{ "tls-fingerprint", 1, nullptr, IConfig::FingerprintKey },
|
||||
{ "asm", 1, nullptr, IConfig::AssemblyKey },
|
||||
{ "daemon", 0, nullptr, IConfig::DaemonKey },
|
||||
{ "daemon-poll-interval", 1, nullptr, IConfig::DaemonPollKey },
|
||||
|
||||
# ifdef XMRIG_DEPRECATED
|
||||
{ "api-port", 1, nullptr, IConfig::ApiPort },
|
||||
|
|
|
@ -45,6 +45,10 @@ Options:\n\
|
|||
"\
|
||||
cryptonight-heavy\n"
|
||||
#endif
|
||||
#ifndef XMRIG_NO_CN_PICO
|
||||
"\
|
||||
cryptonight-pico\n"
|
||||
#endif
|
||||
"\
|
||||
-o, --url=URL URL of mining server\n\
|
||||
-O, --userpass=U:P username:password pair for mining server\n\
|
||||
|
@ -54,9 +58,18 @@ Options:\n\
|
|||
-t, --threads=N number of miner threads\n\
|
||||
-v, --av=N algorithm variation, 0 auto select\n\
|
||||
-k, --keepalive send keepalived packet for prevent timeout (needs pool support)\n\
|
||||
--nicehash enable nicehash.com support\n\
|
||||
--nicehash enable nicehash.com support\n"
|
||||
#ifdef XMRIG_FEATURE_TLS
|
||||
"\
|
||||
--tls enable SSL/TLS support (needs pool support)\n\
|
||||
--tls-fingerprint=F pool TLS certificate fingerprint, if set enable strict certificate pinning\n\
|
||||
--tls-fingerprint=F pool TLS certificate fingerprint, if set enable strict certificate pinning\n"
|
||||
#endif
|
||||
#ifdef XMRIG_FEATURE_HTTP
|
||||
"\
|
||||
--daemon use daemon RPC instead of pool for solo mining\n\
|
||||
--daemon-poll-interval=N daemon poll interval in milliseconds (default: 1000)\n"
|
||||
#endif
|
||||
"\
|
||||
-r, --retries=N number of times to retry before switch to backup server (default: 5)\n\
|
||||
-R, --retry-pause=N time to pause between retries (default: 5)\n\
|
||||
--cpu-affinity set process affinity to CPU core(s), mask 0x3 for cores 0 and 1\n\
|
||||
|
@ -74,17 +87,21 @@ Options:\n\
|
|||
-S, --syslog use system log for output messages\n"
|
||||
# endif
|
||||
"\
|
||||
--max-cpu-usage=N maximum CPU usage for automatic threads mode (default 75)\n\
|
||||
--max-cpu-usage=N maximum CPU usage for automatic threads mode (default: 100)\n\
|
||||
--safe safe adjust threads and av settings for current CPU\n\
|
||||
--asm=ASM ASM code for cn/2, possible values: auto, none, intel, ryzen, bulldozer.\n\
|
||||
--print-time=N print hashrate report every N seconds\n\
|
||||
--asm=ASM ASM optimizations, possible values: auto, none, intel, ryzen, bulldozer.\n\
|
||||
--print-time=N print hashrate report every N seconds\n"
|
||||
#ifdef XMRIG_FEATURE_HTTP
|
||||
"\
|
||||
--api-worker-id=ID custom worker-id for API\n\
|
||||
--api-id=ID custom instance ID for API\n\
|
||||
--http-enabled enable HTTP API\n\
|
||||
--http-host=HOST bind host for HTTP API (by default 127.0.0.1)\n\
|
||||
--http-host=HOST bind host for HTTP API (default: 127.0.0.1)\n\
|
||||
--http-port=N bind port for HTTP API\n\
|
||||
--http-access-token=T access token for HTTP API\n\
|
||||
--http-no-restricted enable full remote access to HTTP API (only if access token set)\n\
|
||||
--http-no-restricted enable full remote access to HTTP API (only if access token set)\n"
|
||||
#endif
|
||||
"\
|
||||
--dry-run test configuration and exit\n\
|
||||
-h, --help display this help and exit\n\
|
||||
-V, --version output version information and exit\n\
|
||||
|
|
Loading…
Reference in a new issue