has anyone tried butchering jj's hashmonitor powershell script to monitor castxmr now that it has an API?
i would but my programming leaves a lot to be desired....
I posted this on another thread and also helping some redditor, but you can try this:
I have modified the script slightly to work with 1 of my Vega card. You can modified it accordingly to fit your rig.
Download link below:
https://drive.google.com/open?id=0B2XFJ__I0jzLWlBZMTVCMWZDZ3YwRDZiRkh6cldKWnc1WjlzSome changes I made:
If you are executing the run_HashMonitor.cmd, make sure you change the file name in it accordingly to reflect CastXMR_HashMonitor_v2.6.ps1 (Or any name that you saved as).
Notable change I have made in this ps script includes:
Line 168 - 172 : I am using the script to call Cast-XMR directly, and Line 169 is the usual config including my wallet address, mining pool etc (the usual you put in a .bat) & also --remoteaccess in this case. Line 170 - 172 is to assign the localhost & port accordingly (7777)
Line 187: The main address for local/remote monitoring
Line 191 - 201: I didn't use $hdiff variable, but make a new variable for min Vega Hashrate before restart $global:vegahash @ line 201 (multiply by 1,000 since the reported value in the web is in actual hash rate)
Line 392 - 397 : Initial Vega hashrate for comparison (Not really needed since we have a reset trigger down below, but it's the same as the next)
Line 476 - 479 : Vega hashrate used for monitoring in order for restart.
Line 483 - 484 : Nothing major, just changing monitoring from 1 minute to every 30 secs
7: Line 486 : Most important part, condition to restart (Here to check my Vega hashrate against my preset target -> ~1.75kH/s @ Line 201)
This should set you up in the right direction to start with;
Do take note that I am running only 1 Vega to check against, hence I can use the total_hash_rate for comparison; if you are running multiple Vegas rig, you might need to divide it by number of GPU instances before you make the comparison. Alternatively is to loop through the "devices" in the hashrate report JSON to check if any of them drop, but I find total_hash_rate to be easier. You can also use total_hash_rate_avg in the report, as current total_hash_rate might be too sensitive for occasional dip.
And remember to change the CMDLine in Line 169, or else you would be mining to my wallet instead.
Let me know if you have any further question. I will try my best to help set up.
One other section that people might find confusing, though StellarX88 explained it:
Drop trigger section is dependent on the number of Vegas that you have installed.
When hash rate drops, if it drops for 1 card from 1950 down to 1600 the difference = 350. So if it drops for 5 cards, then 5 x 350 = 1750 BUT you need to add three "000" to match /json output of Cast 0.70.
So my $hdiff = 1750000
Similarly, if my normal total hash rate is aroud 9.6KH/s, and if I want to restart if that total drops to 8KH/s, I have to express that value by adding three "000" onto the end.
$global:vegaHash = 8KH/s = 8000000
#########################################################################
# Set drop trigger and startup timeout
#########################################################################
$hdiff = 1750000 # This is the drop in total hash rate where we
# trigger a restart (Starting HASHRATE-$hdiff)
#
$timeout = 60 # (STARTUP ONLY)How long to wait for CAST_XMR to
# return a hashrate before we fail out and
# restart. There is no limiter on the number of restarts.
# Press CTRL-C to EXIT
#
$CAST_XMRstable = 20 # How long to wait for the hashrate to stabilize.
#
$global:vegaHash = 8000000 # Minimum vega hash rate before we also trigger
# a restart
#########################################################################
###################### END USER DEFINED VARIABLES #######################
#################### MAKE NO CHANGES BELOW THIS LINE ####################
##### BEGIN FUNCTIONS #####