Artix Linux Forum

Artix Linux => Applications & Software => Topic started by: jadep on 12 September 2024, 21:26:27

Title: Artix mining tips and tricks
Post by: jadep on 12 September 2024, 21:26:27
If you are considering trying cpu mining, for example, monero on xmrig, here's some tips.  Artix works perfectly fine.

1.  You generally want to run "headless", just using a loaner monitor and keyboard for easy set up.  Then you disconnect them.

2.  Add "openssh" and "screen" packages.

Code: [Select]
pacman -S screen openssh openssh-openrc

3.  Install xmrig and generate the config.json file.  Plenty of documentation and all you need at https://xmrig.com (https://xmrig.com).  You can try a binary or build it from source.  Xmrig has a nice wizard to generate the config file at https://xmrig.com/wizard (https://xmrig.com/wizard)

4.  Add ssh to the openrc default level so it starts on boot up:

Code: [Select]
rc-update add sshd default

Go ahead and start it now:

Code: [Select]
rc-service sshd start

A good way to troubleshoot is to make sure you have the openrc script:

Code: [Select]
 rc-update show -v

5.  Shutoff and disconnect the monitor and keyboard.  Don't shutdown the miner.

6.  From you computer, open a terminal and ssh to your miner and "su":
Code: [Select]
ssh [email protected]  #use correct IP address
su
"actual root password"

7.  Create new screen session.  Note the first time it prints some messages you can ignore:
Code: [Select]
screen -S miner
8.  At this point you get a blank terminal.  You are now in a screen session.  Start xmrig

Code: [Select]
xmrig -c /path-to-config/config.json

It should start displaying status messages and such.  Detach when you are sure it's up and running:

Code: [Select]
"ctrl-a", then "d"

9.  Verify that the session is still active:

Code: [Select]
screen -ls

It should be listed.

Close ssh session

Code: [Select]
exit
exit
exit  # (if you want to close the terminal on your computer)

Other:

Shutdown xmrig but keep miner running:

Code: [Select]
ssh to monitor as before and "su" as before
screen -r miner  #reattach to session
#(You should see the miner displaying status messages)
"ctrl-c"
#If you want to kill the screen session, type "exit".  If you want to keep it:
"ctrl-a" then "d"
exit
exit

Stop the mining, and power off the miner:

Repeat stopping xmrig, and detach.  Then
Code: [Select]
openrc-shutdown -p 1 #(Miners run hot, so I give it a minute to cool down)

Check on the miner

ssh to miner and "su" as before.

Code: [Select]
screen -r miner
"ctrl-a" and "d" #when you are done
screen -ls  #make sure the session is still active
exit
exit


Title: Re: Artix mining tips and tricks
Post by: corysanin on 13 September 2024, 00:44:18
Added xmrig to world.