Hashrate monitor (HRM) program for switching the miners when the hash (complexity) of the extracted coins (hashrate mode) is reduced or when their profitability (profit mode) is increased. Because the complexity and hashset of the network are directly proportional to the time of the block's finding, then any value can be used to switch the miners in the hashrate mode, however, the text will use hashrate
How HRM works in hashrate mode
The program with the specified periodicity analyzes the hashrate of the network of each coin specified in the configuration file, compares them with the specified limits, calculates deviations in percentages and launches the miner of that coin whose hashrate deviation is the smallest.
Explanation: let the deviation of the hashray of one of the coins be -30%, and for the other two -20% and + 5%. A deviation of -30% indicates that the hashtate of the coin is less than the established limit by 30%. This is less than -20% and less than + 5% and this coin now needs to be mined. A deviation of + 10% indicates that the hashtate of the coin is larger than the limit set for it by 10%, but this is less than, for example, + 15% or + 30%, which means that the coin's miner will be launched.
How HRM works in profit mode
In profit mode, the program can use yield data from YiiMP similar pools or calculate the yield for each coin based on the network hashrate or WTM data. In this case, switching occurs for the mining of the coin whose yield is the highest
What will be required before working with HRM
Before working with the program it is understood that you have decided on a list of coins, pools, purses and miners, created bat files and made sure that they work. Next, you need to add information about coins and their miners to HRM
The configuration file hrm.cfg
By default, the configuration file must be in the program directory and there may be several
Variables
- {TH} - time in seconds between Hashrate checks
{TK} - a pause in seconds between the changes of the miners (after the kill)
{TC} is the number of Hashrate checks before running another miner.
{HD} - for a coin that is currently being throttled, HRM will subtract the percentage specified here from the hashrate deviation or add interest to the profit in profit mode. Prevents frequent switching of miners with fluctuations of hashrate or profitability within the percent mentioned here
{WC} - URL http://whattomine.com/coins.json (sometimes it may be necessary to replace it with another one or assign an empty value to the variable - data from WTM will not be parsed)
The logic of the work is this: if HRM determines that any of the coins hashrate (or profitability) has changed and the switching of the miners is required, then it will be performed only if this condition is fulfilled in the amount specified in $ TC. For example, if $ TH is 60 seconds and $ TC is 2, then after 120 seconds HRM will kill the running miner, pause for $ TK seconds and start a new miner.
Coins
Hashrate mode
Minimum, sufficient and mandatory parameters for determining the coin in the hashrate mode (instead of the one used in the ETC example use the currency identifier, it will be displayed in the HRM work window):
{
wtmname => 'EthereumClassic',
minerdir => 'D: \ Mining \ Claymore_Dual',
minerexe => 'ETC-Ethermine.bat',
hrlimit => '7000000000000',
},
{minerdir} - the directory where the miner of the specified coin is located
{minerexe} - the launched miner file
{hrlimit} - the value of the coin hashrate, which will be compared with the current network hashrate
If the minimum set of parameters for a coin is specified, then WhatToMine data based on the {wtmname} coin will be used to determine the network hash. If there are no coins on the WTM, and also for a more accurate and quick definition of the hashtest, you will need to use other sources with information about the network. To do this, you need to add and define two more parameters in the coin data:
{
wtmname => 'EthereumClassic',
minerdir => 'D: \ Mining \ Claymore_Dual',
minerexe => 'ETC-Ethermine.bat',
hrlimit => '7000000000000',
hrurl => 'https://api-etc.ethermine.org/networkStats',
hrregexp => '"hashrate": (\ d +),',
},
{hrregexp} is a Perl regular expression to retrieve a hashtra from the specified URL
For one of the coins, an additional parameter {main} can be specified:
main => 'true',
If this parameter is set to true, then the coin is considered to be the main one, which changes the mining logic as follows: if for all coins the hash change is positive (i.e., more than the limits specified in the {hr} limits), then the main coin, and not the coin with the smallest deviation. This parameter is ignored in the profit mode.
Profit mode
Minimum, sufficient and mandatory parameters for determining coins in profit mode
{
wtmname => 'Sumokoin',
minerdir => 'D: \ Mining \ ccminer_cryptonight',
minerexe => 'Sumo.bat',
},
{
wtmname => 'Sumokoin',
minerdir => 'D:\Mining\ccminer_cryptonight',
minerexe => 'Sumo.bat',
hrurl => 'http://sumopools.com/',
hrregexp => '
Hash Rate: (\d+\.\d+)',
eval => '$CStat{$c}{hr} = $CStat{$c}{hr}*1000000',
},
Because In this mode, information about yields from pools and performance of algorithms is used, then in the configuration file it is necessary to determine the URL of the pools (you can use several, but only if you can not get all the coins from one pool):
(
'http://api.yiimp.eu/api/currencies',
'https://umine.org/api/currencies',
'https://altminer.net/api/currencies',
'http://www.zpool.ca/api/currencies',
);
In this description, the profitability of the coin is first obtained from YiiMP of similar pools and if the coin there is not found, then WTM data will be used. In the second case, other sources with information on network capacity can be used to more accurately and quickly determine the hashed.
{
wtmname => 'Sumokoin',
minerdir => 'D: \ Mining \ ccminer_cryptonight',
minerexe => 'Sumo.bat',
hrurl => 'http://sumopools.com/',
hrregexp => '
Hash Rate: (\ d + \. \ d +)',
eval => '$ CStat {$ c} {hr} = $ CStat {$ c} {hr} * 1000000',
},
Because In this mode, information about the profitability from pools and the performance of algorithms is used, then in the configuration file it is necessary to determine the URL of the pools (you can use several, but only if you can not get all the coins from one pool):
(
'http://api.yiimp.eu/api/currencies',
'https://umine.org/api/currencies',
'https://altminer.net/api/currencies',
'http://www.zpool.ca/api/currencies',
);
'x17' => 6 * 6.9
and even so:
'x17' => 3 * 6.9 + 3 * 9.4
The names of algorithms used on YiiMP pools and WTM are different, so for coins of data about which there are no pools, it is necessary to separately determine the algorithms in accordance with the WTM names used.
To exclude a coin from the list without deleting the coin from the configuration file, add the {skip} parameter with the value true:
skip => 'true',
If you set this parameter to 'monitor', then the coin will also be excluded from the mining, but statistics on hashrate or profitability will be displayed in the program window.
Note: before each hash update, the program reads the data from the configuration file, you can make changes to it during HRM operation, without having to restart the program and save running running processes.
program window
http://ipic.su/img/img7/fs/image.1515405515.png
1) miner of this coin is now working
2) statistics on the hashrate for each coin in comparison with the specified values or the profitability in mBTC in comparison with the maximum for all coins
3) the deviation hashrate or the profitability of the coin in percent
4) the total running time of each miner and the number of its starts
5) the counter checks hashrate. begins to tick when a certain coin has conditions for launching its miner
6) the coin is on the list, but the mining is disabled, only the collection and monitoring of statistics
7) indicates that the hashrate data is taken from WTM and / or at the next update it was not possible to obtain fresh data. in the second case the extreme successfully received indications
indicates that the coin is the main
Launching HRM
By default, HRM runs in test mode. In this mode, the program behaves as usual, but instead of the miners, it runs the ping command, simulating the work of mining. This is done so that you can configure the program on another computer (even unprepared for mining) or in another directory before running real mining processes. The windows of the created processes will have the name HRMminertestprocess with the indication of the currency for which it is made and will not correlate with the actual mining processes if HRM is already running on this computer.
After setting up and getting satisfactory results, use the --run switch to start HRM in the working mode:
- hrm.exe --run
Running with the switch - cfg will launch HRM with the specified configuration file:
- hrm.exe --cfg: my.cfg
hrm.exe --run --cfg: my.cfg
The --dir switch will force HRM to look for the configuration file in the specified directory:
- hrm.exe --run --cfg: my.cfg --dir: \\ WORKSTATION \ SharedFolder
The switch --log creates a log file in the directory --dir with the name of the configuration file and with the extension txt:
- hrm.exe --run --cfg: my.cfg --dir: \\ WORKSTATION \ SharedFolder --log
- hrm.exe --run --cfg: my.cfg --dir: \\ WORKSTATION \ SharedFolder --log --rig: 1
hrm.exe --run --cfg: my.cfg --dir: \\ WORKSTATION \ SharedFolder -log --rig:2
The switch --savestat creates csv files for each coin, suitable for analysis in Excel:
- hrm.exe --run --cfg: my.cfg --dir: \\ WORKSTATION \ SharedFolder --log --rig: 1 --savestat
File format in hashrate mode:
date; hrlimit; received_hr; deviation_hr; witumainovsky_hr; exchange rate_current
File format in profit mode:
date; profit_monetary; maximum_profit_to_all_monotes; deflection_profit; witumainovsky_hr; exchange rate_current
If specify the --minimize radio button, the minimizer and HRMServer windows will be minimized. Switch - windows - the windows will not open at all, neither the miners nor the ping command will be launched in the test mode.
--profit the launch of HRM in profit mode:
- hrm.exe --run --cfg: my.cfg --dir: \\ WORKSTATION \ SharedFolder --log --rig: 1 --savestat --profit
--getcoins - HRM receives coin data from YiiMP
- hrm.exe --getcoins: http: //www.zpool.ca/api/currencies
HRM includes a web server for remote monitoring and configuration of HRM. In order for HRMServer to be started with HRM, you must use the --server switch:
- hrm.exe --run --cfg: my.cfg --dir: \\ WORKSTATION \ SharedFolder --log --rig: 1 --server
In the above example, HRMServer will be started to monitor all log files and change all configuration files in the \\ WORKSTATION \ SharedFolder directory. If the logfile has not changed for more than 3 minutes, it will be marked with a red background, which will indicate that the HRM process seems to have been stopped.
Make the necessary changes to the hrm.bat file yourself
HRMServer window in the browser
http://ipic.su/img/img7/fs/image.1515405890.png
In the case when 5 HRM processes are running using two common configuration files, the HRMServer window in the browser looks like this (HRM process with "--rig: 2" using cfg file hrm1.cfg died 18 minutes ago)
Remarks:
WTM returns hashrate in hashes, while another source can return something like 45.6. You take this into account when setting {hrlimit} when changing from WTM to another source
If the pool returns, for example, 900 kh / s, and if the hash value is increased instead of 1100 kh / s returns 1.1 Mh / s (or vice versa), then, depending on the value of {hrlimit}, HRM will take this as a sharp (~ 1000%) increase or downgrade the hashram. So far, I have not seen such a case, it is possible to solve it by the correct value of {hrregexp} or {eval}
Download: http://dropmefiles.com/B6NFj