-
-
Save piotr-dobrogost/e149def574c99e10cc17ea81a90cb4ff to your computer and use it in GitHub Desktop.
Set of scripts to manage ethereum miner ethminer.
This file contains 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
#!/bin/bash | |
export DISPLAY=:0 | |
sudo nvidia-smi -pl 108 | |
tmux \ | |
set-option -g remain-on-exit on \; \ | |
new-session -A -s ethminer "mining-oc && ethminer -SP 2 -U -S daggerhashimoto.eu.nicehash.com:3353 -O <address>:<miner>" \; \ | |
split-window "mining-stats" \; \ | |
select-layout even-horizontal \; \ | |
split-window "mining-watchdog" \; \ | |
split-window "/usr/bin/bash" |
This file contains 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
#!/bin/bash | |
export DISPLAY=:0 | |
nvidia-settings -a "GPUGraphicsClockOffset[3]=0" | |
nvidia-settings -a "GPUMemoryTransferRateOffset[3]=1400" | |
# nvidia-settings -a "GPUFanControlState=1" | |
# nvidia-settings -a "GPUTargetFanSpeed=70" |
This file contains 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
#!/bin/bash | |
watch -n60 -t -d "nvidia-smi --query-gpu=index,pci.bus_id,clocks.current.graphics,clocks.current.memory,temperature.gpu,fan.speed,power.draw,power.limit,utilization.gpu,uti | |
lization.memory,pstate --format=csv" |
This file contains 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
#!/bin/bash | |
file=/tmp/ethminer-powerdrop.txt | |
POWER_THRESHOLD=50 | |
DELAY=60 | |
# rm -f $file | |
while true | |
do | |
echo "Next health check in $DELAY seconds ..." | |
sleep $DELAY | |
power_draw=$(nvidia-smi --id=0 --query-gpu=power.draw --format=csv,noheader,nounits) | |
if (( $(echo "$power_draw < $POWER_THRESHOLD" | bc -l) )) | |
then | |
echo $(date), "Power dropped below threshold (${POWER_THRESHOLD} W)!", $power_draw W, "Restarting miner..." | tee -a $file | |
tmux respawn-pane -k -t ethminer:0.0 && echo "...miner restarted." | tee -a $file | |
else | |
echo $(date), $power_draw W | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment