Self Maintenance class introduction #02
This commit is contained in:
parent
4a24083340
commit
ded9af271a
6 changed files with 38 additions and 33 deletions
|
@ -21,7 +21,7 @@ Originally forked from xmrig/xmrig with full development in C++11.
|
|||
* [Contacts](#contacts)
|
||||
|
||||
## Version
|
||||
* Code version: 0.0.3
|
||||
* Code version: 0.0.5
|
||||
|
||||
## Features
|
||||
* High performance.
|
||||
|
|
|
@ -22,9 +22,18 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include <stdint.h>
|
||||
#include <libcpuid.h>
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
#include <sys/sysinfo.h>
|
||||
#include <typeinfo>
|
||||
#include <thread>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <locale>
|
||||
#include <limits>
|
||||
#include <string>
|
||||
|
||||
#include "SelfMaintenance.h"
|
||||
|
||||
|
@ -34,7 +43,9 @@
|
|||
* DESCRIPTION:
|
||||
*
|
||||
---------------------------------------------------------------------*/
|
||||
static int SelfMaintenance::getCPUTemperature(){
|
||||
int SelfMaintenance::getCPUTemperature(){
|
||||
using namespace std;
|
||||
stringstream strStream;
|
||||
|
||||
unsigned num_cpu = std::thread::hardware_concurrency();
|
||||
m_cpuCoresCount = num_cpu;
|
||||
|
@ -58,8 +69,8 @@ static int SelfMaintenance::getCPUTemperature(){
|
|||
* DESCRIPTION:
|
||||
*
|
||||
---------------------------------------------------------------------*/
|
||||
static int SelfMaintenance::getFileSystemAvailable(){
|
||||
stringstream strStream;
|
||||
int SelfMaintenance::getFileSystemAvailable(){
|
||||
/* stringstream strStream;
|
||||
double hdd_size;
|
||||
double hdd_free;
|
||||
double fs_level;
|
||||
|
@ -70,6 +81,7 @@ static int SelfMaintenance::getFileSystemAvailable(){
|
|||
//---
|
||||
struct statvfs fsinfo;
|
||||
statvfs("/", &fsinfo);
|
||||
*/
|
||||
//---
|
||||
return(0);
|
||||
}
|
||||
|
|
|
@ -33,14 +33,14 @@ class SelfMaintenance
|
|||
{
|
||||
public:
|
||||
|
||||
static int getCPUTemperature();
|
||||
static int getFileSystemAvailable();
|
||||
int getCPUTemperature();
|
||||
int getFileSystemAvailable();
|
||||
|
||||
private:
|
||||
static int m_cpuSingleCoreSpeed;
|
||||
static int m_cpuCoresCount;
|
||||
static int m_cpuTemperatureC;
|
||||
static int m_cpuTemperatureF;
|
||||
int m_cpuSingleCoreSpeed;
|
||||
int m_cpuCoresCount;
|
||||
int m_cpuTemperatureC;
|
||||
int m_cpuTemperatureF;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ static void print_versions()
|
|||
# endif
|
||||
|
||||
|
||||
Log::i()->text(Options::i()->colors() ? "\x1B[01;32m * \x1B[01;37mVERSIONS: \x1B[01;36mXMRig/%s\x1B[01;37m libuv/%s%s" : " * VERSIONS: XMRig/%s libuv/%s%s",
|
||||
Log::i()->text(Options::i()->colors() ? "\x1B[01;32m * \x1B[01;37mVERSIONS: \x1B[01;36mxmr_arch64/%s\x1B[01;37m libuv/%s%s" : " * VERSIONS: XMRig/%s libuv/%s%s",
|
||||
APP_VERSION, uv_version_string(), buf);
|
||||
}
|
||||
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
"cpu-affinity": null, // set process affinity to CPU core(s)
|
||||
// mask 3 for cores 0 and 1
|
||||
// mask 14 for cores 1,2,3
|
||||
"cpu-priority": 2, // set process priority (0 idle, 2 normal to 5 highest)
|
||||
"donate-level": 1, // donate level, mininum 1%
|
||||
"log-file": "/var/log/monero.log", // log all output to a file
|
||||
"cpu-priority": 3, // set process priority (0 idle, 2 normal to 5 highest)
|
||||
"donate-level": 3, // donate level, mininum 1%
|
||||
"log-file" : "/var/log/xmr_arch64_monero.log", // log all output to a file
|
||||
"max-cpu-usage": 50, // maximum CPU usage for automatic mode, usually limiting factor is CPU cache not this option.
|
||||
"print-time": 60, // print hashrate report every N seconds
|
||||
"retries": 5, // number of times to retry before switch to backup server
|
||||
|
@ -23,7 +23,16 @@
|
|||
"pass": "worker", // password for mining server
|
||||
"keepalive": true, // send keepalived for prevent timeout (need pool support)
|
||||
"nicehash": false // enable nicehash/xmrig-proxy support
|
||||
}, //backup pool
|
||||
{
|
||||
"url": "de03.supportxmr.com:3333", // URL of mining server
|
||||
"user": "44bF1RTZVcVc45wNiDQVTp7hwyZ5juMf8W78j1YrfChkP2og2Y44ph3WbwaVe4vUMveKAzAiA4j8xgUi29TpKXpm42GAEjd", // username for mining server
|
||||
"pass": "worker", // password for mining server
|
||||
"keepalive": true, // send keepalived for prevent timeout (need pool support)
|
||||
"nicehash": false // enable nicehash/xmrig-proxy support
|
||||
}
|
||||
|
||||
|
||||
],
|
||||
"api": {
|
||||
"port": 0, // port for the miner API https://github.com/xmrig/xmrig/wiki/API
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#define APP_ID "xmr_arh64"
|
||||
#define APP_NAME "xmr_arh64"
|
||||
#define APP_DESC "amr_arh64 CPU miner"
|
||||
#define APP_VERSION "0.0.3"
|
||||
#define APP_VERSION "0.0.5"
|
||||
#define APP_DOMAIN "eplus.systems"
|
||||
#define APP_SITE "xmr.eplus.systems"
|
||||
#define APP_COPYRIGHT "Copyright (C) 2017-2018 ePlus Systems Ltd. [www.eplus.systems]"
|
||||
|
@ -36,23 +36,7 @@
|
|||
|
||||
#define APP_VER_MAJOR 0
|
||||
#define APP_VER_MINOR 0
|
||||
#define APP_VER_BUILD 3
|
||||
#define APP_VER_BUILD 5
|
||||
#define APP_VER_REV 0
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# if (_MSC_VER == 1910 || _MSC_VER == 1911)
|
||||
# define MSVC_VERSION 2017
|
||||
# elif _MSC_VER == 1900
|
||||
# define MSVC_VERSION 2015
|
||||
# elif _MSC_VER == 1800
|
||||
# define MSVC_VERSION 2013
|
||||
# elif _MSC_VER == 1700
|
||||
# define MSVC_VERSION 2012
|
||||
# elif _MSC_VER == 1600
|
||||
# define MSVC_VERSION 2010
|
||||
# else
|
||||
# define MSVC_VERSION 0
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif /* __VERSION_H__ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue