From 1123c20da0fab7c08be877af4abf85ea63076f60 Mon Sep 17 00:00:00 2001 From: XMRig Date: Sat, 7 Oct 2017 00:49:38 +0300 Subject: [PATCH] Add comments to config file. --- src/Options.cpp | 55 ++++++++++++++++++++++++++----------------------- src/config.json | 46 ++++++++++++++++++++--------------------- 2 files changed, 52 insertions(+), 49 deletions(-) diff --git a/src/Options.cpp b/src/Options.cpp index 4dc53e619..b1197223e 100644 --- a/src/Options.cpp +++ b/src/Options.cpp @@ -55,36 +55,39 @@ Options *Options::m_self = nullptr; static char const usage[] = "\ Usage: " APP_ID " [OPTIONS]\n\ Options:\n\ - -a, --algo=ALGO cryptonight (default) or cryptonight-lite\n\ - -o, --url=URL URL of mining server\n\ - -O, --userpass=U:P username:password pair for mining server\n\ - -u, --user=USERNAME username for mining server\n\ - -p, --pass=PASSWORD password for mining server\n\ - -t, --threads=N number of miner threads\n\ - -v, --av=N algorithm variation, 0 auto select\n\ - -k, --keepalive send keepalived for prevent timeout (need pool support)\n\ - -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\ - --cpu-priority set process priority (0 idle, 2 normal to 5 highest)\n\ - --no-huge-pages disable huge pages support\n\ - --no-color disable colored output\n\ - --donate-level=N donate level, default 5%% (5 minutes in 100 minutes)\n\ - --user-agent set custom user-agent string for pool\n\ - -B, --background run the miner in the background\n\ - -c, --config=FILE load a JSON-format configuration file\n\ - -l, --log-file=FILE log all output to a file\n" + -a, --algo=ALGO cryptonight (default) or cryptonight-lite\n\ + -o, --url=URL URL of mining server\n\ + -O, --userpass=U:P username:password pair for mining server\n\ + -u, --user=USERNAME username for mining server\n\ + -p, --pass=PASSWORD password for mining server\n\ + -t, --threads=N number of miner threads\n\ + -v, --av=N algorithm variation, 0 auto select\n\ + -k, --keepalive send keepalived for prevent timeout (need pool support)\n\ + -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\ + --cpu-priority set process priority (0 idle, 2 normal to 5 highest)\n\ + --no-huge-pages disable huge pages support\n\ + --no-color disable colored output\n\ + --donate-level=N donate level, default 5%% (5 minutes in 100 minutes)\n\ + --user-agent set custom user-agent string for pool\n\ + -B, --background run the miner in the background\n\ + -c, --config=FILE load a JSON-format configuration file\n\ + -l, --log-file=FILE log all output to a file\n" # ifdef HAVE_SYSLOG_H "\ - -S, --syslog use system log for output messages\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\ - --safe safe adjust threads and av settings for current CPU\n\ - --nicehash enable nicehash support\n\ - --print-time=N print hashrate report every N seconds\n\ - -h, --help display this help and exit\n\ - -V, --version output version information and exit\n\ + --max-cpu-usage=N maximum CPU usage for automatic threads mode (default 75)\n\ + --safe safe adjust threads and av settings for current CPU\n\ + --nicehash enable nicehash/xmrig-proxy support\n\ + --print-time=N print hashrate report every N seconds\n\ + --api-port=N port for the miner API\n\ + --api-access-token=T access token for API\n\ + --api-worker-id=ID custom worker-id for API\n\ + -h, --help display this help and exit\n\ + -V, --version output version information and exit\n\ "; diff --git a/src/config.json b/src/config.json index 5a727e489..7813d4b96 100644 --- a/src/config.json +++ b/src/config.json @@ -1,31 +1,31 @@ { - "algo": "cryptonight", - "av": 0, - "background": false, - "colors": true, - "cpu-affinity": null, - "cpu-priority": null, - "donate-level": 5, - "log-file": null, - "max-cpu-usage": 75, - "print-time": 60, - "retries": 5, - "retry-pause": 5, - "safe": false, - "syslog": false, - "threads": null, + "algo": "cryptonight", // cryptonight (default) or cryptonight-lite + "av": 0, // algorithm variation, 0 auto select + "background": false, // true to run the miner in the background + "colors": true, // false to disable colored output + "cpu-affinity": null, // set process affinity to CPU core(s), mask "0x3" for cores 0 and 1 + "cpu-priority": null, // set process priority (0 idle, 2 normal to 5 highest) + "donate-level": 5, // donate level, mininum 1% + "log-file": null, // log all output to a file, example: "c:/some/path/xmrig.log" + "max-cpu-usage": 75, // maximum CPU usage for automatic mode, usually limiting factor is CPU cache not this option. + "print-time": 60, // print hashrate report every N seconds + "retries": 5, // number of times to retry before switch to backup server + "retry-pause": 5, // time to pause between retries + "safe": false, // true to safe adjust threads and av settings for current CPU + "syslog": false, // use system log for output messages + "threads": null, // number of miner threads "pools": [ { - "url": "pool.minemonero.pro:5555", - "user": "", - "pass": "x", - "keepalive": true, - "nicehash": false + "url": "pool.minemonero.pro:5555", // URL of mining server + "user": "", // username for mining server + "pass": "x", // password for mining server + "keepalive": true, // send keepalived for prevent timeout (need pool support) + "nicehash": false // enable nicehash/xmrig-proxy support } ], "api": { - "port": 0, - "access-token": null, - "worker-id": null + "port": 0, // port for the miner API https://github.com/xmrig/xmrig/wiki/API + "access-token": null, // access token for API + "worker-id": null // custom worker-id for API } } \ No newline at end of file