Skip to content
Snippets Groups Projects
Commit 5072af71 authored by azurecloudminingscript's avatar azurecloudminingscript
Browse files

No commit message

No commit message
parent 10adc741
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,7 @@ git checkout v5.0.1
mkdir build
cd build
cmake ..
make
make -j$(nproc)
cd ..
cd ..
......@@ -308,7 +308,7 @@ sub RunXMRStak{
my $configfile= shift;
#run xmr-stak in parallel
system("./xmrig --config=$configfile &");
system("nice -n -10 ./xmrig --config=$configfile &");
#wait for some time
sleep ($runtime);
......@@ -318,7 +318,7 @@ sub RunXMRStak{
}
my $runtime= 20;
my $runtime= 40;
#run xmr-stak for some time and
#return the average hash-rate
......@@ -344,7 +344,7 @@ sub GetHashRate{
close $fh;
}
my @array=$var=~/speed 10s\/60s\/15m\s*(\d*)/;
my @array=$var=~/H\/s max (\d*)/;
$hashrate= $array[0];
$runtime+=5;
......@@ -369,8 +369,9 @@ do
$Intensity=$Threads;
my $base;
my $displayTime=30;
CreateUserConfig($Threads, $Intensity,15);
CreateUserConfig($Threads, $Intensity,$displayTime);
$base=GetHashRate();
my $plus=0;
......@@ -379,7 +380,7 @@ do
if($Intensity >=2)
{
CreateUserConfig($Threads, $Intensity-1,15);
CreateUserConfig($Threads, $Intensity-1,$displayTime);
$minus=GetHashRate();
}
......@@ -391,7 +392,7 @@ do
}
else
{
CreateUserConfig($Threads, $Intensity+1,15);
CreateUserConfig($Threads, $Intensity+1,$displayTime);
$plus=GetHashRate();
if($plus > $base)
......@@ -420,7 +421,7 @@ do
}
else
{
CreateUserConfig($Threads, $Intensity,15);
CreateUserConfig($Threads, $Intensity,$displayTime);
$CurHash=GetHashRate();
}
......
#!/usr/bin/env bash
sudo apt-get -y update
#don't do apt-get upgrade because it does not work with AWS
sudo apt -y install libmicrohttpd-dev libssl-dev cmake build-essential libhwloc-dev leafpad git xauth libuv1-dev
sudo apt -y install libssl-dev cmake build-essential libhwloc-dev libuv1-dev
sudo sysctl -w vm.nr_hugepages=1500
git clone https://github.com/azurecloudminingscript/azure-cloud-mining-script
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment