Mining Zettel on linux daemon under Windows Subsystem for Linux - Guide for Windows 10

:pick: Tutorials and Benchmarks about CPU mining Zettel
Post Reply

User avatar
mst100
Posts: 78
Joined: Mon Jun 11, 2018 1:32 pm

Re: Mining Zettel on linux daemon under Windows Subsystem for Linux - Guide for Windows 10

Post by mst100 » Fri Mar 29, 2019 3:42 pm

scripts that solves WSL crashing, created by Freaky_Angelus [CPUMiners.Club]#0217

Auto.sh script

Code: Select all

echo ""
echo "INSERT_SU_PWD" | sudo -S ./zettelkasten/zettelkastend
sleep 10s
echo ""
echo "____________________________________________"
echo ""
./zettelkasten/zettelkastend setgenerate true (ALTER THREADS)
sleep 10s

date +"%a %b %e %H:%M:%S - ZTTL started"
echo ""
echo "$(echo "Balance            :    ")" "$(echo "scale=0;($(./zettelkasten/zettelkastend getbalance)/1)" | bc)"
echo "$(echo "Local Hashrate    (kHs)    :    ")" "$(echo "scale=0;($(./zettelkasten/zettelkastend gethashespersec)/1000)" | bc)"
echo "$(echo "ZTTL Network    (MHs)    :    ")" "$(echo "scale=1;($(./zettelkasten/zettelkastend getnetworkhashps)/1000000)" | bc)"
echo "____________________________________________"

while true; do

re='^[0-9]+([.][0-9]+)?$'
read -t 3600 -N 1 input

if [[ $input = "q" ]] || [[ $input = "Q" ]]; then
echo ""
echo "INSERT_SU_PWD" | sudo -S killall -9 zettelkastend
sleep 1s
break

elif ! [[ $(./zettelkasten/zettelkastend getbalance) =~ $re ]] ; then
echo "INSERT_SU_PWD" | sudo -S killall -9 zettelkastend
sleep 1s
echo "Error: ZTTL Deamon crashed"
exit

else
echo ""
date +"%a %b %e %H:%M:%S - ZTTL"
echo ""
echo "$(echo "Balance                   :       ")" "$(echo "scale=0;($(./zettelkasten/zettelkastend getbalance)/1)" | bc)"
echo "$(echo "Local Hashrate    (kHs)   :       ")" "$(echo "scale=0;($(./zettelkasten/zettelkastend gethashespersec)/1000)" | bc)"
echo "$(echo "ZTTL Network      (MHs)   :       ")" "$(echo "scale=1;($(./zettelkasten/zettelkastend getnetworkhashps)/1000000)" | bc)"
echo "____________________________________________"
fi
done

WSL.bat

Code: Select all

:Miner
WSL-automining.lnk
wmic process where name='bash.exe' delete
wmic process where name='bash' delete
wmic process where name='init' delete
CHOICE /T 10 /C yYcC /CS /D y  /M "Press y to continue, c to cancel. You have 10 sec delay [Default y]:"
IF %ERRORLEVEL% EQU 1 goto Miner
IF %ERRORLEVEL% EQU 2 goto Miner
IF %ERRORLEVEL% EQU 3 goto EoF
IF %ERRORLEVEL% EQU 4 goto EoF
:EoF

WSL-automining.lnk
Set the link to the program as follows:

Code: Select all

C:\Windows\System32\bash.exe -c "cd && ~/Auto.sh"
for more info and help contact :arrow: Freaky_Angelus [CPUMiners.Club]#0217 on discord
ZcvzPTJrde6CTuJENp1ezyti9ji6s4qgGT

Post Reply