Skip to content

SMOS Install

MaynardMiner edited this page Aug 21, 2020 · 28 revisions

SWARM on SMOS

A Note On SMOS

I have no known users that is currently using SMOS, so I don't maintain it. When I last checked- Everything appeared to be working. If you have issues, please post issue in issue section, and I will look at any/all compatibility issues. I only maintain what I know is being used.

Installing SWARM On Simple Miner OS:

SWARM should work on any operating system. However, due to the nature of how simple mining OS works, and how it start/runs miners- I developed 'alternative' scripts that will allow SWARM to integrate with SMOS. SWARM 'modifies' small pieces of the SMOS codebase, which does the following:

1.) Starts an instance of pwsh in order to start the script.

2.) Deliberately 'skips' over removing temp miner dir, and downloading miner again. SWARM handles this internally.

3.) modifies config.json sent by simplemining.net to set the miner path to /root/SWARM/startup.ps1.

4.) /root/swarm_mode.txt is generated. When the contents of file is "Yes", SWARM is on. "No", SWARM is off.

5.) xminer.sh is changed to xminer_old.sh, and a modified script is injected. xminer_old reverts back to xminer.sh when SWARM is off. sudo set_swarm off

Notes on SWARM runtime:

  • SWARM commands are all root commands, and therefor require root privileges.
  • Example: get stats should be ran as sudo get stats.
  • SWARM's main screen is assigned ownership by miner, as SMOS normally operates.
  • SWARM's other screens, such as mining screens, background agent, and oc are owned by root. This is due to ssh requirements and the ability to run commands through ssh.
  • Running sudo screen -ls allows you to see active screen from SWARM. sudo screen -r [name] attaches them.

Running SWARM on SMOS is fairly easy- Here is step-by-step command to do so:

Remove Previous Versions:

### Remove Previous Versions:
sudo rm -rf /root/SWARM

Get SWARM from repository:

### Clone from repository:
cd /root
sudo git clone https://github.com/maynardminer/SWARM.git

**Note: SWARM MUST be cloned in /root dir.

Run Installer

### Run installer:
cd SWARM
sudo ./install.sh

SWARM is now installed on OS. Commands can be ran, and accepted, however SWARM itself will not start- It must be activated.

USING SWARM:

Activating SWARM

SWARM can be turned on and off. Turning on SWARM, and the selected miner will be ignored, and SWARM will be ran instead- Using the supplied arguments/config from SMOS. While SWARM is activated: NO OTHER MINER will work! You must deactivate SWARM in order to use other miners again!

Turning SWARM ON:

### Activate SWARM
sudo set_swarm on

When the rig is restarted- SWARM will start instead of any other miner.

Turning SWARM OFF:

The process is identical-

### Deactivate SWARM
sudo set_swarm off

When the rig is restarted- SWARM will no longer work / run. You must set it back on to use again.

SimpleMining.net

Group Config

SWARM is setup just like you would any other miner. The only difference is that the miner does not matter. You can use any miner, the only thing that is important is setting the arguments. Here is a photo as example:

alt text

To see full size:

Full-Sized

Why does everything run in root?

I have had many people ask my why SWARM must operate in root. There are features such as -SWARM_MODE that will synchronize time with other users. Also, SWARM has the ability to control OC, and record GPU information, which may require root privileges. SWARM also creates symlinks, exports libraries, and does other things that may require elevated privileges.

The most important reason, is that SWARM generates scripts for each machine it is working on, and does it on demand. This allows users to test settings, and run miners independently of SWARM with SWARM settings to trouble shoot issues.

SWARM is meant to work with as many OS's possible, and the easiest way to do this is to simply design it to operate with root privileges. The codebase is transparent, and open sourced- No hacks or viruses.

Helpful Resources: