- Apr 27, 2000
- 21,813
- 11,168
- 136
Hi! I am having problems automating my Ethereum mining process on Linux. Here's what I do manually:
1). Log in automatically (no password required at boot; yes, poor security I know)
2). Run a script (./setclocks.sh) in my home directory to configure clockspeeds for all the GPUs on the machine (there are four).
3). Open four terminal windows via LXTerminal (open home directory, hit f4 four times).
4). Send two terminal windows to Desktop 2 (optional, but it looks better this way)
5). Set all four terminals to root via sudo su - root. I enter the password by hand when prompted.
6). Activate ethminer once in each terminal, once for each card, with a line like:
. . . and that's pretty much it.
Automating this process has been damn near impossible. I've been using .profile to start everything, which works, and I have discovered that if I use sleep to delay activation of scripts by a minute or two, the desktop environment will load fully before the mining process begins (if I do not do this, sometimes the desktop will not load at all). I have placed the process of initiating a single card via ethminer in a script and then executing those scripts in individual terminal windows via xterm -e command, and I have also discovered that if I put & at the end of a command (in this case, opening the terminal) that the script won't "hang up" on one miner and will go ahead and execute everything else in the script.
I have been having two main problems: one, the terminals often appear and then nothing happens inside them (that I can tell) and two, using
does not work anywhere near as well as I would like inside a newly-spawned terminal window. sudo -S seems to be having problems getting input from stdin when I do things like that. I have sort-of bypassed that problem by using sudo to execute the main script, which does work via sudo -S most of the time.
So right now, my scripts just produce four blank terminal windows in which nothing happens. On those rare occasions when I can put things together the right way and get commands to execute in the terminal windows, sometimes I get problems from the system acting as if the proper environment variables haven't been set (for mining with 2g cards; one of mine is an old Pitcairn) despite setting these variables in .profile for both my main login AND root and setting them again in the scripts that are meant to run when the terminal window is first opened.
I recognize that it would be easier to automate the process if I would just log in as root and then use -t 4 instead of spawning four different instances of the miner. But there are some major advantages to running the cards independently, and I am wary of flat-out logging in as root.
1). Log in automatically (no password required at boot; yes, poor security I know)
2). Run a script (./setclocks.sh) in my home directory to configure clockspeeds for all the GPUs on the machine (there are four).
3). Open four terminal windows via LXTerminal (open home directory, hit f4 four times).
4). Send two terminal windows to Desktop 2 (optional, but it looks better this way)
5). Set all four terminals to root via sudo su - root. I enter the password by hand when prompted.
6). Activate ethminer once in each terminal, once for each card, with a line like:
Code:
ethminer -F http://us-east1.nanopool.org:8888/0xaddress/machinename -G --cl-local-work 256 --cl-global-work 16384 --opencl-device 1 --farm-recheck 100
. . . and that's pretty much it.
Automating this process has been damn near impossible. I've been using .profile to start everything, which works, and I have discovered that if I use sleep to delay activation of scripts by a minute or two, the desktop environment will load fully before the mining process begins (if I do not do this, sometimes the desktop will not load at all). I have placed the process of initiating a single card via ethminer in a script and then executing those scripts in individual terminal windows via xterm -e command, and I have also discovered that if I put & at the end of a command (in this case, opening the terminal) that the script won't "hang up" on one miner and will go ahead and execute everything else in the script.
I have been having two main problems: one, the terminals often appear and then nothing happens inside them (that I can tell) and two, using
Code:
echo password | sudo -S su - root
does not work anywhere near as well as I would like inside a newly-spawned terminal window. sudo -S seems to be having problems getting input from stdin when I do things like that. I have sort-of bypassed that problem by using sudo to execute the main script, which does work via sudo -S most of the time.
So right now, my scripts just produce four blank terminal windows in which nothing happens. On those rare occasions when I can put things together the right way and get commands to execute in the terminal windows, sometimes I get problems from the system acting as if the proper environment variables haven't been set (for mining with 2g cards; one of mine is an old Pitcairn) despite setting these variables in .profile for both my main login AND root and setting them again in the scripts that are meant to run when the terminal window is first opened.
I recognize that it would be easier to automate the process if I would just log in as root and then use -t 4 instead of spawning four different instances of the miner. But there are some major advantages to running the cards independently, and I am wary of flat-out logging in as root.