From 81d00ee9ac6e3199676b73d284cba630a2c426c1 Mon Sep 17 00:00:00 2001 From: BenDroid Date: Thu, 26 Oct 2017 23:27:58 +0200 Subject: [PATCH] Updated Readme, links, cleanup --- CHANGELOG.md | 9 +++++ README.md | 6 ++- howto_and_notes.txt | 86 ----------------------------------------- src/cc/Service.cpp | 4 +- src/config.json | 2 +- src/config_cc.json | 2 +- src/default_config.json | 2 +- 7 files changed, 18 insertions(+), 93 deletions(-) delete mode 100644 howto_and_notes.txt diff --git a/CHANGELOG.md b/CHANGELOG.md index 746ed893..34cdcaaa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,2 +1,11 @@ +# v1.0.4 +- Updated XMRig to 2.4.2 +- Fixed "--background" not working for xmrigCCServer on Windows +# v1.0.3 +- Integrated build for Windows x64 +# v1.0.2 +- Reenabled restart in daemon for win/linux +# v1.0.1 +- Fixed windows build # v1.0.0 - Initial public release based on xmrig version 2.4.1 diff --git a/README.md b/README.md index 4182a917..e368acf1 100644 --- a/README.md +++ b/README.md @@ -121,16 +121,18 @@ xmrigDaemon -o pool.minemonero.pro:5555 -u YOUR_WALLET -p x -k --cc-url=IP_OF_CC ``` -Also you can use configuration via config file, default **[config.json](https://github.com/Bendr0id/xmrigCC/wiki/Config-XMRigMiner)**. You can load multiple config files and combine it with command line options. +Also you can use configuration via config file, default **[config.json](https://github.com/Bendr0id/xmrigCC/wiki/Config-XMRigDaemon)**. You can load multiple config files and combine it with command line options. ## Algorithm variations -Since version 0.8.0. * `--av=1` For CPUs with hardware AES. * `--av=2` Lower power mode (double hash) of `1`. * `--av=3` Software AES implementation. * `--av=4` Lower power mode (double hash) of `3`. ## Common Issues +### XMRigMiner +* XMRigMiner is just the worker, it is not designed to work standalone. Please start **XMRigDaemon** instead. + ### Windows only: DLL error on starting * Make sure that you installed latest Visual C++ Redistributable für Visual Studio 2015. Can be downloaded here: [microsoft.com](https://www.microsoft.com/de-de/download/details.aspx?id=48145) diff --git a/howto_and_notes.txt b/howto_and_notes.txt deleted file mode 100644 index 251e2287..00000000 --- a/howto_and_notes.txt +++ /dev/null @@ -1,86 +0,0 @@ - -config to deploy / notes: - - sample is in src folder (default_config.json) -> currently the same then the miner config. - - miner specific config files have to be stored within the defined folder (defined in config_cc.json), or the root folder of the xmrigCCServer. - - the client specific config filename has to be in the format "hostname_config.json" or if alternative worker-id is defined "myworkername_config.json". - if you dont provide a client specific config, the default_config.json is transfered to the client(miner) if you trigger the "update" action. the client will be automatically restarted, when the config is applied. - -running: - to start the cc server just start xmrigCCServer. - on the client execute xmrigDaemond (don't run the xmrigMiner it will not start). xmrigDaemon (miner) and xmrigCCServer can be runned on the same machine. xmrigDaemon will automatically connect every 10s to the xmrigCCServer and publish its results and will check for an outstanding command, which will be immediately executed. - - -xmrigCCServer: - - the dashboard is available via http://ip:port (the port is defined within config_cc.json, per default the port is bound to any available device [0.0.0.0]). You have to login with user/pass (defined in config_cc.json) - - all the webservices return 200 OK as result code, or when there is an error, the specific result code. - - available rest webservices: - - - (GET): - - http://ip:port/getClientStatusList - - request: - - curl -H "Content-Type: application/json" -X GET http://admin:pass@127.0.0.1:3344/admin/getClientStatusList - - response: - - {"client_status_list":[{"client_status":{"client_id":"TestClient","current_pool":"","current_status":"RUNNING","hashrate_short":0.0,"hashrate_medium":0.0,"hashrate_long":0.0,"hashrate_highest":0.0,"avg_time":0,"shares_good":0,"shares_total":0,"hashes_total":0,"last_status_update":1508526287}}]} - - - - http://ip:port/admin/getClientCommand?clientId=theMinerId (or the hostname, depends on your config) -> return the current command which - is set for the client (miner) - - request: - - curl -H "Content-Type: application/json" -X GET http://admin:pass@127.0.0.1:3344/admin/getClientCommand?clientId=TestClient - - response: (command can be: START/STOP/RESTART/UPDATE_CONFIG/SHUTDOWN) - - {"control_command":{"command":"START"}} - - - - http://ip:port/admin/getClientConfig?clientId=theMinerId (or the hostname, depends on your config) -> returns the current config which is set for the client (miner) or if there is none, the default_config.json. - - request: - - curl -H "Content-Type: application/json" -X GET http://admin:pass@127.0.0.1:3344/admin/getClientConfig?clientId=TestClient - - response: - - a client config in json format - - - - (POST) - - http://ip:port/admin/setClientCommand?clientId=theMinerId (or the hostname, depends on your config) -> set the command for the client (miner) which has to be executed on the client. - - request: (command can be: START/STOP/RESTART/UPDATE_CONFIG/SHUTDOWN) - - curl -H "Content-Type: application/json" -X POST -d '{"control_command":{"command":"QUIT"}}' http://admin:pass@127.0.0.1:3344/admin/setClientCommand?clientId=TestClient - - response: - - OK (200) - - - - http://ip:port/admin/setClientConfig?clientId=theMinerId (or the hostname, depends on your config) -> set the config for the client (miner) which has to be executed on the client. - - request: - - curl -H "Content-Type: application/json" -X POST -d 'put device config json here' http://admin:pass@127.0.0.1:3344/admin/setClientConfig?clientId=TestClient - - response: - - OK (200) \ No newline at end of file diff --git a/src/cc/Service.cpp b/src/cc/Service.cpp index 3128d102..f8a2ca7e 100644 --- a/src/cc/Service.cpp +++ b/src/cc/Service.cpp @@ -92,7 +92,7 @@ unsigned Service::handlePOST(const Options* options, const std::string& url, con unsigned resultCode = MHD_HTTP_NOT_FOUND; - LOG_INFO("POST(url='%s', clientId='%s', data='%s')", url.c_str(), clientId.c_str(), data.c_str()); + LOG_INFO("POST(url='%s', clientId='%s', dataLen='%d')", url.c_str(), clientId.c_str(), data.length()); if (url.rfind("/client/setClientStatus", 0) == 0) { resultCode = setClientStatus(clientId, data, resp); @@ -160,7 +160,7 @@ unsigned Service::setClientConfig(const Options* options, const std::string &cli if (clientConfigFile){ rapidjson::StringBuffer buffer(0, 4096); - rapidjson::Writer writer(buffer); + rapidjson::PrettyWriter writer(buffer); writer.SetMaxDecimalPlaces(10); document.Accept(writer); diff --git a/src/config.json b/src/config.json index 786b7a23..b4d5f9db 100644 --- a/src/config.json +++ b/src/config.json @@ -30,7 +30,7 @@ }, "cc-client": { "url": "localhost:3344", // url of the CC Server (ip:port) - "access-token": null, // access token for CC Server (has to be the same in config_cc.json) + "access-token": "mySecret", // access token for CC Server (has to be the same in config_cc.json) "worker-id": null // custom worker-id for CC Server (otherwise hostname is used) } } diff --git a/src/config_cc.json b/src/config_cc.json index 56e32ef2..3315d83c 100644 --- a/src/config_cc.json +++ b/src/config_cc.json @@ -5,7 +5,7 @@ "syslog": false, // use system log for output messages "cc-server": { "port": 3344, // port the CC Server will listens on - "access-token": null, // access token for CC Clients (should be set!!!) + "access-token": "mySecret", // access token for CC Clients (should be set!!!) "user": "admin", // admin user for access CC Dashboard "pass": "pass", // admin pass for access CC Dashboard "client-config-folder" : null, // folder which contains the client-config files (null=current) diff --git a/src/default_config.json b/src/default_config.json index f07577a0..8da2d984 100644 --- a/src/default_config.json +++ b/src/default_config.json @@ -30,7 +30,7 @@ }, "cc-client": { "url": "localhost:3344", // url of the CC Server (ip:port) - "access-token": null, // access token for CC Server (has to be the same in config_cc.json) + "access-token": "mySecret", // access token for CC Server (has to be the same in config_cc.json) "worker-id": null // custom worker-id for CC Server (otherwise hostname is used) } } \ No newline at end of file