Run a watchdog on top of ethminer
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.
./ethminer_watchdog.sh
Required environment variables to set:
ETHMINER- path to ethminer binary; default:ethminerETHMINER_POOL_URL- pool URL to use
In order to run ethminer_watchdog as a systemd service you can use the following systemd unit file:
[Unit]
Description=Ethminer systemd unit
[Service]
Type=simple
ExecStart=<path_to_ethminer_watchdog.sh>
User=<your_username>
Environment=FAN_SPEED=66
Environment=POWER_LIMIT=95
Environment=ETHMINER=<path_to_ethminer>
Environment=ETHMINER_POOL_URL=<your_miners_address>
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:
sudo systemctl daemon-reloadand simply starting the service:
sudo systemctl start ethminer.serviceLogs are available via journalctl:
journalctl --unit=ethminer.service --follow --lines 100
- For now it runs only on Linux with
gdmas display manager (mostly because ofnvidia-settingsbehavior)
