mirror of
https://github.com/xmrig/xmrig.git
synced 2025-12-24 21:32:47 -05:00
Added manual (e key) health reports.
This commit is contained in:
@@ -328,6 +328,34 @@ xmrig::Job xmrig::Miner::job() const
|
||||
}
|
||||
|
||||
|
||||
void xmrig::Miner::execCommand(char command)
|
||||
{
|
||||
switch (command) {
|
||||
case 'h':
|
||||
case 'H':
|
||||
printHashrate(true);
|
||||
break;
|
||||
|
||||
case 'p':
|
||||
case 'P':
|
||||
setEnabled(false);
|
||||
break;
|
||||
|
||||
case 'r':
|
||||
case 'R':
|
||||
setEnabled(true);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
for (auto backend : d_ptr->backends) {
|
||||
backend->execCommand(command);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void xmrig::Miner::pause()
|
||||
{
|
||||
d_ptr->active = false;
|
||||
|
||||
@@ -59,6 +59,7 @@ public:
|
||||
const Algorithms &algorithms() const;
|
||||
const std::vector<IBackend *> &backends() const;
|
||||
Job job() const;
|
||||
void execCommand(char command);
|
||||
void pause();
|
||||
void printHashrate(bool details);
|
||||
void setEnabled(bool enabled);
|
||||
|
||||
Reference in New Issue
Block a user