PLEASE NOTE: This is probably not the best way of doing the thing but it is ONE way of doing it, which has been working for me. If you have a better way please let me know 🙂
if you log into your miner via ssh and look in /etc/init.d/ you should see the script file which runs the mining dameon/program.
On the s9 it’s called bmminer.sh and on the L3+ it’s cgminer.sh. I guess it’ll be similar on other miners. If you have a different miner and want to find out what script to look for just do “top” at the ssh console and see what processes are hogging the most resources. On the S9 it’s a process called bmminer, and in the /etc/init.d/ folder there’s bmminer.sh to run the service.