LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-20-2021, 06:34 PM   #1
mattdawolf
LQ Newbie
 
Registered: Aug 2018
Posts: 28

Rep: Reputation: Disabled
bash script to run miner when computer is idle, then kill when user activity starts again;


What would be a good way to write a script so

nice -n 10 /opt/ethminer/bin/ethminer -G -P stratum1+tcp://null:2020

rums when the computer is inactive and stops when there is user activity, never truly exiting so it can loop? Thanks.
 
Old 04-20-2021, 08:55 PM   #2
rnturn
Senior Member
 
Registered: Jan 2003
Location: Illinois (SW Chicago 'burbs)
Distribution: openSUSE, Raspbian, Slackware. Older: Coherent, MacOS, Red Hat, Big Iron IXs: AIX, Solaris, Tru64
Posts: 2,460

Rep: Reputation: 501Reputation: 501Reputation: 501Reputation: 501Reputation: 501Reputation: 501
Quote:
Originally Posted by mattdawolf View Post
What would be a good way to write a script so

nice -n 10 /opt/ethminer/bin/ethminer -G -P stratum1+tcp://null:2020

rums when the computer is inactive and stops when there is user activity, never truly exiting so it can loop? Thanks.
You could run it at a nice value of "19". The miner will only be allowed to run on the wheel when no other hamsters need it.

HTH...
 
Old 04-21-2021, 02:25 AM   #3
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 16,490

Rep: Reputation: 5532Reputation: 5532Reputation: 5532Reputation: 5532Reputation: 5532Reputation: 5532Reputation: 5532Reputation: 5532Reputation: 5532Reputation: 5532Reputation: 5532
yes, you do not need to write any script, just use the mentioned nice value. And the system will do the rest for you. This feature is already available.
 
Old 04-27-2021, 06:43 PM   #4
mattdawolf
LQ Newbie
 
Registered: Aug 2018
Posts: 28

Original Poster
Rep: Reputation: Disabled
setting ethminer to 19 didn't really seem to make performance any better. Probably my fault I have 1 GPU outputting to 4 4k screens.

I got timeout <command> to work while I'm in bed.
 
  


Reply

Tags
automation, gpu


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: uTorrent installs cryptocurrency miner on user computers LXer Syndicated Linux News 0 03-06-2015 01:42 PM
kernel panic attempted to kill the idle task! in idle task - not syncing dudutworld Linux - Newbie 2 09-16-2013 01:50 PM
Hello everyone. Long time data miner of LQ. drewpee LinuxQuestions.org Member Intro 1 11-17-2009 06:56 AM
Mandriva 2009 starts installation and then monitor starts rolling showing color lines HubertHickey Linux - Newbie 6 12-18-2008 12:24 AM
After almost twenty years, I've finally completed Manic Miner. davee General 5 09-09-2008 05:26 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration