Fix hugepage status in popup
This commit is contained in:
parent
1b69dfc0e5
commit
c04f773222
3 changed files with 21 additions and 6 deletions
|
@ -567,7 +567,8 @@
|
|||
tooltip += '\n';
|
||||
tooltip += "CPU Cache L2/L3: " + (row.client_status.cpu_l2 / 1024) + " MB/"+ (row.client_status.cpu_l3 / 1024) + " MB";
|
||||
tooltip += '\n';
|
||||
tooltip += "Huge Pages: " + (row.client_status.hugepages_available ? " available" : " unavailable");
|
||||
tooltip += "Huge Pages: " + (row.client_status.hugepages_available ? " available, " : " unavailable, ");
|
||||
tooltip += (row.client_status.hugepages_enabled ? "enabled (" + row.client_status.total_hugepages + "/" + row.client_status.total_pages + ")" : "disabled");
|
||||
tooltip += '\n';
|
||||
tooltip += "Used Threads: " + row.client_status.current_threads;
|
||||
tooltip += (row.client_status.hash_factor > 1 ? " [" + row.client_status.hash_factor + "x multi hash mode]" :"");
|
||||
|
|
|
@ -426,10 +426,6 @@ bool ClientStatus::parseFromJson(const rapidjson::Document& document)
|
|||
m_isHugepagesEnabled = clientStatus["hugepages_enabled"].GetBool();
|
||||
}
|
||||
|
||||
if (clientStatus.HasMember("hash_factor")) {
|
||||
m_hashFactor = clientStatus["hash_factor"].GetInt();
|
||||
}
|
||||
|
||||
if (clientStatus.HasMember("cpu_is_x64")) {
|
||||
m_isCpuX64 = clientStatus["cpu_is_x64"].GetBool();
|
||||
}
|
||||
|
@ -454,6 +450,18 @@ bool ClientStatus::parseFromJson(const rapidjson::Document& document)
|
|||
m_hashrateHighest = clientStatus["hashrate_highest"].GetDouble();
|
||||
}
|
||||
|
||||
if (clientStatus.HasMember("hash_factor")) {
|
||||
m_hashFactor = clientStatus["hash_factor"].GetInt();
|
||||
}
|
||||
|
||||
if (clientStatus.HasMember("total_pages")) {
|
||||
m_totalPages = clientStatus["total_pages"].GetInt();
|
||||
}
|
||||
|
||||
if (clientStatus.HasMember("total_hugepages")) {
|
||||
m_totalHugepages = clientStatus["total_hugepages"].GetInt();
|
||||
}
|
||||
|
||||
if (clientStatus.HasMember("current_threads")) {
|
||||
m_currentThreads = clientStatus["current_threads"].GetInt();
|
||||
}
|
||||
|
@ -525,7 +533,6 @@ rapidjson::Value ClientStatus::toJson(rapidjson::MemoryPoolAllocator<rapidjson::
|
|||
|
||||
clientStatus.AddMember("hugepages_available", m_hasHugepages, allocator);
|
||||
clientStatus.AddMember("hugepages_enabled", m_isHugepagesEnabled, allocator);
|
||||
clientStatus.AddMember("hash_factor", m_hashFactor, allocator);
|
||||
clientStatus.AddMember("cpu_is_x64", m_isCpuX64, allocator);
|
||||
clientStatus.AddMember("cpu_has_aes", m_hasCpuAES, allocator);
|
||||
|
||||
|
@ -534,6 +541,9 @@ rapidjson::Value ClientStatus::toJson(rapidjson::MemoryPoolAllocator<rapidjson::
|
|||
clientStatus.AddMember("hashrate_long", m_hashrateLong, allocator);
|
||||
clientStatus.AddMember("hashrate_highest", m_hashrateHighest, allocator);
|
||||
|
||||
clientStatus.AddMember("hash_factor", m_hashFactor, allocator);
|
||||
clientStatus.AddMember("total_pages", m_totalPages, allocator);
|
||||
clientStatus.AddMember("total_hugepages", m_totalHugepages, allocator);
|
||||
clientStatus.AddMember("current_threads", m_currentThreads, allocator);
|
||||
clientStatus.AddMember("cpu_sockets", m_cpuSockets, allocator);
|
||||
clientStatus.AddMember("cpu_cores", m_cpuCores, allocator);
|
||||
|
|
|
@ -228,6 +228,10 @@ unsigned Service::setClientStatus(const std::string& clientIp, const std::string
|
|||
clientStatus.parseFromJson(document);
|
||||
clientStatus.setExternalIp(clientIp);
|
||||
|
||||
if (m_clientStatus.find(clientId) == m_clientStatus.end()) {
|
||||
m_clientCommand[clientId] = ControlCommand(ControlCommand::RESTART);
|
||||
}
|
||||
|
||||
m_clientStatus[clientId] = clientStatus;
|
||||
|
||||
resultCode = getClientCommand(clientId, resp);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue