Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/pmalek/ethminer_watchdog

Run a watchdog on top of ethminer
https://github.com/pmalek/ethminer_watchdog

ethereum ethminer linux mining

Last synced: about 2 months ago
JSON representation

Run a watchdog on top of ethminer

Awesome Lists containing this project

README

        

# ethminer_watchdog

Run a watchdog on top of [`ethminer`](https://github.com/ethereum-mining/ethminer/)

![Screenshot](/docs/screenshot.png)

## What is this?

For a long time I was experimenting with some kind of a watchdog that would
restart my miners during internet outages, connection timeouts etc.
After some time I've ended up with this script has worked well for me now for
couple of months already.

## How to run

### From the terminal

```
./ethminer_watchdog.sh
```

Required environment variables to set:

- `ETHMINER` - path to ethminer binary; default: `ethminer`
- `ETHMINER_POOL_URL` - pool URL to use

### As a `systemd` service

In order to run ethminer_watchdog as a `systemd` service you can use the following systemd unit file:

```systemd
[Unit]
Description=Ethminer systemd unit

[Service]
Type=simple
ExecStart=
User=
Environment=FAN_SPEED=66
Environment=POWER_LIMIT=95
Environment=ETHMINER=
Environment=ETHMINER_POOL_URL=

RestartSec=10
Restart=on-failure

ProtectSystem=strict
ProtectHome=read-only
PrivateTmp=true
TasksMax=16

[Install]
WantedBy=default.target
```

You can run it as a `system` service by placing the above snippet in e.g. `/etc/systemd/system/ethminer.service`, reloading the `systemd` daemon:

```shell
sudo systemctl daemon-reload
```

and simply starting the service:

```shell
sudo systemctl start ethminer.service
```

Logs are available via `journalctl`:

```
journalctl --unit=ethminer.service --follow --lines 100
```

## Limitations

- For now it runs only on Linux with `gdm` as display manager
(mostly because of `nvidia-settings` behavior)