Title: Need CGMiner Help please (how to automate it) Post by: biddicoin on September 06, 2012, 11:32:59 PM Hello,
I'm new to linux and have a Ubuntu 12.04. now + CGminer. Everything fine, but I would like to automate the whole thing. That means: - autostart CGminer at system startup - CGminer start with own preset , so I don't have to configure again How can I do this? I use CGminer 2.7.5 - and I've seen the "example.conf" - but I don't find/know the place where the actual .conf file is located and I don't know how to autostart the whole thing. Looking for help ;) Thank you Title: Re: Need CGMiner Help please (how to automate it) Post by: crazyates on September 07, 2012, 03:40:15 AM Hello, I'm new to linux and have a Ubuntu 12.04. now + CGminer. Everything fine, but I would like to automate the whole thing. That means: - autostart CGminer at system startup - CGminer start with own preset , so I don't have to configure again How can I do this? I use CGminer 2.7.5 - and I've seen the "example.conf" - but I don't find/know the place where the actual .conf file is located and I don't know how to autostart the whole thing. Looking for help ;) Thank you To get your config file, start CGMiner with all your settings, and press S and then W. This takes all your current settings and writes them to your config. Now when CGMiner starts up, it will use this config, no command line arguments needed! To start up in Linux, I'm less sure about. I always used rc-update, but that was on Gentoo. There are a number of different ways, but I don't know which is best. Title: Re: Need CGMiner Help please (how to automate it) Post by: salfter on September 07, 2012, 04:06:22 AM I knocked this script together today to autostart everything on my mining rig. It starts the X server, bitcoind, p2pool, and cgminer in sequence, waiting for bitcoind to start before starting p2pool and for p2pool to start before starting cgminer.
Code: #!/bin/bash I call this from a script in /etc/local.d that runs it as a normal user, so the local runscript fires it up. Most tasks get stuffed into screen sessions so you can check on them. You'll probably want to change the address to which p2pool is to be paid...though if you leave mine in there, I won't complain. :-) Title: Re: Need CGMiner Help please (how to automate it) Post by: biddicoin on September 07, 2012, 11:27:37 AM Thank you all!
@crazyates is this also true - not only for engine, memory, fan etc - but also for pool adress - username and password? (is it saved, too? so "./cgminer" is enough?) @salfter I don't know if I can understand how and where you edit this stuff... and I'm still guessing how I can autostart CGminer exactly with my account details etc... but I think I'll get it done) Title: Re: Need CGMiner Help please (how to automate it) Post by: salfter on September 07, 2012, 02:29:50 PM I don't know if I can understand how and where you edit this stuff... and I'm still guessing how I can autostart CGminer exactly with my account details etc... but I think I'll get it done) I use Gentoo, so I have /etc/local.d/miner.start call the script given above with this: Code: su - salfter -c /home/salfter/start-miner.sh With /etc/init.d/local set to run in the default runlevel, it fires up on boot. bitcoind and p2pool can take a minute and a half to get going if they were shut down recently; if it's been down a while, it can take longer than that while bitcoind catches up with the blockchain. I couldn't say what facility Ubuntu provides for running stuff at boot; I've never used it long enough to need to figure that out. A couple more things about my script:
Title: Re: Need CGMiner Help please (how to automate it) Post by: crazyates on September 07, 2012, 02:42:47 PM @crazyates is this also true - not only for engine, memory, fan etc - but also for pool adress - username and password? (is it saved, too? so "./cgminer" is enough?) Mostly yes, with one very important no. It writes all your settings for engine, memory, fan, voltages, kernel, vectors, worksize, temperatures, and most pool settings. You need to go into the config and manually add your pool passwords. You can also add more than one pool into the config file, and it uses them as backup. |