Added printHealth to IBackend interface.
This commit is contained in:
parent
56f23db878
commit
2f27d5d108
8 changed files with 54 additions and 44 deletions
|
@ -5,8 +5,8 @@
|
|||
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet>
|
||||
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
|
||||
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
|
||||
* Copyright 2018-2019 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright 2016-2019 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
|
||||
* Copyright 2016-2020 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -254,7 +254,8 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
LOG_INFO(CYAN_BOLD("#%u") YELLOW(" %s") MAGENTA_BOLD("%4uW") CSI "1;%um %2uC" CLEAR WHITE_BOLD("%s") "%s",
|
||||
LOG_INFO("%s" CYAN_BOLD(" #%u") YELLOW(" %s") MAGENTA_BOLD("%4uW") CSI "1;%um %2uC" CLEAR WHITE_BOLD("%s") "%s",
|
||||
tag,
|
||||
device.index(),
|
||||
device.topology().toString().data(),
|
||||
health.power,
|
||||
|
@ -338,13 +339,8 @@ const xmrig::String &xmrig::CudaBackend::type() const
|
|||
}
|
||||
|
||||
|
||||
void xmrig::CudaBackend::execCommand(char command)
|
||||
void xmrig::CudaBackend::execCommand(char)
|
||||
{
|
||||
# ifdef XMRIG_FEATURE_NVML
|
||||
if (command == 'e' || command == 'E') {
|
||||
d_ptr->printHealth();
|
||||
}
|
||||
# endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -387,6 +383,14 @@ void xmrig::CudaBackend::printHashrate(bool details)
|
|||
}
|
||||
|
||||
|
||||
void xmrig::CudaBackend::printHealth()
|
||||
{
|
||||
# ifdef XMRIG_FEATURE_NVML
|
||||
d_ptr->printHealth();
|
||||
# endif
|
||||
}
|
||||
|
||||
|
||||
void xmrig::CudaBackend::setJob(const Job &job)
|
||||
{
|
||||
const auto &cuda = d_ptr->controller->config()->cuda();
|
||||
|
@ -455,15 +459,6 @@ void xmrig::CudaBackend::stop()
|
|||
void xmrig::CudaBackend::tick(uint64_t ticks)
|
||||
{
|
||||
d_ptr->workers.tick(ticks);
|
||||
|
||||
# ifdef XMRIG_FEATURE_NVML
|
||||
if (isEnabled()) {
|
||||
auto seconds = d_ptr->controller->config()->healthPrintTime();
|
||||
if (seconds && ticks && (ticks % (seconds * 2)) == 0) {
|
||||
d_ptr->printHealth();
|
||||
}
|
||||
}
|
||||
# endif
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue