Skip to content

Commit

Permalink
#11 Add --cuda-bfactor and --cuda-bsleep command line options.
Browse files Browse the repository at this point in the history
  • Loading branch information
xmrig committed Oct 19, 2017
1 parent b4192cf commit 9967c4a
Showing 1 changed file with 62 additions and 60 deletions.
122 changes: 62 additions & 60 deletions src/Options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,95 +61,97 @@ static char const usage[] = "\
Usage: " APP_ID " [OPTIONS]\n\
\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\
-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\
--cuda-devices List of CUDA devices to use.\n\
--cuda-launch=TxB List of launch config for the Cryptonight kernel\n\
--cuda-max-threads=N limit maximum count of GPU threads\n\
--bfactor=[0-12] run CryptoNight core kernel in smaller pieces\n\
--bsleep=N insert a delay of N microseconds between kernel launches\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\
-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\
--cuda-devices=N List of CUDA devices to use.\n\
--cuda-launch=TxB List of launch config for the Cryptonight kernel\n\
--cuda-max-threads=N limit maximum count of GPU threads in automatic mode\n\
--cuda-bfactor=[0-12] run CryptoNight core kernel in smaller pieces\n\
--cuda-bsleep=N insert a delay of N microseconds between kernel launches\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
"\
--nicehash enable nicehash 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\
\n\
Auto-configuration specific options:\n\
--max-gpu-threads=N limit maximum count of GPU threads\n\
--nicehash enable nicehash 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\
";


static char const short_options[] = "a:c:khBp:Px:r:R:s:T:o:u:O:Vl:S";


static struct option const options[] = {
{ "algo", 1, nullptr, 'a' },
{ "algo", 1, nullptr, 'a' },
{ "api-access-token", 1, nullptr, 4001 },
{ "api-port", 1, nullptr, 4000 },
{ "api-worker-id", 1, nullptr, 4002 },
{ "background", 0, nullptr, 'B' },
{ "background", 0, nullptr, 'B' },
{ "bfactor", 1, nullptr, 1201 },
{ "bsleep", 1, nullptr, 1202 },
{ "config", 1, nullptr, 'c' },
{ "config", 1, nullptr, 'c' },
{ "cuda-bfactor", 1, nullptr, 1201 }, // deprecated, use --cuda-bfactor instead.
{ "cuda-bsleep", 1, nullptr, 1202 }, // deprecated, use --cuda-bsleep instead.
{ "cuda-devices", 1, nullptr, 1203 },
{ "cuda-launch", 1, nullptr, 1204 },
{ "cuda-max-threads", 1, nullptr, 1200 },
{ "donate-level", 1, nullptr, 1003 },
{ "help", 0, nullptr, 'h' },
{ "keepalive", 0, nullptr ,'k' },
{ "log-file", 1, nullptr, 'l' },
{ "max-gpu-threads", 1, nullptr, 1200 },
{ "max-gpu-usage", 1, nullptr, 1004 },
{ "help", 0, nullptr, 'h' },
{ "keepalive", 0, nullptr ,'k' },
{ "log-file", 1, nullptr, 'l' },
{ "max-gpu-threads", 1, nullptr, 1200 }, // deprecated, use --cuda-max-threads instead.
{ "max-gpu-usage", 1, nullptr, 1004 }, // deprecated.
{ "nicehash", 0, nullptr, 1006 },
{ "no-color", 0, nullptr, 1002 },
{ "pass", 1, nullptr, 'p' },
{ "pass", 1, nullptr, 'p' },
{ "print-time", 1, nullptr, 1007 },
{ "retries", 1, nullptr, 'r' },
{ "retry-pause", 1, nullptr, 'R' },
{ "syslog", 0, nullptr, 'S' },
{ "url", 1, nullptr, 'o' },
{ "user", 1, nullptr, 'u' },
{ "retries", 1, nullptr, 'r' },
{ "retry-pause", 1, nullptr, 'R' },
{ "syslog", 0, nullptr, 'S' },
{ "url", 1, nullptr, 'o' },
{ "user", 1, nullptr, 'u' },
{ "user-agent", 1, nullptr, 1008 },
{ "userpass", 1, nullptr, 'O' },
{ "version", 0, nullptr, 'V' },
{ "userpass", 1, nullptr, 'O' },
{ "version", 0, nullptr, 'V' },
{ 0, 0, 0, 0 }
};


static struct option const config_options[] = {
{ "algo", 1, nullptr, 'a' },
{ "background", 0, nullptr, 'B' },
{ "bfactor", 1, nullptr, 1201 },
{ "bsleep", 1, nullptr, 1202 },
{ "colors", 0, nullptr, 2000 },
{ "donate-level", 1, nullptr, 1003 },
{ "log-file", 1, nullptr, 'l' },
{ "max-gpu-threads", 1, nullptr, 1200 },
{ "max-gpu-usage", 1, nullptr, 1004 },
{ "print-time", 1, nullptr, 1007 },
{ "retries", 1, nullptr, 'r' },
{ "retry-pause", 1, nullptr, 'R' },
{ "syslog", 0, nullptr, 'S' },
{ "user-agent", 1, nullptr, 1008 },
{ "algo", 1, nullptr, 'a' },
{ "background", 0, nullptr, 'B' },
{ "bfactor", 1, nullptr, 1201 }, // deprecated, use --cuda-bfactor instead.
{ "bsleep", 1, nullptr, 1202 }, // deprecated, use --cuda-bsleep instead.
{ "colors", 0, nullptr, 2000 },
{ "cuda-bfactor", 1, nullptr, 1201 },
{ "cuda-bsleep", 1, nullptr, 1202 },
{ "cuda-max-threads", 1, nullptr, 1200 },
{ "donate-level", 1, nullptr, 1003 },
{ "log-file", 1, nullptr, 'l' },
{ "max-gpu-threads", 1, nullptr, 1200 }, // deprecated, use --cuda-max-threads instead.
{ "max-gpu-usage", 1, nullptr, 1004 }, // deprecated.
{ "print-time", 1, nullptr, 1007 },
{ "retries", 1, nullptr, 'r' },
{ "retry-pause", 1, nullptr, 'R' },
{ "syslog", 0, nullptr, 'S' },
{ "user-agent", 1, nullptr, 1008 },
{ 0, 0, 0, 0 }
};

Expand Down

0 comments on commit 9967c4a

Please # to comment.