Added cpu sockets to dashboard client info popup
* Removed not working background mode for *nix
This commit is contained in:
parent
36596dda59
commit
9620fe0eeb
12 changed files with 57 additions and 41 deletions
|
@ -84,10 +84,10 @@ CCClient::CCClient(Options* options, uv_async_t* async)
|
|||
m_clientStatus.setVersion(Version::string());
|
||||
m_clientStatus.setCpuBrand(Cpu::brand());
|
||||
m_clientStatus.setCpuAES(Cpu::hasAES());
|
||||
m_clientStatus.setCpuSockets(Cpu::sockets());
|
||||
m_clientStatus.setCpuCores(Cpu::cores());
|
||||
m_clientStatus.setCpuThreads(Cpu::threads());
|
||||
m_clientStatus.setCpuX64(Cpu::isX64());
|
||||
|
||||
m_clientStatus.setCpuL2(Cpu::l2());
|
||||
m_clientStatus.setCpuL3(Cpu::l3());
|
||||
m_clientStatus.setCurrentThreads(m_options->threads());
|
||||
|
|
|
@ -43,6 +43,7 @@ ClientStatus::ClientStatus()
|
|||
m_hashrateLong(0),
|
||||
m_hashrateHighest(0),
|
||||
m_currentThreads(0),
|
||||
m_cpuSockets(0),
|
||||
m_cpuCores(0),
|
||||
m_cpuThreads(0),
|
||||
m_cpuL2(0),
|
||||
|
@ -226,6 +227,16 @@ void ClientStatus::setCurrentThreads(int currentThreads)
|
|||
m_currentThreads = currentThreads;
|
||||
}
|
||||
|
||||
int ClientStatus::getCpuSockets() const
|
||||
{
|
||||
return m_cpuSockets;
|
||||
}
|
||||
|
||||
void ClientStatus::setCpuSockets(int cpuSockets)
|
||||
{
|
||||
m_cpuSockets = cpuSockets;
|
||||
}
|
||||
|
||||
int ClientStatus::getCpuCores() const
|
||||
{
|
||||
return m_cpuCores;
|
||||
|
@ -386,6 +397,10 @@ bool ClientStatus::parseFromJson(const rapidjson::Document& document)
|
|||
m_currentThreads = clientStatus["current_threads"].GetInt();
|
||||
}
|
||||
|
||||
if (clientStatus.HasMember("cpu_sockets")) {
|
||||
m_cpuSockets = clientStatus["cpu_sockets"].GetInt();
|
||||
}
|
||||
|
||||
if (clientStatus.HasMember("cpu_cores")) {
|
||||
m_cpuCores = clientStatus["cpu_cores"].GetInt();
|
||||
}
|
||||
|
@ -454,6 +469,7 @@ rapidjson::Value ClientStatus::toJson(rapidjson::MemoryPoolAllocator<rapidjson::
|
|||
clientStatus.AddMember("hashrate_highest", m_hashrateHighest, allocator);
|
||||
|
||||
clientStatus.AddMember("current_threads", m_currentThreads, allocator);
|
||||
clientStatus.AddMember("cpu_sockets", m_cpuSockets, allocator);
|
||||
clientStatus.AddMember("cpu_cores", m_cpuCores, allocator);
|
||||
clientStatus.AddMember("cpu_threads", m_cpuThreads, allocator);
|
||||
clientStatus.AddMember("cpu_l2", m_cpuL2, allocator);
|
||||
|
|
|
@ -109,6 +109,9 @@ public:
|
|||
int getCurrentThreads() const;
|
||||
void setCurrentThreads(int currentThreads);
|
||||
|
||||
int getCpuSockets() const;
|
||||
void setCpuSockets(int cpuSockets);
|
||||
|
||||
int getCpuCores() const;
|
||||
void setCpuCores(int cpuCores);
|
||||
|
||||
|
@ -168,6 +171,7 @@ private:
|
|||
double m_hashrateHighest;
|
||||
|
||||
int m_currentThreads;
|
||||
int m_cpuSockets;
|
||||
int m_cpuCores;
|
||||
int m_cpuThreads;
|
||||
int m_cpuL2;
|
||||
|
|
|
@ -35,10 +35,16 @@
|
|||
int main(int argc, char **argv) {
|
||||
|
||||
std::string ownPath(argv[0]);
|
||||
std::string xmrigDaemon("xmrigDaemon");
|
||||
std::string xmrigMiner("xmrigMiner");
|
||||
|
||||
std::string xmrigMinerPath = ownPath.replace(ownPath.rfind(xmrigDaemon),xmrigDaemon.size(), xmrigMiner);
|
||||
#if defined(_WIN32) || defined(WIN32)
|
||||
int pos = ownPath.rfind('\\');
|
||||
std::string xmrigMiner("xmrigMiner.exe");
|
||||
#else
|
||||
int pos = ownPath.rfind('/');
|
||||
std::string xmrigMiner("xmrigMiner");
|
||||
#endif
|
||||
|
||||
std::string xmrigMinerPath = ownPath.substr(0, pos+1) + xmrigMiner;
|
||||
|
||||
#ifdef WIN32
|
||||
xmrigMinerPath = "\"" + xmrigMinerPath + "\"";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue