Last active
June 11, 2018 03:18
-
-
Save vg0214/7fda7b553af004fe93d1440bd93bdaaa to your computer and use it in GitHub Desktop.
MultyPortNoWaitv2px
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
powershell -WindowStyle Normal -NoExit -file "C:\Biostar TB250-BTC\miningpoolhub\Zcash_multy\Miners\bin\MultyPortNoWaitv2px.ps1" | |
REM pause |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
###############################-v.2-######################################### | |
###########################-"vg0214.xyz"-#################################### | |
$username_multy_coin = "vg0214.xyz" | |
$devicespec = "0,1" | |
$WorkDirectory = "C:\Biostar TB250-BTC\miningpoolhub\Zcash_multy\Miners\bin\" | |
$bminer_proc = "bminer.exe" | |
$bbminer_proc = "bminer.exe" | |
$ccminer_proc = "ccminer-x64.exe" | |
$monero_nvidia_configfile = "nvidia_1080_1060.txt" | |
$donationon = $true | |
#######################################****################################## | |
#$donationon = $false #BTC donation address: 3FKYjWxzyqaukQimAmFpfcGGN66f7yzWDj | |
$ScriptBlock = | |
{ | |
#[Console]::OutputEncoding = [System.Text.Encoding]::GetEncoding("utf-8") | |
$use_ethash = $true | |
#$use_ethash = $false | |
$beepflg = $true | |
$firstStart = $true | |
$firstStart_equihash = $true | |
$firstStart_lyra2z = $true | |
$firstStart_monero7 = $true | |
$firstStart_groestl = $true | |
$firstStart_lyra2rev2 = $true | |
$firstStart_myrgr = $true | |
$firstStart_neoscrypt = $true | |
$firstStart_skein = $true | |
$firstStart_ethash = $true | |
#$startTime = get-date | |
#$waitSecondsDisMining = 7200 #заново сканировать порты каждые - 2 часа | |
$waitSecondsDisMining = 1800 #заново сканировать порты tcp каждые - 30 минут | |
$pingtstpause_sec = 180 #пауза между повторами сканирования -ping 3 минуты | |
$endTimeMining = $(get-date).addSeconds($waitSecondsDisMining) | |
$timeSpanMining = New-TimeSpan $(get-date) $endTimeMining | |
$timeSpanMining_equihash = $timeSpanMining | |
$timeSpanMining_lyra2z = $timeSpanMining | |
$timeSpanMining_monero7 = $timeSpanMining | |
$timeSpanMining_groestl = $timeSpanMining | |
$timeSpanMining_lyra2rev2 = $timeSpanMining | |
$timeSpanMining_myrgr = $timeSpanMining | |
$timeSpanMining_neoscrypt = $timeSpanMining | |
$timeSpanMining_skein = $timeSpanMining | |
$timeSpanMining_ethash = $timeSpanMining | |
$endTimeMining_equihash = $endTimeMining | |
$endTimeMining_lyra2z = $endTimeMining | |
$endTimeMining_monero7 = $endTimeMining | |
$endTimeMining_groestl = $endTimeMining | |
$endTimeMining_lyra2rev2 = $endTimeMining | |
$endTimeMining_myrgr = $endTimeMining | |
$endTimeMining_neoscrypt = $endTimeMining | |
$endTimeMining_skein = $endTimeMining | |
$endTimeMining_ethash = $endTimeMining | |
$global:tcptestportr_equihash = $false | |
$global:tcptestportr_lyra2z = $false | |
$global:tcptestportr_monero7 = $false | |
$global:tcptestportr_groestl = $false | |
$global:tcptestportr_lyra2rev2 = $false | |
$global:tcptestportr_myrgr = $false | |
$global:tcptestportr_neoscrypt = $false | |
$global:tcptestportr_skein = $false | |
$global:tcptestportr_ethash = $false | |
$global:flag_equihash = $false | |
$global:flag_lyra2z = $false | |
$global:flag_monero7 = $false | |
$global:flag_groestl = $false | |
$global:flag_lyra2rev2 = $false | |
$global:flag_myrgr = $false | |
$global:flag_neoscrypt = $false | |
$global:flag_skein = $false | |
$global:flag_ethash = $false | |
#$global:urlpool_equihash = @() | |
#$global:urlpool_equihash | |
#$urlpool_equihash = $Null | |
#$urlpool_equihash | |
#$global:sortarray_equihash = @() | |
#$global:sortarray_equihash | |
#$sortarray_equihash | |
$jjj = 1 | |
#while ($jjj -lt 10) | |
while ($true) | |
{ | |
$jjj++ | |
#if ($jjj -gt 7) {Return} | |
$tcptestportrcount_ok = 0; | |
$tcptestportrcount_all = 0; | |
###################################################################################################################### | |
#$startbminer = "C:\Biostar TB250-BTC\miningpoolhub\Zcash_multy\Miners\bin\bminer.exe -uri stratum+ssl:// | |
###################################################################################################################### | |
#while ($timeSpanMining.TotalHours -gt -1) | |
write-host "TestPortMultyAction" | |
# pause | |
#$scriptBlock = { | |
write-host "TestPortMultyAction scriptBlock" | |
#pause | |
$timeSpanMining = New-TimeSpan $(get-date) $endTimeMining | |
$timeSpanMining_equihash = New-TimeSpan $(get-date) $endTimeMining_equihash | |
#$timeSpanMining_equihash.TotalSeconds | |
if ($firstStart_equihash -or ($timeSpanMining_equihash.TotalHours -lt 0)) | |
{ | |
$firstStart_equihash = $false | |
$global:urlpool_equihash = @() | |
$global:urlpool_equihash += ,@("europe.equihash-hub.miningpoolhub.com",12023, 1000, $true) | |
$global:urlpool_equihash += ,@("us-east.equihash-hub.miningpoolhub.com",12023, 1000, $true) | |
$global:urlpool_equihash += ,@("asia.equihash-hub.miningpoolhub.com",12023, 1000, $true) | |
$urlpool_equihash | |
$endTimeMining = $(get-date).addSeconds($waitSecondsDisMining) | |
$timeSpanMining = New-TimeSpan $(get-date) $endTimeMining | |
$endTimeMining_equihash = $(get-date).addSeconds($waitSecondsDisMining) | |
$timeSpanMining_equihash = New-TimeSpan $(get-date) $endTimeMining_equihash | |
#pause | |
} | |
$timeSpanMining.TotalSeconds | |
write-host "=ttttttttttttttttttttttttt=" | |
$timeSpanMining_equihash.TotalSeconds | |
#pause | |
$StartProcess_equihash = $false | |
$i = 0 | |
$pingtestportr = $False | |
$tcptestportr = $False | |
foreach ($item in $urlpool_equihash) | |
{ | |
if (-!$urlpool_equihash[$i][3]) | |
{ | |
$i++ | |
continue | |
} | |
$request = Test-NetConnection -ComputerName $urlpool_equihash[$i][0] -Port $urlpool_equihash[$i][1] | |
if(-!$request.TcpTestSucceeded) | |
{ | |
$urlpool_equihash[$i][3] = $False | |
$i++ | |
continue | |
} | |
$tcptestportr = $tcptestportr -or $request.TcpTestSucceeded | |
$urlpool_equihash[$i][2] = 999 | |
#$request | |
#pause | |
$request = Test-NetConnection -ComputerName $urlpool_equihash[$i][0] | |
#$request | |
#pause | |
if ($request.PingSucceeded) | |
{ | |
$pingtestportr = $pingtestportr -or $request.PingSucceeded | |
#$request.PingReplyDetails.RoundtripTime | |
$urlpool_equihash[$i][2] = $request.PingReplyDetails.RoundtripTime | |
} | |
#pause | |
#if ($testportr) {break} | |
$i++ | |
#$i | |
} | |
#$global:sortarray_equihash = @() | |
$global:sortarray_equihash = $urlpool_equihash | sort-object -Property @{Expression={[object]$_[2]}; Ascending=$true} | |
$flag_equihash = $true | |
$poolhash.sortarray_equihash = $sortarray_equihash | |
$poolhash.flag_equihash = $true | |
write-host "===============================" | |
write-host "Sort by ping" | |
write-host "===============================" | |
foreach($sortpingi in $sortarray_equihash) | |
{ | |
Write-host ($sortpingi) | |
} | |
if ($pingtestportr) | |
{ | |
$POOL = $sortarray_equihash[0][0] | |
$PORT = $sortarray_equihash[0][1] | |
} | |
else | |
{ | |
$POOL = $urlpool_equihash[0][0] | |
$PORT = $urlpool_equihash[0][1] | |
} | |
$POOL | |
$PORT | |
$global:tcptestportr_equihash = $tcptestportr | |
$poolhash.tcptestportr_equihash = $tcptestportr | |
$tcptestportrcount_all++ | |
#$poolhash.timeworksec = 20 | |
$poolhash.minerstart | |
$poolhash.timeworksec | |
$poolhash.workflag | |
$poolhash.donationon | |
if ($poolhash.donationon) { | |
if ($poolhash.minerstart -and -not$poolhash.workflag) | |
{ | |
if ($tcptestportr) | |
{ | |
$poolhash.workflag = $true | |
$timeSpanMiningstart_equihash = $(get-date) | |
$timeSpanMiningstart_equihash | |
"write-host Miner Start - equihash - $timeSpanMiningstart_equihash" | |
$USERNAME = "vg0214.zzz:x" | |
$DEVIGES = $poolhash.devicespec | |
$SCHEME = "stratum+ssl" | |
$PORT = 20570 | |
$miner_wd = $poolhash.workdirectory | |
$miner_wd | |
#$miner_wd = "C:\Biostar TB250-BTC\miningpoolhub\Zcash_multy\Miners\bin\" | |
$proc = $poolhash.bbminer_proc | |
$arguments = '-uri ' + $SCHEME + ':' + '//' + $USERNAME + '@' + $POOL + ':' + $PORT + ' -max-network-failures=3 -watchdog=false -nofee -devices ' + $DEVIGES | |
$arguments | |
#$miner_equihash = start-process $proc $arguments -WorkingDirectory $miner_wd -PassThru -WindowStyle Hidden | |
$miner_equihash = start-process $proc $arguments -WorkingDirectory $miner_wd -PassThru -WindowStyle Minimized | |
$miner_equihash | |
#pause | |
############## | |
#Start-Sleep 30 | |
############## | |
$elapsedTimemine = New-TimeSpan $timeSpanMiningstart_equihash $(get-date) | |
$totalsessionsecond_equihash = $elapsedTimemine.TotalSeconds | |
"write-host Miner WORK - equihash > $(get-date) worktime sec = $totalsessionsecond_equihash" | |
"write-host > timelimit = " + $poolhash.timeworksec.ToString() | |
} | |
} | |
if ($poolhash.workflag) | |
{ | |
$elapsedTimemine = New-TimeSpan $timeSpanMiningstart_equihash $(get-date) | |
$elapsedTimemine | |
$totalsessionsecond_equihash = $elapsedTimemine.TotalSeconds | |
$totalsessionsecond_equihash | |
"write-host Miner ?End - equihash > $(get-date) worktime sec = $totalsessionsecond_equihash" | |
"write-host > timelimit = " + $poolhash.timeworksec.ToString() | |
if ($totalsessionsecond_equihash -gt $poolhash.timeworksec) | |
{ | |
$poolhash.workflag = $false | |
$poolhash.minerstart = $false | |
'Write-Host in Wait process bminer' | |
$bm = get-process -inputobject $miner_equihash | |
#$bm | |
if (-not($bm -eq $Null)) | |
{ | |
'Write-Host > is no Null - stop-process miner' | |
$sbm = stop-process -inputobject $miner_equihash -PassThru | |
#$sbm | |
#pause | |
} | |
else | |
{ | |
'Write-Host is Null' | |
} | |
} | |
} | |
} | |
#return | |
###################################################################################################################### | |
#cminer-x64.exe -r 0 -a lyra2z -o stratum+tcp://us-east.lyra2z-hub.miningpoolhub.com:12025 -u vg0214.zzz -p x -d 0,1 | |
###################################################################################################################### | |
$timeSpanMining_lyra2z = New-TimeSpan $(get-date) $endTimeMining_lyra2z | |
#$timeSpanMining_lyra2z.TotalSeconds | |
if ($firstStart_lyra2z -or ($timeSpanMining_lyra2z.TotalHours -lt 0)) | |
{ | |
$firstStart_lyra2z = $false | |
$global:urlpool_lyra2z = @() | |
$global:urlpool_lyra2z += ,@("europe.lyra2z-hub.miningpoolhub.com",12025, 1000, $true) | |
$global:urlpool_lyra2z += ,@("us-east.lyra2z-hub.miningpoolhub.com",12025, 1000, $true) | |
$global:urlpool_lyra2z += ,@("asia.lyra2z-hub.miningpoolhub.com",12025, 1000, $true) | |
#$urlpool_lyra2z | |
#pause | |
$endTimeMining_lyra2z = $(get-date).addSeconds($waitSecondsDisMining) | |
$timeSpanMining_lyra2z = New-TimeSpan $(get-date) $endTimeMining_lyra2z | |
} | |
$timeSpanMining.TotalSeconds | |
$timeSpanMining_lyra2z.TotalSeconds | |
$StartProcess_lyra2z = $false | |
$i = 0 | |
$pingtestportr = $False | |
$tcptestportr = $False | |
foreach ($item in $urlpool_lyra2z) | |
{ | |
if (-!$urlpool_lyra2z[$i][3]) | |
{ | |
$i++ | |
continue | |
} | |
$request = Test-NetConnection -ComputerName $urlpool_lyra2z[$i][0] -Port $urlpool_lyra2z[$i][1] | |
if(-!$request.TcpTestSucceeded) | |
{ | |
$urlpool_lyra2z[$i][3] = $False | |
$i++ | |
continue | |
} | |
$tcptestportr = $tcptestportr -or $request.TcpTestSucceeded | |
$urlpool_lyra2z[$i][2] = 999 | |
#$request | |
#pause | |
$request = Test-NetConnection -ComputerName $urlpool_lyra2z[$i][0] | |
#$request | |
#pause | |
if ($request.PingSucceeded) | |
{ | |
$pingtestportr = $pingtestportr -or $request.PingSucceeded | |
#$request.PingReplyDetails.RoundtripTime | |
$urlpool_lyra2z[$i][2] = $request.PingReplyDetails.RoundtripTime | |
} | |
#pause | |
#if ($testportr) {break} | |
$i++ | |
#$i | |
} | |
$global:sortarray_lyra2z = $urlpool_lyra2z | sort-object -Property @{Expression={[object]$_[2]}; Ascending=$true} | |
$flag_lyra2z = $true | |
$poolhash.sortarray_lyra2z = $sortarray_lyra2z | |
$poolhash.flag_lyra2z = $true | |
write-host "===============================" | |
write-host "Sort by ping" | |
write-host "===============================" | |
foreach($sortpingi in $sortarray_lyra2z) | |
{ | |
Write-host ($sortpingi) | |
} | |
if ($pingtestportr) | |
{ | |
$POOL = $sortarray_lyra2z[0][0] | |
$PORT = $sortarray_lyra2z[0][1] | |
} | |
else | |
{ | |
$POOL = $urlpool_lyra2z[0][0] | |
$PORT = $urlpool_lyra2z[0][1] | |
} | |
$POOL | |
$PORT | |
$global:tcptestportr_lyra2z = $tcptestportr | |
$poolhash.tcptestportr_lyra2z = $tcptestportr | |
$tcptestportrcount_all++ | |
###################################################################################################################### | |
#xmr-stak.exe --currency monero7 -r 8060 --nvidia nvidia_1080_1060.txt -o ssl://us-east.cryptonight-hub.miningpoolhub.com:12024 -u vg0214.zzz -p x | |
###################################################################################################################### | |
$timeSpanMining_monero7 = New-TimeSpan $(get-date) $endTimeMining_monero7 | |
if ($firstStart_monero7 -or ($timeSpanMining_monero7.TotalHours -lt 0)) | |
{ | |
$firstStart_monero7 = $false | |
$global:urlpool_monero7 = @() | |
$global:urlpool_monero7 += ,@("europe.cryptonight-hub.miningpoolhub.com",12024, 1000, $true) | |
$global:urlpool_monero7 += ,@("us-east.cryptonight-hub.miningpoolhub.com.com",12024, 1000, $true) | |
$global:urlpool_monero7 += ,@("asia.cryptonight-hub.miningpoolhub.com",12024, 1000, $true) | |
#$urlpool_monero7 | |
$endTimeMining_monero7 = $(get-date).addSeconds($waitSecondsDisMining) | |
$timeSpanMining_monero7 = New-TimeSpan $(get-date) $endTimeMining_monero7 | |
#pause | |
} | |
$timeSpanMining.TotalSeconds | |
$timeSpanMining_monero7.TotalSeconds | |
$StartProcess_monero7 = $false | |
$i = 0 | |
$pingtestportr = $False | |
$tcptestportr = $False | |
foreach ($item in $urlpool_monero7) | |
{ | |
if (-!$urlpool_monero7[$i][3]) | |
{ | |
$i++ | |
continue | |
} | |
$request = Test-NetConnection -ComputerName $urlpool_monero7[$i][0] -Port $urlpool_monero7[$i][1] | |
if(-!$request.TcpTestSucceeded) | |
{ | |
$urlpool_monero7[$i][3] = $False | |
$i++ | |
continue | |
} | |
$tcptestportr = $tcptestportr -or $request.TcpTestSucceeded | |
$urlpool_monero7[$i][2] = 999 | |
#$request | |
#pause | |
$request = Test-NetConnection -ComputerName $urlpool_monero7[$i][0] | |
#$request | |
#pause | |
if ($request.PingSucceeded) | |
{ | |
$pingtestportr = $pingtestportr -or $request.PingSucceeded | |
#$request.PingReplyDetails.RoundtripTime | |
$urlpool_monero7[$i][2] = $request.PingReplyDetails.RoundtripTime | |
} | |
#pause | |
#if ($testportr) {break} | |
$i++ | |
#$i | |
} | |
$global:sortarray_monero7 = $urlpool_monero7 | sort-object -Property @{Expression={[object]$_[2]}; Ascending=$true} | |
$flag_monero7 = $true | |
$poolhash.sortarray_monero7 = $sortarray_monero7 | |
$poolhash.flag_monero7 = $true | |
write-host "===============================" | |
write-host "Sort by ping" | |
write-host "===============================" | |
foreach($sortpingi in $sortarray_monero7) | |
{ | |
Write-host ($sortpingi) | |
} | |
if ($pingtestportr) | |
{ | |
$POOL = $sortarray_monero7[0][0] | |
$PORT = $sortarray_monero7[0][1] | |
} | |
else | |
{ | |
$POOL = $urlpool_monero7[0][0] | |
$PORT = $urlpool_monero7[0][1] | |
} | |
$POOL | |
$PORT | |
$global:tcptestportr_monero7 = $tcptestportr | |
$poolhash.tcptestportr_monero7 = $tcptestportr | |
$tcptestportrcount_all++ | |
###################################################################################################################### | |
#ccminer-x64.exe -r 0 -a groestl -o stratum+tcp://hub.miningpoolhub.com:12004 -u vg0214.zzz -p x -d 0,1 | |
###################################################################################################################### | |
$timeSpanMining_groestl = New-TimeSpan $(get-date) $endTimeMining_groestl | |
if ($firstStart_groestl -or ($timeSpanMining_groestl.TotalHours -lt 0)) | |
{ | |
$firstStart_groestl = $false | |
$global:urlpool_groestl = @() | |
$global:urlpool_groestl += ,@("hub.miningpoolhub.com",12004, 1000, $true) | |
#$urlpool_groestl | |
#$urlpool_groestl.Count | |
$StartProcess_groestl = $false | |
$endTimeMining_groest = $(get-date).addSeconds($waitSecondsDisMining) | |
$timeSpanMining_groest = New-TimeSpan $(get-date) $endTimeMining_groest | |
} | |
$timeSpanMining.TotalSeconds | |
$timeSpanMining_groest.TotalSeconds | |
$StartProcess_groestl = $false | |
$i = 0 | |
$pingtestportr = $False | |
$tcptestportr = $False | |
if ($urlpool_groestl.Count -gt 1) | |
{ | |
foreach ($item in $urlpool_groestl) | |
{ | |
if (-!$urlpool_groestl[$i][3]) | |
{ | |
$i++ | |
continue | |
} | |
$request = Test-NetConnection -ComputerName $urlpool_groestl[$i][0] -Port $urlpool_groestl[$i][1] | |
if(-!$request.TcpTestSucceeded) | |
{ | |
$urlpool_groestl[$i][3] = $False | |
$i++ | |
#pause | |
continue | |
} | |
$tcptestportr = $tcptestportr -or $request.TcpTestSucceeded | |
$urlpool_groestl[$i][2] = 999 | |
#$request | |
#pause | |
$request = Test-NetConnection -ComputerName $urlpool_groestl[$i][0] | |
#$request | |
#pause | |
if ($request.PingSucceeded) | |
{ | |
$pingtestportr = $pingtestportr -or $request.PingSucceeded | |
#$request.PingReplyDetails.RoundtripTime | |
$urlpool_groestl[$i][2] = $request.PingReplyDetails.RoundtripTime | |
} | |
#pause | |
#if ($testportr) {break} | |
$i++ | |
#$i | |
} | |
$global:sortarray_groestl = $urlpool_groestl | sort-object -Property @{Expression={[object]$_[2]}; Ascending=$true} | |
$flag_groestl = $true | |
$poolhash.flag_groestl = $true | |
$poolhash.sortarray_groestl = $sortarray_groestl | |
write-host "===============================" | |
write-host "Sort by ping" | |
write-host "===============================" | |
foreach($sortpingi in $sortarray_groestl) | |
{ | |
Write-host ($sortpingi) | |
} | |
#pause | |
} | |
else | |
{ | |
$pingtestportr = $false | |
$tcptestportr = $true | |
} | |
if ($pingtestportr) | |
{ | |
$POOL = $sortarray_groestl[0][0] | |
$PORT = $sortarray_groestl[0][1] | |
} | |
else | |
{ | |
$POOL = $urlpool_groestl[0][0] | |
$PORT = $urlpool_groestl[0][1] | |
$global:sortarray_groestl = $urlpool_groestl | |
$poolhash.sortarray_groestl = $urlpool_groestl | |
$poolhash.flag_groestl = $true | |
} | |
$POOL | |
$PORT | |
$global:tcptestportr_groestl = $tcptestportr | |
$poolhash.tcptestportr_groestl = $tcptestportr | |
$tcptestportrcount_all++ | |
###################################################################################################################### | |
#ccminer-x64.exe -r 0 -a lyra2rev2 -o stratum+tcp://hub.miningpoolhub.com:12018 -u vg0214.zzz -p x -d 0,1 | |
###################################################################################################################### | |
$timeSpanMining_lyra2rev2 = New-TimeSpan $(get-date) $endTimeMining_lyra2rev2 | |
$timeSpanMining_lyra2rev2.TotalSeconds | |
if ($firstStart_lyra2rev2 -or ($timeSpanMining_lyra2rev2.TotalHours -lt 0)) | |
{ | |
$firstStart_lyra2rev2 = $false | |
$global:urlpool_lyra2rev2 = @() | |
$global:urlpool_lyra2rev2 += ,@("hub.miningpoolhub.com",12018, 1000, $true) | |
#$urlpool_lyra2rev2 | |
#$urlpool_lyra2rev2.Count | |
$StartProcess_lyra2rev2 = $false | |
$endTimeMining_lyra2rev2 = $(get-date).addSeconds($waitSecondsDisMining) | |
$timeSpanMining_lyra2rev2 = New-TimeSpan $(get-date) $endTimeMining_lyra2rev2 | |
} | |
$timeSpanMining.TotalSeconds | |
$timeSpanMining_lyra2rev2.TotalSeconds | |
#pause | |
$StartProcess_lyra2rev2 = $false | |
$i = 0 | |
$pingtestportr = $False | |
$tcptestportr = $False | |
if ($urlpool_lyra2rev2.Count -gt 1) | |
{ | |
foreach ($item in $urlpool_lyra2rev2) | |
{ | |
if (-!$urlpool_lyra2rev2[$i][3]) | |
{ | |
$i++ | |
continue | |
} | |
$request = Test-NetConnection -ComputerName $urlpool_lyra2rev2[$i][0] -Port $urlpool_lyra2rev2[$i][1] | |
if(-!$request.TcpTestSucceeded) | |
{ | |
$urlpool_lyra2rev2[$i][3] = $False | |
$i++ | |
#pause | |
continue | |
} | |
$tcptestportr = $tcptestportr -or $request.TcpTestSucceeded | |
$urlpool_lyra2rev2[$i][2] = 999 | |
$request | |
#pause | |
$request = Test-NetConnection -ComputerName $urlpool_lyra2rev2[$i][0] | |
#$request | |
#pause | |
if ($request.PingSucceeded) | |
{ | |
$pingtestportr = $pingtestportr -or $request.PingSucceeded | |
#$request.PingReplyDetails.RoundtripTime | |
$urlpool_lyra2rev2[$i][2] = $request.PingReplyDetails.RoundtripTime | |
} | |
#pause | |
#if ($testportr) {break} | |
$i++ | |
#$i | |
} | |
$global:sortarray_lyra2rev2 = $urlpool_lyra2rev2 | sort-object -Property @{Expression={[object]$_[2]}; Ascending=$true} | |
$flag_lyra2rev2 = $true | |
$poolhash.sortarray_lyra2rev2 = $sortarray_lyra2rev2 | |
$poolhash.flag_lyra2rev2 = $true | |
write-host "===============================" | |
write-host "Sort by ping" | |
write-host "===============================" | |
foreach($sortpingi in $sortarray_lyra2rev2) | |
{ | |
Write-host ($sortpingi) | |
} | |
} | |
else | |
{ | |
$pingtestportr = $false | |
$tcptestportr = $true | |
} | |
if ($pingtestportr) | |
{ | |
$POOL = $sortarray_lyra2rev2[0][0] | |
$PORT = $sortarray_lyra2rev2[0][1] | |
} | |
else | |
{ | |
$POOL = $urlpool_lyra2rev2[0][0] | |
$PORT = $urlpool_lyra2rev2[0][1] | |
$global:sortarray_lyra2rev2 = $urlpool_lyra2rev2 | |
$poolhash.sortarray_lyra2rev2 = $urlpool_lyra2rev2 | |
$poolhash.tcptestportr_ = $true | |
$poolhash.flag_lyra2rev2 = $true | |
} | |
$POOL | |
$PORT | |
$global:tcptestportr_lyra2rev2 = $tcptestportr | |
$poolhash.tcptestportr_lyra2rev2 = $tcptestportr | |
$tcptestportrcount_all++ | |
###################################################################################################################### | |
#ccminer-x64.exe -r 0 -a myr-gr -o stratum+tcp://hub.miningpoolhub.com:12005 -u vg0214.zzz -p x -d 0,1 | |
###################################################################################################################### | |
$timeSpanMining_myrgr = New-TimeSpan $(get-date) $endTimeMining_myrgr | |
$timeSpanMining_myrgr.TotalSeconds | |
if ($firstStart_myrgr -or ($timeSpanMining_myrgr.TotalHours -lt 0)) | |
{ | |
$firstStart_myrgr = $false | |
$global:urlpool_myrgr = @() | |
$global:urlpool_myrgr += ,@("hub.miningpoolhub.com",12005, 1000, $true) | |
#$urlpool_myrgr | |
$urlpool_myrgr.Count | |
$StartProcess_myrgr = $false | |
$endTimeMining_myrgr = $(get-date).addSeconds($waitSecondsDisMining) | |
$timeSpanMining_myrgr = New-TimeSpan $(get-date) $endTimeMining_myrgr | |
} | |
$timeSpanMining.TotalSeconds | |
$timeSpanMining_myrgr.TotalSeconds | |
$StartProcess_myrgr = $false | |
$i = 0 | |
$pingtestportr = $False | |
$tcptestportr = $False | |
if ($urlpool_myrgr.Count -gt 1) | |
{ | |
foreach ($item in $urlpool_myrgr) | |
{ | |
if (-!$urlpool_myrgr[$i][3]) | |
{ | |
$i++ | |
continue | |
} | |
$request = Test-NetConnection -ComputerName $urlpool_myrgr[$i][0] -Port $urlpool_myrgr[$i][1] | |
if(-!$request.TcpTestSucceeded) | |
{ | |
$urlpool_myrgr[$i][3] = $False | |
$i++ | |
pause | |
continue | |
} | |
$tcptestportr = $tcptestportr -or $request.TcpTestSucceeded | |
$urlpool_myrgr[$i][2] = 999 | |
$request | |
pause | |
$request = Test-NetConnection -ComputerName $urlpool_myrgr[$i][0] | |
#$request | |
#pause | |
if ($request.PingSucceeded) | |
{ | |
$pingtestportr = $pingtestportr -or $request.PingSucceeded | |
#$request.PingReplyDetails.RoundtripTime | |
$urlpool_myrgr[$i][2] = $request.PingReplyDetails.RoundtripTime | |
} | |
#pause | |
#if ($testportr) {break} | |
$i++ | |
#$i | |
} | |
$global:sortarray_myrgr = $urlpool_myrgr | sort-object -Property @{Expression={[object]$_[2]}; Ascending=$true} | |
$flag_myrgr = $true | |
$poolhash.flag_myrgr = $true | |
$poolhash.sortarray_myrgr = $sortarray_myrgr | |
write-host "===============================" | |
write-host "Sort by ping" | |
write-host "===============================" | |
foreach($sortpingi in $sortarray_myrgr) | |
{ | |
Write-host ($sortpingi) | |
} | |
} | |
else | |
{ | |
$pingtestportr = $false | |
$tcptestportr = $true | |
} | |
if ($pingtestportr) | |
{ | |
$POOL = $sortarray_myrgr[0][0] | |
$PORT = $sortarray_myrgr[0][1] | |
} | |
else | |
{ | |
$POOL = $urlpool_myrgr[0][0] | |
$PORT = $urlpool_myrgr[0][1] | |
$poolhash.tcptestportr_myrgr = $true | |
$global:sortarray_myrgr = $urlpool_myrgr | |
$poolhash.sortarray_myrgr = $urlpool_myrgr | |
$poolhash.flag_myrgr = $true | |
} | |
$POOL | |
$PORT | |
$global:tcptestportr_myrgr = $tcptestportr | |
$poolhash.tcptestportr_myrgr = $tcptestportr | |
$tcptestportrcount_all++ | |
###################################################################################################################### | |
#ccminer-x64.exe -r 0 -a neoscrypt -o stratum+tcp://hub.miningpoolhub.com:12012 -u vg0214.zzz -p x -d 0,1 | |
###################################################################################################################### | |
$timeSpanMining_neoscrypt = New-TimeSpan $(get-date) $endTimeMining_neoscrypt | |
$timeSpanMining_neoscrypt.TotalSeconds | |
if ($firstStart_neoscrypt -or ($timeSpanMining_neoscrypt.TotalHours -lt 0)) | |
{ | |
$firstStart_neoscrypt = $false | |
$global:urlpool_neoscrypt = @() | |
$global:urlpool_neoscrypt += ,@("hub.miningpoolhub.com",12012, 1000, $true) | |
#$urlpool_neoscrypt | |
$urlpool_neoscrypt.Count | |
$StartProcess_neoscrypt = $false | |
$endTimeMining_neoscrypt = $(get-date).addSeconds($waitSecondsDisMining) | |
$timeSpanMining_neoscrypt = New-TimeSpan $(get-date) $endTimeMining_neoscrypt | |
} | |
$timeSpanMining.TotalSeconds | |
$timeSpanMining_neoscryp.TotalSeconds | |
$StartProcess_neoscrypt = $false | |
$i = 0 | |
$pingtestportr = $False | |
$tcptestportr = $False | |
if ($urlpool_neoscrypt.Count -gt 1) | |
{ | |
foreach ($item in $urlpool_neoscrypt) | |
{ | |
if (-!$urlpool_neoscrypt[$i][3]) | |
{ | |
$i++ | |
continue | |
} | |
$request = Test-NetConnection -ComputerName $urlpool_neoscrypt[$i][0] -Port $urlpool_neoscrypt[$i][1] | |
if(-!$request.TcpTestSucceeded) | |
{ | |
$urlpool_neoscrypt[$i][3] = $False | |
$i++ | |
pause | |
continue | |
} | |
$tcptestportr = $tcptestportr -or $request.TcpTestSucceeded | |
$urlpool_neoscrypt[$i][2] = 999 | |
$request | |
pause | |
$request = Test-NetConnection -ComputerName $urlpool_neoscrypt[$i][0] | |
#$request | |
#pause | |
if ($request.PingSucceeded) | |
{ | |
$pingtestportr = $pingtestportr -or $request.PingSucceeded | |
#$request.PingReplyDetails.RoundtripTime | |
$urlpool_neoscrypt[$i][2] = $request.PingReplyDetails.RoundtripTime | |
} | |
#pause | |
#if ($testportr) {break} | |
$i++ | |
#$i | |
} | |
$global:sortarray_neoscrypt = $urlpool_neoscrypt | sort-object -Property @{Expression={[object]$_[2]}; Ascending=$true} | |
$flag_neoscrypt = $true | |
$poolhash.sortarray_neoscrypt = $sortarray_neoscrypt | |
$poolhash.flag_neoscrypt = $true | |
write-host "===============================" | |
write-host "Sort by ping" | |
write-host "===============================" | |
foreach($sortpingi in $sortarray_neoscrypt) | |
{ | |
Write-host ($sortpingi) | |
} | |
} | |
else | |
{ | |
$pingtestportr = $false | |
$tcptestportr = $true | |
} | |
if ($pingtestportr) | |
{ | |
$POOL = $sortarray_neoscrypt[0][0] | |
$PORT = $sortarray_neoscrypt[0][1] | |
} | |
else | |
{ | |
$POOL = $urlpool_neoscrypt[0][0] | |
$PORT = $urlpool_neoscrypt[0][1] | |
$poolhash.tcptestportr_neoscrypt = $true | |
$global:sortarray_neoscrypt = $urlpool_neoscrypt | |
$poolhash.sortarray_neoscrypt = $urlpool_neoscrypt | |
$poolhash.flag_neoscrypt = $true | |
} | |
$POOL | |
$PORT | |
$global:tcptestportr_neoscrypt = $tcptestportr | |
$poolhash.tcptestportr_neoscrypt = $tcptestportr | |
$tcptestportrcount_all++ | |
###################################################################################################################### | |
#ccminer-x64.exe -r 0 -a skein -o stratum+tcp://hub.miningpoolhub.com:12016 -u vg0214.zzz -p x -d 0,1 | |
###################################################################################################################### | |
$timeSpanMining_skein = New-TimeSpan $(get-date) $endTimeMining_skein | |
$timeSpanMining_skein.TotalSeconds | |
if ($firstStart_skein -or ($timeSpanMining_skein.TotalHours -lt 0)) | |
{ | |
$firstStart_skein = $false | |
$firstStart = $false | |
$global:urlpool_skein = @() | |
$global:urlpool_skein += ,@("hub.miningpoolhub.com",12016, 1000, $true) | |
#$urlpool_skein | |
$urlpool_skein.Count | |
$StartProcess_skein = $false | |
$endTimeMining_skein = $(get-date).addSeconds($waitSecondsDisMining) | |
$timeSpanMining_skein = New-TimeSpan $(get-date) $endTimeMining_skein | |
} | |
$timeSpanMining.TotalSeconds | |
$timeSpanMining_skein.TotalSeconds | |
$StartProcess_skein = $false | |
$i = 0 | |
$pingtestportr = $False | |
$tcptestportr = $False | |
if ($urlpool_skein.Count -gt 1) | |
{ | |
foreach ($item in $urlpool_skein) | |
{ | |
if (-!$urlpool_skein[$i][3]) | |
{ | |
$i++ | |
continue | |
} | |
$request = Test-NetConnection -ComputerName $urlpool_skein[$i][0] -Port $urlpool_skein[$i][1] | |
if(-!$request.TcpTestSucceeded) | |
{ | |
$urlpool_skein[$i][3] = $False | |
$i++ | |
pause | |
continue | |
} | |
$tcptestportr = $tcptestportr -or $request.TcpTestSucceeded | |
$urlpool_skein[$i][2] = 999 | |
$request | |
pause | |
$request = Test-NetConnection -ComputerName $urlpool_skein[$i][0] | |
#$request | |
#pause | |
if ($request.PingSucceeded) | |
{ | |
$pingtestportr = $pingtestportr -or $request.PingSucceeded | |
#$request.PingReplyDetails.RoundtripTime | |
$urlpool_skein[$i][2] = $request.PingReplyDetails.RoundtripTime | |
} | |
#pause | |
#if ($testportr) {break} | |
$i++ | |
#$i | |
} | |
$global:sortarray_skein = $urlpool_skein | sort-object -Property @{Expression={[object]$_[2]}; Ascending=$true} | |
$flag_skein = $true | |
$poolhash.flag_skein = $true | |
$poolhash.sortarray_skein = $sortarray_skein | |
write-host "===============================" | |
write-host "Sort by ping" | |
write-host "===============================" | |
foreach($sortpingi in $sortarray_skein) | |
{ | |
Write-host ($sortpingi) | |
} | |
} | |
else | |
{ | |
$pingtestportr = $false | |
$tcptestportr = $true | |
} | |
if ($pingtestportr) | |
{ | |
$POOL = $sortarray_skein[0][0] | |
$PORT = $sortarray_skein[0][1] | |
} | |
else | |
{ | |
$POOL = $urlpool_skein[0][0] | |
$PORT = $urlpool_skein[0][1] | |
$poolhash.tcptestportr_skein = $true | |
$global:sortarray_skein = $urlpool_skein | |
$poolhash.sortarray_skein = $urlpool_skein | |
$poolhash.flag_skein = $true | |
#$sortarray_skein | |
#pause | |
} | |
$POOL | |
$PORT | |
$global:tcptestportr_skein = $tcptestportr | |
$poolhash.tcptestportr_skein = $tcptestportr | |
$tcptestportrcount_all++ | |
###################################################################################################################### | |
#ethminer.exe --farm-retries 0 -U -S us-east.ethash-hub.miningpoolhub.com:12020 -O vg0214.zzz:x -FS exit --cuda-devices 0,1 | |
###################################################################################################################### | |
#$use_ethash = $false | |
#$use_ethash = $true | |
$timeSpanMining_ethash = New-TimeSpan $(get-date) $endTimeMining_ethash | |
$timeSpanMining_ethash.TotalSeconds | |
if ($firstStart_ethash -or ($timeSpanMining_ethash.TotalHours -lt 0)) | |
{ | |
$firstStart_ethash = $false | |
$global:urlpool_ethash = @() | |
#$global:urlpool_ethash += ,@("europe.ethash-hub.miningpoolhub.com",12020, 1000, $true) | |
#$global:urlpool_ethash += ,@("us-east.ethash-hub.miningpoolhub.com",12020, 1000, $true) | |
#$global:urlpool_ethash += ,@("asia.ethash-hub.miningpoolhub.com",12020, 1000, $true) | |
$global:urlpool_ethash += ,@("asia.ethash-hub.miningpoolhub.com",12020, 1000, $true) | |
$global:urlpool_ethash += ,@("europe.ethash-hub.miningpoolhub.com",12020, 1000, $true) | |
$global:urlpool_ethash += ,@("us-east.ethash-hub.miningpoolhub.com",12020, 1000, $true) | |
#$urlpool_ethash | |
$endTimeMining_ethash = $(get-date).addSeconds($waitSecondsDisMining) | |
$timeSpanMining_ethash = New-TimeSpan $(get-date) $endTimeMining_ethash | |
} | |
$timeSpanMining.TotalSeconds | |
$timeSpanMining_ethash.TotalSeconds | |
$StartProcess_ethash = $false | |
$i = 0 | |
$pingtestportr = $False | |
$tcptestportr = $False | |
if ($use_ethash) | |
{ | |
foreach ($item in $urlpool_ethash) | |
{ | |
if (-!$urlpool_ethash[$i][3]) | |
{ | |
$i++ | |
continue | |
} | |
$request = Test-NetConnection -ComputerName $urlpool_ethash[$i][0] -Port $urlpool_ethash[$i][1] | |
if(-!$request.TcpTestSucceeded) | |
{ | |
$urlpool_ethash[$i][3] = $False | |
$i++ | |
continue | |
} | |
$urlpool_ethash[$i][2] = 999 | |
$tcptestportr = $tcptestportr -or $request.TcpTestSucceeded | |
#$request | |
#pause | |
$request = Test-NetConnection -ComputerName $urlpool_ethash[$i][0] | |
#$request | |
#pause | |
if ($request.PingSucceeded) | |
{ | |
$pingtestportr = $pingtestportr -or $request.PingSucceeded | |
#$request.PingReplyDetails.RoundtripTime | |
$urlpool_ethash[$i][2] = $request.PingReplyDetails.RoundtripTime | |
} | |
$i++ | |
} | |
$global:sortarray_ethash = $urlpool_ethash | sort-object -Property @{Expression={[object]$_[2]}; Ascending=$true} | |
$flag_ethash = $true | |
$poolhash.sortarray_ethash = $sortarray_ethash | |
$poolhash.flag_ethash = $true | |
write-host "===============================" | |
write-host "Sort by ping" | |
write-host "===============================" | |
foreach($sortpingi in $sortarray_ethash) | |
{ | |
Write-host ($sortpingi) | |
} | |
if ($pingtestportr) | |
{ | |
$POOL = $sortarray_ethash[0][0] | |
$PORT = $sortarray_ethash[0][1] | |
} | |
else | |
{ | |
#$POOL = $urlpool_ethash[0][0] | |
#$PORT = $urlpool_ethash[0][1] | |
$POOL = $sortarray_ethash[0][0] | |
$PORT = $sortarray_ethash[0][1] | |
} | |
} | |
else | |
{ | |
$tcptestportr = $True | |
$POOL = $urlpool_ethash[2][0] | |
$PORT = $urlpool_ethash[2][1] | |
$global:sortarray_ethash = $urlpool_ethash | |
} | |
$global:tcptestportr_ethash = $tcptestportr | |
$poolhash.tcptestportr_ethash = $tcptestportr | |
$tcptestportrcount_all++ | |
$tcptestportrcount_all | |
$tcptestportrcount_ok | |
$profok = ($tcptestportrcount_ok / $tcptestportrcount_all) * 100 | |
$profok | |
if ($profok -lt 70) | |
{ | |
$firstStart_equihash = $true | |
$firstStart_lyra2z = $true | |
$firstStart_monero7 = $true | |
$firstStart_groestl = $true | |
$firstStart_lyra2rev2 = $true | |
$firstStart_myrgr = $true | |
$firstStart_neoscrypt = $true | |
$firstStart_skein = $true | |
$firstStart_ethash = $true | |
write-host 'ScriptBlock Start-Sleep -Seconds 000' | |
} | |
else | |
{ | |
write-host "ScriptBlock Start-Sleep -Seconds $pingtstpause_sec" | |
Start-Sleep -Seconds $pingtstpause_sec | |
#pause | |
} | |
#Return | |
} | |
} | |
function MinersStart () | |
{ | |
$global:totalhour_equihash = 0 | |
$global:totalhour_lyra2z = 0 | |
$global:totalhour_monero7 = 0 | |
$global:totalhour_groestl = 0 | |
$global:totalhour_lyra2rev2 = 0 | |
$global:totalhour_myrgr = 0 | |
$global:totalhour_neoscrypt = 0 | |
$global:totalhour_skein = 0 | |
$global:totalhour_ethash = 0 | |
$minersrebootcount = 0 | |
$minersrebootcount_r = 0 | |
$timeSpanMiningstartfirst = $(get-date) | |
while ($true) | |
{ | |
$minersrebootcount++ | |
$poolhash.minersrebootcount = ++$minersrebootcount_r | |
$poolhash.minersrebootcount | |
$poolhash.mrbootcountcheck | |
if ($poolhash.minersrebootcount -gt $poolhash.mrbootcountcheck) | |
{ | |
$poolhash.minersrebootcount | |
$poolhash.minerstart = $true | |
$minersrebootcount_r = 0 | |
} | |
#if ($minersrebootcount++ -gt 7) {Return} | |
#start-sleep -seconds 30 | |
#$timeSpanMiningstartfirst = $(get-date) | |
write-host "M I N E R S - S T A R T $(get-date) " | |
write-host "==========================================================" | |
###################################################################################################################### | |
#$startbminer = "C:\Biostar TB250-BTC\miningpoolhub\Zcash_multy\Miners\bin\bminer.exe -uri stratum+ssl://vg0214.zzz | |
###################################################################################################################### | |
$timeSpanMiningstart_equihash = $(get-date) | |
write-host "----------------------------------------------------------------------------------------------------------------------------" | |
write-host "M i n e r s S t a r t - equihash - $timeSpanMiningstart_equihash" | |
#$poolhash.flag_equihash | |
While (-Not $poolhash.flag_equihash) | |
{ | |
Start-Sleep -Milliseconds 100 | |
} | |
$POOL = $poolhash.sortarray_equihash[0][0] | |
$PORT = $poolhash.sortarray_equihash[0][1] | |
$PING = $poolhash.sortarray_equihash[0][2] | |
$POOL | |
$PORT | |
$PING | |
#$poolhash.flag_equihash | |
#$poolhash.tcptestportr_equihash | |
#pause | |
if ($poolhash.tcptestportr_equihash) | |
{ | |
$StartProcess_equihash = $true | |
$USERNAME = $username_multy_coin | |
$DEVIGES = $devicespec | |
#$DEVIGES = '0,1' | |
#$USERNAME = "vg0214.zzz" | |
#$proc = "C:\Biostar TB250-BTC\miningpoolhub\Zcash_multy\Miners\bin\bminer.exe" | |
$SCHEME = "stratum+ssl" | |
$miner_wd = $WorkDirectory | |
#$miner_wd = "C:\Biostar TB250-BTC\miningpoolhub\Zcash_multy\Miners\bin\" | |
$proc = $bminer_proc | |
$arguments = '-uri ' + $SCHEME + ':' + '//' + $USERNAME + '@' + $POOL + ':' + $PORT + ' -max-network-failures=0 -watchdog=false -nofee -devices ' + $DEVIGES | |
############################################################################################################################################################## | |
$arguments | |
#$poolhash.bbminer_proc = $proc | |
$miner_equihash = start-process $proc $arguments -WorkingDirectory $miner_wd -PassThru | |
$miner_equihash | |
if ($beepflg) {[console]::beep(720,700)} | |
#pause | |
} | |
$StartProcess_equihash | |
#$tcptestportr_equihash | |
$scriptblcktimer_equihash = | |
{ | |
$elapsedTimemine_equihash = New-TimeSpan $timeSpanMiningstartfirst $(get-date) | |
$totalmin_equihash_H = $elapsedTimemine_equihash.TotalHours | |
$elapsedTimemine = New-TimeSpan $timeSpanMiningstart_equihash $(get-date) | |
$totalsessionmin_equihash = $elapsedTimemine.TotalMinutes | |
$totalsessionhour_equihash = $elapsedTimemine.TotalHours | |
$global:totalhour_equihash += $totalsessionhour_equihash | |
write-host "M i n e r s End-Start - equihash > $(get-date) - $timeSpanMiningstart_equihash / total session equihash = $totalsessionhour_equihash hour" | |
write-host "$global:totalhour_equihash hors of total $totalmin_equihash_H hours." | |
write-host "----------------------------------------------------------------------------------------------------------------------------" | |
} | |
#pause | |
###################################################################################################################### | |
#cminer-x64.exe -r 0 -a lyra2z -o stratum+tcp://us-east.lyra2z-hub.miningpoolhub.com:12025 -u vg0214.zzz -p x -d 0,1 | |
###################################################################################################################### | |
$timeSpanMiningstart_lyra2z = $(get-date) | |
write-host "----------------------------------------------------------------------------------------------------------------------------" | |
write-host "M i n e r s S t a r t - lyra2z - $timeSpanMiningstart_lyra2z" | |
#$poolhash.flag_lyra2z | |
While (-Not $poolhash.flag_lyra2z) | |
{ | |
Start-Sleep -Milliseconds 100 | |
} | |
$POOL = $poolhash.sortarray_lyra2z[0][0] | |
$PORT = $poolhash.sortarray_lyra2z[0][1] | |
$PING = $poolhash.sortarray_lyra2z[0][2] | |
$POOL | |
$PORT | |
$PING | |
#$poolhash.flag_lyra2z | |
#$poolhash.tcptestportr_lyra2z | |
#pause | |
#$POOL = $sortarray_lyra2z[0][0] | |
#$PORT = $sortarray_lyra2z[0][1] | |
#$POOL | |
#$PORT | |
if ($poolhash.tcptestportr_lyra2z) | |
{ | |
$StartProcess_lyra2z = $true | |
$USERNAME = $username_multy_coin | |
$DEVIGES = $devicespec | |
#$DEVIGES = '0,1' | |
#$USERNAME = "vg0214.zzz" | |
#$proc = "C:\Biostar TB250-BTC\miningpoolhub\Zcash_multy\Miners\bin\ccminer-x64.exe" | |
$SCHEME = "stratum+tcp" | |
$miner_wd = $WorkDirectory | |
$proc = $ccminer_proc | |
#cminer-x64.exe -r 0 -a lyra2z -o stratum+tcp://us-east.lyra2z-hub.miningpoolhub.com:12025 -u vg0214.zzz -p x -d 0,1 | |
$arguments = '-r 0 -a lyra2z -o ' + $SCHEME + ':' + '//' + $POOL + ':' + $PORT + ' -u ' + $USERNAME + ' -p x -d ' + $DEVIGES | |
############################################################################################################################ | |
$arguments | |
$miner_lyra2z = start-process $proc $arguments -WorkingDirectory $miner_wd -PassThru | |
$miner_lyra2z | |
if ($beepflg) {[console]::beep(720,700)} | |
} | |
$StartProcess_lyra2z | |
#$tcptestportr_lyra2z | |
$scriptblcktimer_lyra2z = | |
{ | |
$elapsedTimemine_lyra2z = New-TimeSpan $timeSpanMiningstartfirst $(get-date) | |
$totalmin_lyra2z_H = $elapsedTimemine_lyra2z.TotalHours | |
$elapsedTimemine = New-TimeSpan $timeSpanMiningstart_lyra2z $(get-date) | |
$totalsessionmin_lyra2z = $elapsedTimemine.TotalMinutes | |
$totalsessionhour_lyra2z = $elapsedTimemine.TotalHours | |
$global:totalhour_lyra2z += $totalsessionhour_lyra2z | |
write-host "M i n e r s End-Start - lyra2z > $(get-date) - $timeSpanMiningstart_lyra2z / total session lyra2z = $totalsessionhour_lyra2z hour" | |
write-host "$global:totalhour_lyra2z hors of total $totalmin_lyra2z_H hours." | |
write-host "----------------------------------------------------------------------------------------------------------------------------" | |
} | |
###################################################################################################################### | |
#xmr-stak.exe --currency monero7 -r 8060 --nvidia nvidia_1080_1060.txt -o ssl://us-east.cryptonight-hub.miningpoolhub.com:12024 -u vg0214.zzz -p x | |
###################################################################################################################### | |
$timeSpanMiningstart_monero7 = $(get-date) | |
write-host "----------------------------------------------------------------------------------------------------------------------------" | |
write-host "M i n e r s S t a r t - monero7 - $timeSpanMiningstart_monero7" | |
#$poolhash.flag_monero7 | |
While (-Not $poolhash.flag_monero7) | |
{ | |
Start-Sleep -Milliseconds 100 | |
} | |
$POOL = $poolhash.sortarray_monero7[0][0] | |
$PORT = $poolhash.sortarray_monero7[0][1] | |
$PING = $poolhash.sortarray_monero7[0][2] | |
$POOL | |
$PORT | |
$PING | |
#$poolhash.flag_monero7 | |
#$poolhash.tcptestportr_monero7 | |
#pause | |
#$POOL = $sortarray_monero7[0][0] | |
#$PORT = $sortarray_monero7[0][1] | |
#$POOL | |
#$PORT | |
if ($poolhash.tcptestportr_monero7) | |
{ | |
$StartProcess_monero7 = $true | |
$USERNAME = $username_multy_coin | |
$DEVIGES = $devicespec | |
#$DEVIGES = '0,1' | |
#$USERNAME = "vg0214.zzz" | |
#$proc = "C:\Biostar TB250-BTC\miningpoolhub\Zcash_multy\Miners\bin\xmr-stak.exe" | |
$SCHEME = "ssl" | |
$miner_wd = $WorkDirectory | |
$proc = "xmr-stak.exe" | |
#xmr-stak.exe --currency monero7 -r 8060 --nvidia nvidia_1080_1060.txt -o ssl://us-east.cryptonight-hub.miningpoolhub.com:12024 -u vg0214.zzz -p x | |
$arguments = '--currency monero7 --nvidia ' + $monero_nvidia_configfile + ' -o ' + $SCHEME + ':' + '//' + $POOL + ':' + $PORT + ' -u ' + $USERNAME + ' -p x' | |
############################################################################################################################################################ | |
$arguments | |
$miner_monero7 = start-process $proc $arguments -WorkingDirectory $miner_wd -PassThru | |
$miner_monero7 | |
if ($beepflg) {[console]::beep(720,700)} | |
} | |
$StartProcess_monero7 | |
$scriptblcktimer_monero7 = | |
{ | |
$elapsedTimemine_monero7 = New-TimeSpan $timeSpanMiningstartfirst $(get-date) | |
$totalmin_monero7_H = $elapsedTimemine_monero7.TotalHours | |
$elapsedTimemine = New-TimeSpan $timeSpanMiningstart_monero7 $(get-date) | |
$totalsessionmin_monero7 = $elapsedTimemine.TotalMinutes | |
$totalsessionhour_monero7 = $elapsedTimemine.TotalHours | |
$global:totalhour_monero7 += $totalsessionhour_monero7 | |
write-host "M i n e r s End-Start - monero7 > $(get-date) - $timeSpanMiningstart_monero7 / total session monero7 = $totalsessionhour_monero7 hour" | |
write-host "$global:totalhour_monero7 hors $totalmin_monero7_H hours." | |
write-host "----------------------------------------------------------------------------------------------------------------------------" | |
} | |
###################################################################################################################### | |
#ccminer-x64.exe -r 0 -a groestl -o stratum+tcp://hub.miningpoolhub.com:12004 -u vg0214.zzz -p x -d 0,1 | |
###################################################################################################################### | |
$timeSpanMiningstart_groestl = $(get-date) | |
write-host "----------------------------------------------------------------------------------------------------------------------------" | |
write-host "M i n e r s S t a r t - groest - $timeSpanMiningstart_groestl" | |
#$poolhash.flag_groestl | |
While (-Not $poolhash.flag_groestl) | |
{ | |
Start-Sleep -Milliseconds 100 | |
} | |
$POOL = $poolhash.sortarray_groestl[0][0] | |
$PORT = $poolhash.sortarray_groestl[0][1] | |
$PING = $poolhash.sortarray_groestl[0][2] | |
$POOL | |
$PORT | |
$PING | |
#$poolhash.flag_groestl | |
#$poolhash.tcptestportr_groestl | |
#pause | |
#$POOL = $sortarray_groestl[0][0] | |
#$PORT = $sortarray_groestl[0][1] | |
$POOL | |
$PORT | |
if ($poolhash.tcptestportr_groestl) | |
{ | |
$StartProcess_groestl = $true | |
$USERNAME = $username_multy_coin | |
$DEVIGES = $devicespec | |
#$DEVIGES = '0,1' | |
#$USERNAME = "vg0214.zzz" | |
#$proc = "C:\Biostar TB250-BTC\miningpoolhub\Zcash_multy\Miners\bin\ccminer-x64.exe" | |
$SCHEME = "stratum+tcp" | |
$miner_wd = $WorkDirectory | |
$proc = $ccminer_proc | |
#ccminer-x64.exe -r 0 -a groestl -o stratum+tcp://hub.miningpoolhub.com:12004 -u vg0214.zzz -p x -d 0,1 | |
$arguments = '-r 0 -a groestl -o ' + $SCHEME + ':' + '//' + $POOL + ':' + $PORT + ' -u ' + $USERNAME + ' -p x -d ' + $DEVIGES | |
################################################################################################################################## | |
$arguments | |
$miner_groestl = start-process $proc $arguments -WorkingDirectory $miner_wd -PassThru | |
$miner_groestl | |
if ($beepflg) {[console]::beep(720,700)} | |
} | |
$StartProcess_groestl | |
$scriptblcktimer_groestl = | |
{ | |
$elapsedTimemine_groestl = New-TimeSpan $timeSpanMiningstartfirst $(get-date) | |
$totalmin_groestl_H = $elapsedTimemine_groestl.TotalHours | |
$elapsedTimemine = New-TimeSpan $timeSpanMiningstart_groestl $(get-date) | |
$totalsessionmin_groestl = $elapsedTimemine.TotalMinutes | |
$totalsessionhour_groestl = $elapsedTimemine.TotalHours | |
$global:totalhour_groestl += $totalsessionhour_groestl | |
write-host "M i n e r s End-Start - groestl > $(get-date) - $timeSpanMiningstart_groestl / total session groestl = $totalsessionhour_groestl hour" | |
write-host "$global:totalhour_groestl hors of total $totalmin_groestl_H hours." | |
write-host "----------------------------------------------------------------------------------------------------------------------------" | |
} | |
###################################################################################################################### | |
#ccminer-x64.exe -r 0 -a lyra2rev2 -o stratum+tcp://hub.miningpoolhub.com:12018 -u vg0214.zzz -p x -d 0,1 | |
###################################################################################################################### | |
$timeSpanMiningstart_lyra2rev2 = $(get-date) | |
write-host "----------------------------------------------------------------------------------------------------------------------------" | |
write-host "M i n e r s S t a r t - lyra2rev2 - $timeSpanMiningstart_lyra2rev2" | |
#$poolhash.flag_lyra2rev2 | |
While (-Not $poolhash.flag_lyra2rev2) | |
{ | |
Start-Sleep -Milliseconds 100 | |
} | |
$POOL = $poolhash.sortarray_lyra2rev2[0][0] | |
$PORT = $poolhash.sortarray_lyra2rev2[0][1] | |
$PING = $poolhash.sortarray_lyra2rev2[0][2] | |
$POOL | |
$PORT | |
$PING | |
#$poolhash.flag_lyra2rev2 | |
#$poolhash.tcptestportr_lyra2rev2 | |
#pause | |
#$POOL = $sortarray_lyra2rev2[0][0] | |
#$PORT = $sortarray_lyra2rev2[0][1] | |
#$POOL | |
#$PORT | |
if ($poolhash.tcptestportr_lyra2rev2) | |
{ | |
$StartProcess_lyra2rev2 = $true | |
$USERNAME = $username_multy_coin | |
$DEVIGES = $devicespec | |
#$DEVIGES = '0,1' | |
#$USERNAME = "vg0214.zzz" | |
#$proc = "C:\Biostar TB250-BTC\miningpoolhub\Zcash_multy\Miners\bin\ccminer-x64.exe" | |
$SCHEME = "stratum+tcp" | |
$miner_wd = $WorkDirectory | |
$proc = $ccminer_proc | |
#ccminer-x64.exe -r 0 -a lyra2rev2 -o stratum+tcp://hub.miningpoolhub.com:12018 -u vg0214.zzz -p x -d 0,1 | |
$arguments = '-r 0 -a lyra2rev2 -o ' + $SCHEME + ':' + '//' + $POOL + ':' + $PORT + ' -u ' + $USERNAME + ' -p x -d ' + $DEVIGES | |
################################################################################################################################## | |
$arguments | |
$miner_lyra2rev2 = start-process $proc $arguments -WorkingDirectory $miner_wd -PassThru | |
$miner_lyra2rev2 | |
if ($beepflg) {[console]::beep(720,700)} | |
} | |
$StartProcess_lyra2rev2 | |
$urlpool_lyra2rev2 | |
$scriptblcktimer_lyra2rev2 = | |
{ | |
$elapsedTimemine_lyra2rev2 = New-TimeSpan $timeSpanMiningstartfirst $(get-date) | |
$totalmin_lyra2rev2_H = $elapsedTimemine_lyra2rev2.TotalHours | |
$elapsedTimemine = New-TimeSpan $timeSpanMiningstart_lyra2rev2 $(get-date) | |
$totalsessionmin_lyra2rev2 = $elapsedTimemine.TotalMinutes | |
$totalsessionhour_lyra2rev2 = $elapsedTimemine.TotalHours | |
$global:totalhour_lyra2rev2 += $totalsessionhour_lyra2rev2 | |
write-host "M i n e r s End-Start - lyra2rev2 > $(get-date) - $timeSpanMiningstart_lyra2rev2 / total session lyra2rev2 = $totalsessionhour_lyra2rev2 hour" | |
write-host "$global:totalhour_lyra2rev2 hors of total $totalmin_lyra2rev2_H hours." | |
write-host "----------------------------------------------------------------------------------------------------------------------------" | |
} | |
###################################################################################################################### | |
#ccminer-x64.exe -r 0 -a myr-gr -o stratum+tcp://hub.miningpoolhub.com:12005 -u vg0214.zzz -p x -d 0,1 | |
###################################################################################################################### | |
$timeSpanMiningstart_myrgr = $(get-date) | |
write-host "----------------------------------------------------------------------------------------------------------------------------" | |
write-host "M i n e r s S t a r t - myrgr - $timeSpanMiningstart_myrgr" | |
#$poolhash.flag_myrgr | |
While (-Not $poolhash.flag_myrgr) | |
{ | |
Start-Sleep -Milliseconds 100 | |
} | |
$POOL = $poolhash.sortarray_myrgr[0][0] | |
$PORT = $poolhash.sortarray_myrgr[0][1] | |
$PING = $poolhash.sortarray_myrgr[0][2] | |
$POOL | |
$PORT | |
$PING | |
#$poolhash.flag_myrgr | |
#$poolhash.tcptestportr_myrgr | |
#pause | |
#$POOL = $sortarray_myrgr[0][0] | |
#$PORT = $sortarray_myrgr[0][1] | |
#$POOL | |
#$PORT | |
if ($poolhash.tcptestportr_myrgr) | |
{ | |
$StartProcess_myrgr = $true | |
$USERNAME = $username_multy_coin | |
$DEVIGES = $devicespec | |
#$DEVIGES = '0,1' | |
#$USERNAME = "vg0214.zzz" | |
#$proc = "C:\Biostar TB250-BTC\miningpoolhub\Zcash_multy\Miners\bin\ccminer-x64.exe" | |
$SCHEME = "stratum+tcp" | |
$miner_wd = $WorkDirectory | |
$proc = $ccminer_proc | |
#ccminer-x64.exe -r 0 -a myr-gr -o stratum+tcp://hub.miningpoolhub.com:12005 -u vg0214.zzz -p x -d 0,1 | |
$arguments = '-r 0 -a myr-gr -o ' + $SCHEME + ':' + '//' + $POOL + ':' + $PORT + ' -u ' + $USERNAME + ' -p x -d ' + $DEVIGES | |
################################################################################################################################## | |
$arguments | |
$miner_myrgr = start-process $proc $arguments -WorkingDirectory $miner_wd -PassThru | |
$miner_myrgr | |
if ($beepflg) {[console]::beep(720,700)} | |
} | |
$StartProcess_myrgr | |
$scriptblcktimer_myrgr = | |
{ | |
$elapsedTimemine_myrgr = New-TimeSpan $timeSpanMiningstartfirst $(get-date) | |
$totalmin_myrgr_H = $elapsedTimemine_myrgr.TotalHours | |
$elapsedTimemine = New-TimeSpan $timeSpanMiningstart_myrgr $(get-date) | |
$totalsessionmin_myrgr = $elapsedTimemine.TotalMinutes | |
$totalsessionhour_myrgr = $elapsedTimemine.TotalHours | |
$global:totalhour_myrgr += $totalsessionhour_myrgr | |
write-host "M i n e r s End-Start - myrgr > $(get-date) - $timeSpanMiningstart_myrgr / total session myrgr = $totalsessionhour_myrgr hour" | |
write-host "$global:totalhour_myrgr hors of total $totalmin_myrgr_H hours." | |
write-host "----------------------------------------------------------------------------------------------------------------------------" | |
} | |
###################################################################################################################### | |
#ccminer-x64.exe -r 0 -a neoscrypt -o stratum+tcp://hub.miningpoolhub.com:12012 -u vg0214.zzz -p x -d 0,1 | |
###################################################################################################################### | |
$timeSpanMiningstart_neoscrypt = $(get-date) | |
write-host "----------------------------------------------------------------------------------------------------------------------------" | |
write-host "M i n e r s S t a r t - neoscrypt - $timeSpanMiningstart_neoscrypt" | |
#$poolhash.flag_neoscrypt | |
While (-Not $poolhash.flag_neoscrypt) | |
{ | |
Start-Sleep -Milliseconds 100 | |
} | |
$POOL = $poolhash.sortarray_neoscrypt[0][0] | |
$PORT = $poolhash.sortarray_neoscrypt[0][1] | |
$PING = $poolhash.sortarray_neoscrypt[0][2] | |
$POOL | |
$PORT | |
$PING | |
#$poolhash.flag_neoscrypt | |
#$poolhash.tcptestportr_neoscrypt | |
#pause | |
#$POOL = $sortarray_neoscrypt[0][0] | |
#$PORT = $sortarray_neoscrypt[0][1] | |
#$POOL | |
#$PORT | |
if ($poolhash.tcptestportr_neoscrypt) | |
{ | |
$StartProcess_neoscrypt = $true | |
$USERNAME = $username_multy_coin | |
$DEVIGES = $devicespec | |
#$DEVIGES = '0,1' | |
#$USERNAME = "vg0214.zzz" | |
#$proc = "C:\Biostar TB250-BTC\miningpoolhub\Zcash_multy\Miners\bin\ccminer-x64.exe" | |
$SCHEME = "stratum+tcp" | |
$miner_wd = $WorkDirectory | |
$proc = $ccminer_proc | |
#ccminer-x64.exe -r 0 -a neoscrypt -o stratum+tcp://hub.miningpoolhub.com:12012 -u vg0214.zzz -p x -d 0,1 | |
$arguments = '-r 0 -a neoscrypt -o ' + $SCHEME + ':' + '//' + $POOL + ':' + $PORT + ' -u ' + $USERNAME + ' -p x -d ' + $DEVIGES | |
################################################################################################################################## | |
$arguments | |
$miner_neoscrypt = start-process $proc $arguments -WorkingDirectory $miner_wd -PassThru | |
$miner_neoscrypt | |
if ($beepflg) {[console]::beep(720,700)} | |
} | |
$StartProcess_neoscrypt | |
$scriptblcktimer_neoscrypt = | |
{ | |
$elapsedTimemine_neoscrypt = New-TimeSpan $timeSpanMiningstartfirst $(get-date) | |
$totalmin_neoscrypt_H = $elapsedTimemine_neoscrypt.TotalHours | |
$elapsedTimemine = New-TimeSpan $timeSpanMiningstart_neoscrypt $(get-date) | |
$totalsessionmin_neoscrypt = $elapsedTimemine.TotalMinutes | |
$totalsessionhour_neoscrypt = $elapsedTimemine.TotalHours | |
$global:totalhour_neoscrypt += $totalsessionhour_neoscrypt | |
write-host "M i n e r s End-Start - neoscrypt > $(get-date) - $timeSpanMiningstart_neoscrypt / total session neoscrypt = $totalsessionhour_neoscrypt hour" | |
write-host "$global:totalhour_neoscrypt hors of total $totalmin_neoscrypt_H hours." | |
write-host "----------------------------------------------------------------------------------------------------------------------------" | |
} | |
###################################################################################################################### | |
#ccminer-x64.exe -r 0 -a skein -o stratum+tcp://hub.miningpoolhub.com:12016 -u vg0214.zzz -p x -d 0,1 | |
###################################################################################################################### | |
$timeSpanMiningstart_skein = $(get-date) | |
write-host "----------------------------------------------------------------------------------------------------------------------------" | |
write-host "M i n e r s S t a r t - skein - $timeSpanMiningstart_skein" | |
#$poolhash.flag_skein | |
While (-Not $poolhash.flag_skein) | |
{ | |
Start-Sleep -Milliseconds 100 | |
} | |
$POOL = $poolhash.sortarray_skein[0][0] | |
$PORT = $poolhash.sortarray_skein[0][1] | |
$PING = $poolhash.sortarray_skein[0][2] | |
$POOL | |
$PORT | |
$PING | |
#$poolhash.flag_skein | |
#$poolhash.tcptestportr_skein | |
#pause | |
#POOL = $sortarray_skein[0][0] | |
#$PORT = $sortarray_skein[0][1] | |
#$POOL | |
#$PORT | |
if ($poolhash.tcptestportr_skein) | |
{ | |
$StartProcess_skein = $true | |
$USERNAME = $username_multy_coin | |
$DEVIGES = $devicespec | |
#$DEVIGES = '0,1' | |
#$USERNAME = "vg0214.zzz" | |
#$proc = "C:\Biostar TB250-BTC\miningpoolhub\Zcash_multy\Miners\bin\ccminer-x64.exe" | |
$SCHEME = "stratum+tcp" | |
$miner_wd = $WorkDirectory | |
$proc = $ccminer_proc | |
#ccminer-x64.exe -r 0 -a skein -o stratum+tcp://hub.miningpoolhub.com:12016 -u vg0214.zzz -p x -d 0,1 | |
$arguments = '-r 0 -a skein -o ' + $SCHEME + ':' + '//' + $POOL + ':' + $PORT + ' -u ' + $USERNAME + ' -p x -d ' + $DEVIGES | |
################################################################################################################################## | |
$arguments | |
$miner_skein = start-process $proc $arguments -WorkingDirectory $miner_wd -PassThru | |
$miner_skein | |
if ($beepflg) {[console]::beep(720,700)} | |
} | |
$StartProcess_skein | |
$scriptblcktimer_skein = | |
{ | |
$elapsedTimemine_skein = New-TimeSpan $timeSpanMiningstartfirst $(get-date) | |
$totalmin_skein_H = $elapsedTimemine_skein.TotalHours | |
$elapsedTimemine = New-TimeSpan $timeSpanMiningstart_skein $(get-date) | |
$totalsessionmin_skein = $elapsedTimemine.TotalMinutes | |
$totalsessionhour_skein = $elapsedTimemine.TotalHours | |
$global:totalhour_skein += $totalsessionhour_skein | |
write-host "M i n e r s End-Start - skein > $(get-date) - $timeSpanMiningstart_skein / total session skein = $totalsessionhour_skein hour" | |
write-host "$global:totalhour_skein hors of total $totalmin_skein_H hours." | |
write-host "----------------------------------------------------------------------------------------------------------------------------" | |
} | |
###################################################################################################################### | |
#ethminer.exe --farm-retries 0 -U -S us-east.ethash-hub.miningpoolhub.com:12020 -O vg0214.zzz:x -FS exit --cuda-devices 0,1 | |
###################################################################################################################### | |
$timeSpanMiningstart_ethash = $(get-date) | |
write-host "----------------------------------------------------------------------------------------------------------------------------" | |
write-host "M i n e r s S t a r t - ethash - $timeSpanMiningstart_ethash" | |
#$poolhash.flag_ethash | |
While (-Not $poolhash.flag_ethash) | |
{ | |
Start-Sleep -Milliseconds 100 | |
} | |
$POOL = $poolhash.sortarray_ethash[0][0] | |
$PORT = $poolhash.sortarray_ethash[0][1] | |
$PING = $poolhash.sortarray_ethash[0][2] | |
$POOL | |
$PORT | |
$PING | |
#$poolhash.flag_ethash | |
#$poolhash.tcptestportr_ethash | |
#pause | |
#$POOL = $sortarray_ethash[0][0] | |
#$PORT = $sortarray_ethash[0][1] | |
#$POOL | |
#$PORT | |
if ($poolhash.tcptestportr_ethash) | |
{ | |
$StartProcess_ethash = $true | |
$USERNAME = $username_multy_coin | |
$DEVIGES = $devicespec | |
#$DEVIGES = '0,1' | |
#$USERNAME = "vg0214.zzz" | |
#$proc = "C:\Biostar TB250-BTC\miningpoolhub\Zcash_multy\Miners\bin\ethminer.exe" | |
$SCHEME = "stratum+ssl" | |
$miner_wd = $WorkDirectory | |
$proc = "ethminer.exe" | |
#ethminer.exe --farm-retries 0 -U -S us-east.ethash-hub.miningpoolhub.com:12020 -O vg0214.zzz:x -FS exit --cuda-devices 0,1 | |
$arguments = '--farm-retries 0 -U -S ' + $POOL + ':' + $PORT + ' -o ' + $USERNAME + ':x -FS exit --cuda-devices ' + $DEVIGES | |
################################################################################################################################## | |
$arguments | |
$miner_ethash = start-process $proc $arguments -WorkingDirectory $miner_wd -PassThru | |
$miner_ethash | |
if ($beepflg) {[console]::beep(720,700)} | |
#pause | |
} | |
$StartProcess_ethash | |
#$urlpool_ethash | |
$scriptblcktimer_ethash = | |
{ | |
$elapsedTimemine_ethash = New-TimeSpan $timeSpanMiningstartfirst $(get-date) | |
$totalmin_ethash_H = $elapsedTimemine_ethash.TotalHours | |
$elapsedTimemine = New-TimeSpan $timeSpanMiningstart_ethash $(get-date) | |
$totalsessionmin_ethash = $elapsedTimemine.TotalMinutes | |
$totalsessionhour_ethash = $elapsedTimemine.TotalHours | |
$global:totalhour_ethash += $totalsessionhour_ethash | |
write-host "M i n e r s End-Start - ethash > $(get-date) - $timeSpanMiningstart_ethash / total session ethash = $totalsessionhour_ethash hour" | |
write-host "$global:totalhour_ethash hors of total $totalmin_ethash_H hours." | |
write-host "----------------------------------------------------------------------------------------------------------------------------" | |
} | |
#$wc = wait-process -Name ccminer-x64 | |
#$we = wait-process -Name ethminer | |
#$we = wait-process -Name xmr-stak | |
#[char]7 | |
#[console]::beep(720,700) | |
try | |
{ | |
Write-Host in Wait process bminer | |
#$bm = get-process -Name bminer | |
$bm = get-process -inputobject $miner_equihash | |
$bm | |
#pause | |
if (-not($bm -eq $Null)) | |
{ | |
Write-Host is no Null | |
#wait-process -Name bminer | |
wait-process -inputobject $miner_equihash | |
#&$scriptblcktimer_equihash | |
} | |
else | |
{ | |
Write-Host is Null | |
} | |
} | |
catch | |
{ | |
#Write-Host $Error | |
Write-Host Continue _equihash | |
} | |
&$scriptblcktimer_equihash | |
try | |
{ | |
Write-Host in Wait process ccminer-x64 lyra2z | |
#$ccm = get-process -Name ccminer-x64 | |
$ccm = get-process -inputobject $miner_lyra2z | |
$ccm | |
#pause | |
if (-not($ccm -eq $Null)) | |
{ | |
Write-Host is no Null | |
#wait-process -Name ccminer-x64 | |
wait-process -inputobject $miner_lyra2z | |
#&$scriptblcktimer_lyra2z | |
#pause | |
} | |
else | |
{ | |
Write-Host is Null | |
} | |
} | |
catch | |
{ | |
#Write-Host $Error | |
Write-Host Continue _lyra2z | |
} | |
&$scriptblcktimer_lyra2z | |
try | |
{ | |
Write-Host in Wait process xmr-stak _monero7 | |
#$xm = get-process -Name xmr-stak | |
$xm =get-process -inputobject $miner_monero7 | |
$xm | |
#pause | |
if (-not($xm -eq $Null)) | |
{ | |
Write-Host is no Null | |
#wait-process -Name xmr-stak | |
wait-process -inputobject $miner_monero7 | |
#&$scriptblcktimer_monero7 | |
#pause | |
} | |
else | |
{ | |
Write-Host is Null | |
} | |
} | |
catch | |
{ | |
#Write-Host $Error | |
Write-Host Continue _monero7 | |
} | |
&$scriptblcktimer_monero7 | |
try | |
{ | |
Write-Host in Wait process ccminer-x64 _groestl | |
#$ccm = get-process -Name ccminer-x64 | |
$ccm = get-process -inputobject $miner_groestl | |
$ccm | |
#pause | |
if (-not($ccm -eq $Null)) | |
{ | |
Write-Host is no Null | |
#wait-process -Name ccminer-x64 | |
wait-process -inputobject $miner_groestl | |
#&$scriptblcktimer_groestl | |
#pause | |
} | |
else | |
{ | |
Write-Host is Null | |
} | |
} | |
catch | |
{ | |
#Write-Host $Error | |
Write-Host Continue _groestl | |
} | |
&$scriptblcktimer_groestl | |
try | |
{ | |
Write-Host in Wait process ccminer-x64 _lyra2rev2 | |
#$ccm = get-process -Name ccminer-x64 | |
$ccm = get-process -inputobject $miner_lyra2rev2 | |
$ccm | |
#pause | |
if (-not($ccm -eq $Null)) | |
{ | |
Write-Host is no Null | |
#wait-process -Name ccminer-x64 | |
wait-process -inputobject $miner_lyra2rev2 | |
#&$scriptblcktimer_lyra2rev2 | |
#pause | |
} | |
else | |
{ | |
Write-Host is Null | |
} | |
} | |
catch | |
{ | |
#Write-Host $Error | |
Write-Host Continue _lyra2rev2 | |
} | |
&$scriptblcktimer_lyra2rev2 | |
try | |
{ | |
Write-Host in Wait process ccminer-x64 _myrgr | |
#$ccm = get-process -Name ccminer-x64 | |
$ccm = get-process -inputobject $miner_myrgr | |
$ccm | |
#pause | |
if (-not($ccm -eq $Null)) | |
{ | |
Write-Host is no Null | |
#wait-process -Name ccminer-x64 | |
wait-process -inputobject $miner_myrgr | |
#&$scriptblcktimer_myrgr | |
#pause | |
} | |
else | |
{ | |
Write-Host is Null | |
} | |
} | |
catch | |
{ | |
#Write-Host $Error | |
Write-Host Continue _myrgr | |
} | |
&$scriptblcktimer_myrgr | |
try | |
{ | |
Write-Host in Wait process ccminer-x64 _neoscrypt | |
#$ccm = get-process -Name ccminer-x64 | |
$ccm = get-process -inputobject $miner_neoscrypt | |
$ccm | |
#pause | |
if (-not($ccm -eq $Null)) | |
{ | |
Write-Host is no Null | |
#wait-process -Name ccminer-x64 | |
wait-process -inputobject $miner_neoscrypt | |
#&$scriptblcktimer_neoscrypt | |
#pause | |
} | |
else | |
{ | |
Write-Host is Null | |
} | |
} | |
catch | |
{ | |
#Write-Host $Error | |
Write-Host Continue _neoscrypt | |
} | |
&$scriptblcktimer_neoscrypt | |
try | |
{ | |
Write-Host in Wait process ccminer-x64 _skein | |
#$ccm = get-process -Name ccminer-x64 | |
$ccm = get-process -inputobject $miner_skein | |
$ccm | |
#pause | |
if (-not($ccm -eq $Null)) | |
{ | |
Write-Host is no Null | |
#wait-process -Name ccminer-x64 | |
wait-process -inputobject $miner_skein | |
#&$scriptblcktimer_skein | |
#pause | |
} | |
else | |
{ | |
Write-Host is Null | |
} | |
} | |
catch | |
{ | |
#Write-Host $Error | |
Write-Host Continue _skein | |
} | |
&$scriptblcktimer_skein | |
try | |
{ | |
Write-Host in Wait process ethminer _ethash | |
#$ethm = get-process -Name ethminer | |
$ethm = get-process -inputobject $miner_ethash | |
$ethm | |
#pause | |
if (-not($ethm -eq $Null)) | |
{ | |
Write-Host is no Null | |
#wait-process -Name ethminer | |
wait-process -inputobject $miner_ethash | |
#&$scriptblcktimer_ethash | |
#pause | |
} | |
else | |
{ | |
Write-Host is Null | |
} | |
} | |
catch | |
{ | |
#Write-Host $Error | |
Write-Host Continue _ethash | |
} | |
&$scriptblcktimer_ethash | |
Write-Host "TOTAL REBOOT COUNT = $minersrebootcount" | |
} | |
} | |
$poolhash = [HashTable]::Synchronized(@{}) | |
$poolhash.sortarray_equihash = @() | |
$poolhash.sortarray_lyra2z = @() | |
$poolhash.sortarray_monero7 = @() | |
$poolhash.sortarray_groestl = @() | |
$poolhash.sortarray_lyra2rev2 = @() | |
$poolhash.sortarray_myrgr = @() | |
$poolhash.sortarray_neoscrypt = @() | |
$poolhash.sortarray_skein = @() | |
$poolhash.sortarray_ethash = @() | |
$poolhash.devicespec = $devicespec | |
$poolhash.minerstart = $false | |
$poolhash.workflag = $false | |
$poolhash.timeworksec = 180 | |
$poolhash.minersrebootcount = 0 | |
$poolhash.mrbootcountcheck = 10 | |
$poolhash.workdirectory = $WorkDirectory | |
$poolhash.bminer_proc = $bminer_proc | |
$poolhash.bbminer_proc = $bbminer_proc | |
$poolhash.ccminer_proc = $ccminer_proc | |
$poolhash.donationon = $donationon | |
#$poolhash.mrbootcountcheck = 2 | |
#$poolhash.minerstart = $true | |
#&$ScriptBlock | |
#pause | |
$runspacepool = [RunSpaceFactory]::CreateRunspace() | |
$runspacepool.ApartmentState = "STA" | |
$runspacepool.ThreadOptions = "ReuseThread" | |
$runspacepool.Open() | |
$runspacepool.SessionStateProxy.setVariable("poolhash", $poolhash) | |
$pwshell = [powershell]::Create() | |
$pwshell.Runspace = $runspacepool | |
$results = $pwshell.AddScript($ScriptBlock).BeginInvoke() | |
$tmpblck = | |
{ | |
While (-Not $results.IsCompleted) | |
{ | |
Start-Sleep -Milliseconds 100 | |
} | |
$pwshell.EndInvoke($results) | |
$results | |
pause | |
pause | |
} | |
#&$tmpblck | |
MinersStart | |
pause | |
&$tmpblck | |
pause | |
$pwshell.EndInvoke($results) | |
$pwshell.Dispose() | |
$pwshells = $null | |
if ( $runspacepool ) { $runspacepool.Close()} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment