Sync changes with amd miner and update summary.
This commit is contained in:
parent
34a3454784
commit
009bd1a507
8 changed files with 97 additions and 74 deletions
|
@ -39,7 +39,7 @@
|
|||
|
||||
static void print_versions(xmrig::Config *config)
|
||||
{
|
||||
char buf[16];
|
||||
char buf[16] = { 0 };
|
||||
|
||||
# if defined(__clang__)
|
||||
snprintf(buf, 16, " clang/%d.%d.%d", __clang_major__, __clang_minor__, __clang_patchlevel__);
|
||||
|
@ -47,24 +47,22 @@ static void print_versions(xmrig::Config *config)
|
|||
snprintf(buf, 16, " gcc/%d.%d.%d", __GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__);
|
||||
# elif defined(_MSC_VER)
|
||||
snprintf(buf, 16, " MSVC/%d", MSVC_VERSION);
|
||||
# else
|
||||
buf[0] = '\0';
|
||||
# endif
|
||||
|
||||
|
||||
Log::i()->text(config->isColors() ? "\x1B[01;32m * \x1B[01;37mVERSIONS: \x1B[01;36mXMRig/%s\x1B[01;37m libuv/%s%s" : " * VERSIONS: XMRig/%s libuv/%s%s",
|
||||
APP_VERSION, uv_version_string(), buf);
|
||||
Log::i()->text(config->isColors() ? GREEN_BOLD(" * ") WHITE_BOLD("%-13s") CYAN_BOLD("%s/%s") WHITE_BOLD(" libuv/%s%s")
|
||||
: " * %-13s%s/%s libuv/%s%s",
|
||||
"VERSIONS", APP_NAME, APP_VERSION, uv_version_string(), buf);
|
||||
}
|
||||
|
||||
|
||||
static void print_memory(xmrig::Config *config) {
|
||||
# ifdef _WIN32
|
||||
if (config->isColors()) {
|
||||
Log::i()->text("\x1B[01;32m * \x1B[01;37mHUGE PAGES: %s",
|
||||
Mem::isHugepagesAvailable() ? "\x1B[01;32mavailable" : "\x1B[01;31munavailable");
|
||||
Log::i()->text(GREEN_BOLD(" * ") WHITE_BOLD("%-13s") "%s",
|
||||
"HUGE PAGES", Mem::isHugepagesAvailable() ? "\x1B[1;32mavailable" : "\x1B[01;31munavailable");
|
||||
}
|
||||
else {
|
||||
Log::i()->text(" * HUGE PAGES: %s", Mem::isHugepagesAvailable() ? "available" : "unavailable");
|
||||
Log::i()->text(" * %-13s%s", "HUGE PAGES", Mem::isHugepagesAvailable() ? "available" : "unavailable");
|
||||
}
|
||||
# endif
|
||||
}
|
||||
|
@ -73,19 +71,20 @@ static void print_memory(xmrig::Config *config) {
|
|||
static void print_cpu(xmrig::Config *config)
|
||||
{
|
||||
if (config->isColors()) {
|
||||
Log::i()->text("\x1B[01;32m * \x1B[01;37mCPU: %s (%d) %sx64 %sAES-NI",
|
||||
Log::i()->text(GREEN_BOLD(" * ") WHITE_BOLD("%-13s") "%s (%d) %sx64 %sAES-NI",
|
||||
"CPU",
|
||||
Cpu::brand(),
|
||||
Cpu::sockets(),
|
||||
Cpu::isX64() ? "\x1B[01;32m" : "\x1B[01;31m-",
|
||||
Cpu::hasAES() ? "\x1B[01;32m" : "\x1B[01;31m-");
|
||||
Cpu::isX64() ? "\x1B[1;32m" : "\x1B[1;31m-",
|
||||
Cpu::hasAES() ? "\x1B[1;32m" : "\x1B[1;31m-");
|
||||
# ifndef XMRIG_NO_LIBCPUID
|
||||
Log::i()->text("\x1B[01;32m * \x1B[01;37mCPU L2/L3: %.1f MB/%.1f MB", Cpu::l2() / 1024.0, Cpu::l3() / 1024.0);
|
||||
Log::i()->text(GREEN_BOLD(" * ") WHITE_BOLD("%-13s") "%.1f MB/%.1f MB", "CPU L2/L3", Cpu::l2() / 1024.0, Cpu::l3() / 1024.0);
|
||||
# endif
|
||||
}
|
||||
else {
|
||||
Log::i()->text(" * CPU: %s (%d) %sx64 %sAES-NI", Cpu::brand(), Cpu::sockets(), Cpu::isX64() ? "" : "-", Cpu::hasAES() ? "" : "-");
|
||||
Log::i()->text(" * %-13s%s (%d) %sx64 %sAES-NI", "CPU", Cpu::brand(), Cpu::sockets(), Cpu::isX64() ? "" : "-", Cpu::hasAES() ? "" : "-");
|
||||
# ifndef XMRIG_NO_LIBCPUID
|
||||
Log::i()->text(" * CPU L2/L3: %.1f MB/%.1f MB", Cpu::l2() / 1024.0, Cpu::l3() / 1024.0);
|
||||
Log::i()->text(" * %-13s%.1f MB/%.1f MB", "CPU L2/L3", Cpu::l2() / 1024.0, Cpu::l3() / 1024.0);
|
||||
# endif
|
||||
}
|
||||
}
|
||||
|
@ -94,27 +93,28 @@ static void print_cpu(xmrig::Config *config)
|
|||
static void print_threads(xmrig::Config *config)
|
||||
{
|
||||
if (config->threadsMode() != xmrig::Config::Advanced) {
|
||||
char buf[32];
|
||||
char buf[32] = { 0 };
|
||||
if (config->affinity() != -1L) {
|
||||
snprintf(buf, 32, ", affinity=0x%" PRIX64, config->affinity());
|
||||
}
|
||||
else {
|
||||
buf[0] = '\0';
|
||||
snprintf(buf, sizeof buf, ", affinity=0x%" PRIX64, config->affinity());
|
||||
}
|
||||
|
||||
Log::i()->text(config->isColors() ? "\x1B[01;32m * \x1B[01;37mTHREADS: \x1B[01;36m%d\x1B[01;37m, %s, av=%d, %sdonate=%d%%%s" : " * THREADS: %d, %s, av=%d, %sdonate=%d%%%s",
|
||||
Log::i()->text(config->isColors() ? GREEN_BOLD(" * ") WHITE_BOLD("%-13s") CYAN_BOLD("%d") WHITE_BOLD(", %s, av=%d, %sdonate=%d%%") WHITE_BOLD("%s")
|
||||
: " * %-13s%d, %s, av=%d, %sdonate=%d%%%s",
|
||||
"THREADS",
|
||||
config->threadsCount(),
|
||||
config->algorithm().name(),
|
||||
config->algoVariant(),
|
||||
config->isColors() && config->donateLevel() == 0 ? "\x1B[01;31m" : "",
|
||||
config->isColors() && config->donateLevel() == 0 ? "\x1B[1;31m" : "",
|
||||
config->donateLevel(),
|
||||
buf);
|
||||
}
|
||||
else {
|
||||
Log::i()->text(config->isColors() ? "\x1B[01;32m * \x1B[01;37mTHREADS: \x1B[01;36m%d\x1B[01;37m, %s, %sdonate=%d%%" : " * THREADS: %d, %s, %sdonate=%d%%",
|
||||
Log::i()->text(config->isColors() ? GREEN_BOLD(" * ") WHITE_BOLD("%-13s") CYAN_BOLD("%d") WHITE_BOLD(", %s, %sdonate=%d%%")
|
||||
: " * %-13s%d, %s, %sdonate=%d%%",
|
||||
"THREADS",
|
||||
config->threadsCount(),
|
||||
config->algorithm().name(),
|
||||
config->isColors() && config->donateLevel() == 0 ? "\x1B[01;31m" : "",
|
||||
config->isColors() && config->donateLevel() == 0 ? "\x1B[1;31m" : "",
|
||||
config->donateLevel());
|
||||
}
|
||||
}
|
||||
|
@ -125,9 +125,11 @@ static void print_pools(xmrig::Config *config)
|
|||
const std::vector<Pool> &pools = config->pools();
|
||||
|
||||
for (size_t i = 0; i < pools.size(); ++i) {
|
||||
Log::i()->text(config->isColors() ? "\x1B[01;32m * \x1B[01;37mPOOL #%d: \x1B[01;36m%s" : " * POOL #%d: %s",
|
||||
Log::i()->text(config->isColors() ? GREEN_BOLD(" * ") WHITE_BOLD("POOL #%-7zu") CYAN_BOLD("%s") " variant " WHITE_BOLD("%s")
|
||||
: " * POOL #%-7d%s variant %s",
|
||||
i + 1,
|
||||
pools[i].url()
|
||||
pools[i].url(),
|
||||
pools[i].algorithm().variantName()
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -147,8 +149,9 @@ static void print_api(xmrig::Config *config)
|
|||
return;
|
||||
}
|
||||
|
||||
Log::i()->text(config->isColors() ? "\x1B[01;32m * \x1B[01;37mAPI BIND: \x1B[01;36m%s:%d" : " * API BIND: %s:%d",
|
||||
config->isApiIPv6() ? "[::]" : "0.0.0.0", port);
|
||||
Log::i()->text(config->isColors() ? GREEN_BOLD(" * ") WHITE_BOLD("%-13s") CYAN("%s:") CYAN_BOLD("%d")
|
||||
: " * %-13s%s:%d",
|
||||
"API BIND", config->isApiIPv6() ? "[::]" : "0.0.0.0", port);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -156,10 +159,12 @@ static void print_api(xmrig::Config *config)
|
|||
static void print_commands(xmrig::Config *config)
|
||||
{
|
||||
if (config->isColors()) {
|
||||
Log::i()->text("\x1B[01;32m * \x1B[01;37mCOMMANDS: \x1B[01;35mh\x1B[01;37mashrate, \x1B[01;35mp\x1B[01;37mause, \x1B[01;35mr\x1B[01;37mesume");
|
||||
Log::i()->text(GREEN_BOLD(" * ") WHITE_BOLD("COMMANDS ") MAGENTA_BOLD("h") WHITE_BOLD("ashrate, ")
|
||||
MAGENTA_BOLD("p") WHITE_BOLD("ause, ")
|
||||
MAGENTA_BOLD("r") WHITE_BOLD("esume"));
|
||||
}
|
||||
else {
|
||||
Log::i()->text(" * COMMANDS: 'h' hashrate, 'p' pause, 'r' resume");
|
||||
Log::i()->text(" * COMMANDS 'h' hashrate, 'p' pause, 'r' resume");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue