Skip to content

pmalek/ethminer_watchdog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ethminer_watchdog

Run a watchdog on top of ethminer

Screenshot

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:

[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-reload

and simply starting the service:

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)

About

Run a watchdog on top of ethminer

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published