Bitcoin Forum
May 24, 2024, 12:13:34 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: « 1 ... 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 [58]
1141  Bitcoin / Hardware / Re: [ANN] Introduction to DualMiner USB (could mine both BTC and LTC) on: March 11, 2014, 04:47:10 PM
Hi all,

The DualMiner site has instructions for configuring cgminer to autostart. I think that those instructions are geared towards logging in as a specific user and outputting cgminer to the screen automatically.

Since my rig is running completely headless, my needs are a bit different. I want cgminer to run at start up, have a rotating log for trouble shooting, and I want it relaunched when it crashes. So rather than follow the DualMiner instructions, I decided to use the awesome daemontools from D. J. Bernstein.

If anyone is interested in going this route, here are the steps that I took:

Install daemontools:

Code:
sudo apt-get install daemontools-run daemontools

Create the directories for the run and log scripts:

Code:
sudo mkdir /etc/service/cgminer
sudo mkdir /etc/service/cgminer/log

Put the following script in a file called "run" in the /etc/service/cgminer directory:

Code:
#!/bin/sh
# cgminer/run
# run script for cgminer daemon

# Minimal environment
PATH=/usr/local/bin:/usr/bin:/bin:/

# Redirect stderr to std out so that our log will pick it up
exec 2>&1
echo "*** Starting service cgminer..."

# Exec cgminer, which preserves the same process. Change the path and options as needed.
# Note that you have to run cgminer in text-only, non-terminal mode. I opted to force that
# option here rather than rely on it being set correctly in the conf file.
exec /usr/local/bin/cgminer --config /home/pi/config/cgminer.conf.ltc --text-only

Note that you may have to change the path to the cgminer executable and your conf file above.

If you want logging enabled, then you need to put this script in a file called "run" in the /etc/service/cgminer/log directory:

Code:
#!/bin/sh
# cgminer/log
# log script for cgminer daemon

# Minimal environment
PATH=/usr/local/bin:/usr/bin:/bin:/

# Define the path to the log folder
logFolder=/var/log/cgminer

# Make a folder fo the cgminer log files
mkdir -p ${logFolder}
chmod 755 ${logFolder}

# Set up multilog to handle logging the output from cgminer. It will rotate after 10 meg and
# keep five copies.
exec multilog s10485760 n5 ${logFolder}

The above script will put the log files in the /var/log/cgminer directory. The current log file will be called "current". The parameters to multilog above indicate that it should limit the log file size to 10 meg, and that it should keep the most recent 5 log files. This way old log data is deleted and you won't run out of disk space.

You have to also make sure that both scripts are executable:

Code:
sudo chmod 755 /etc/service/cgminer/log/run
sudo chmod 755 /etc/service/cgminer/run

If you've done everything right, then cgminer should be running. If you reboot, cgminer will be auto started. If cgminer crashes, then daemontools will restart it automatically.

You can use the following command to check on the status of cgminer running under daemontools:

Code:
sudo svstat /etc/service/cgminer

And you can see what's happening in the log with a tail command like this:

Code:
tail -500f /var/log/cgminer/current

If you need to stop cgminer, maybe because you want to change the config file or other maintenance, this command will stop the cgminer service:

Code:
sudo svc -d /etc/service/cgminer

This command will start the service back up again:

Code:
sudo svc -u /etc/service/cgminer

A couple of thoughts regarding logging. First, I'm not sure how safe it is to run a Rasperry Pi from an SD card with lots of log churn. I'm not an expert, but I'd be concerned that at some point lots of log writes might wear out the flash. Again, I must stress that I don't know if this is a real problem or one that I've imagined.

In any case, my system is generating around 4 meg of log data a day. Since my rig is new, I want to review this log data. But at some point if my system is stable, I might disable logging in order to conserve flash write cycles.

Second, when I first set up logging, I could not get it to work. Apparently there's an issue with daemontools where if you create the service "run" script first, then you create the "log/run" script, the daemontools service scanner doesn't see the change and does not enable logging.

To work around this, I rebooted my system after configuring logging. After that, logging worked like a charm. There's probably a more elegant way to work around this issue, but I didn't look into it further.

Lastly, if you're interested in more information regarding daemontools, here are some links that I used to get my feet wet:

http://lgallardo.com/en/2013/05/06/daemontools-o-como-relanzar-un-proceso-si-muere/
http://blog.teksol.info/pages/daemontools/tutorial
http://thedjbway.b0llix.net/daemontools/overview.html

Hopefully someone finds the above info helpful.

EDIT: I decided to leave logging on indefinitely. It's just too useful for debugging miner problems. So I did go ahead and install a package called ramlog that keeps the log files in ram, committing them to disk only on reboot. This should save on flash wear and tear. Instructions for installing ramlog follow here.

First, you need to figure out how big to make the ramlog partition.

So how big is my log folder now?

Code:
sudo du -sh /var/log
9.9M /var/log

How much of that is the miner log?

Code:
sudo du -sh /var/log/cgminer
5.9M /var/log/cgminer

So the regular log files amount to about 4M on my Pi. I've set the miner logging to only keep 3 copies and limit them to 10 meg. I think that means it can grow to 30 meg (including the "current" log).

How much ram do I have left?

Code:
free -m

             total       used       free     shared    buffers     cached
Mem:           437        180        256          0         15         82

But I've seen it a lot lower (like 160M).

So I think 50 meg for the ramlog is probably enough and won't impact the system too bad. Once I knew how big to make my ramlog mount point, I followed these ramlog installation instructions:

https://raw.github.com/swirepe/personalscripts/master/pi/setup-ramlog.sh

In case the above URL goes away, here's the steps I took:

Code:
sudo apt-get install lsof
mkdir ~/packages
cd ~/packages/
wget https://raw.github.com/swirepe/personalscripts/master/pi/ramlog_2.0.0_all.deb
sudo dpkg -i ramlog_2.0.0_all.deb

echo "TMPFS_RAMFS_SIZE=50m" | sudo tee /etc/default/ramlog

sudo reboot

So now all log files are written to a RAM disk based mount point and have no ongoing impact on the flash. When the system is rebooted, the log files are committed to flash, and then read out on the other side, so they aren't lost. But that's a lot less wear and tear than continuously writing log file data.
1142  Bitcoin / Hardware / Re: [ANN] Introduction to DualMiner USB (could mine both BTC and LTC) on: March 11, 2014, 04:40:55 PM
I would remove the -pll 850 parameter. I am getting appropriate hashrate without using the -dualminer-pll parameter, and I have noticed instability when using this parameter on previous versions of cgminer. Regarding your invalid nonce error, I get those too occasionally, though you should see less once you drop your pll parameter.  Are you mining over a wifi connection? This would be the next thing I investigate if removing the non-necessary parameters doesn't help and you are using 9 DMs per p10-u2.

My rig is on a direct Ethernet connection, not Wifi. I'll take the parameter out and keep any eye on the logs.

Thanks CruzCoins!
1143  Bitcoin / Hardware / Re: [ANN] Introduction to DualMiner USB (could mine both BTC and LTC) on: March 11, 2014, 03:02:27 PM
The price is not so good, if these were $30 then OK, but at $100 plus duty, vat and shipping it is not really viable. You can get gridseeds at around £140 or $200 each and they are 5 times faster......

Other people have made similar points. But when I looked at the 5 chip GridSeeds, I found it hard to get a bead on total system cost. With the 5 chip units, you need support hardware (power supply, controller, etc.). And I've never seen the 5 chip units for $200. Maybe I'm just not looking in the right places.

With DualMiners, all you need is a decent powered hub and a computer to drive them. I already had the Raspberry Pi.

It would be interesting if someone did a breakdown of system costs, rather than just comparing the units themselves. Unfortunately I don't understand how to pull together a 5 chip GridSeed system, so I can't do that comparison.

I suspect there would still be a premium for DualMiners, but it might still be worth it given how simple they are to set up and manage.
1144  Bitcoin / Hardware / Re: [ANN] Introduction to DualMiner USB (could mine both BTC and LTC) on: March 11, 2014, 02:52:42 PM
Guess power problem, volt drop amp drop

I'm using the recommended Orico P10 U2 USB hubs, with only 9 DualMiners per hub (as per CruzCoin's suggestions). Shouldn't they be fine? Also, the whole rig is plugged into a UPS.

Note that I also have a couple of Arctic Breeze Mobile USB-Powered 92mm fans. One is plugged into the main hub (which only has two DualMiners) and the other is plugged into my third hub (which has 9 DualMiners).

Maybe I should plug the fans into a dedicated hub?

Note that I plan to move the rig to a server closet which is temperature controlled. At that point I can probably lose the fans.
1145  Bitcoin / Hardware / Re: [ANN] Introduction to DualMiner USB (could mine both BTC and LTC) on: March 11, 2014, 02:09:07 PM
After running 20 DualMiner 2 units for about 12 hours, I've seen a total of 46 hardware errors as reported by mineninja. The errors are roughly distributed across the units. Only one of them had no errors.

Is this a normal error rate?

Note that I've got fans blowing over the units so I doubt this is a heat problem.

When I grep'd the log, the errors are all like the following example:

Code:
 [2014-03-10 19:17:25] DM11: invalid nonce - HW error

Note that when I count the error lines from the grep of the log, it shows twice as many hardware errors as reported by mineninja. Maybe cwminer double outputs the errors? I'm not clear which error total is more accurate.

In case it's relevant, I am running with the following command line because I wanted to try to increase the hash rate: --dualminer-pll 850

Should I stop using that frequency option? I don't see an appreciable increase in hash rate anyway. I'm seeing an average of around 66.5 KHs across the units currently.
1146  Bitcoin / Hardware / Re: [ANN] Introduction to DualMiner USB (could mine both BTC and LTC) on: March 09, 2014, 07:32:48 PM
Hi all,

I've been configuring my Raspberry Pi this weekend in anticipation of receiving my DualMiners on Monday. The instructions are really good, but I did run into a few bumps that I thought I'd let people know about.

First, I found that the "configure" script did not have execute permissions. The current instructions show setting execute permissions for the autogen.sh script, but you also have to do it for the configure script as well. It's kind of strange that these don't have the correct permissions in the git repository. That should probably be fixed to reduce friction for new users while setting up.

Second, after building cgminer from the git sources, I kept getting a "Unexpected extra commandline arguments" when calling the binary with a config file. At first I thought that the config file might have a problem in it, but after trial and error I found that there was nothing wrong with it.

It turns out that I the real problem was that cgminer was not happy unless I set the current directory to be the "bin" folder where it was installed. If I cd'd to the installed bin folder, it worked with the same config.

That's when I remembered that the build instructions indicated that the "configure" command should have a --prefix option, overriding the usual install location to sub folders in the source tree. I thought that was odd at the time, and different than the usual "configure/make/sudo make install" pattern, but I followed along anyway.

CruzCoins, did you specify the prefix folder for a reason? Maybe you're a developer and you need to manage multiple versions of cgminer? That would explain the need to control where it gets installed.

I think for an average user like me, who is only going to need a single copy of cgminer running on a dedicated Raspberry Pi that will only talk to DualMiners, it makes more sense to configure the sources to install in the usual "/usr/local" locations, which means leaving off the --prefix option.

Here's the steps that I used to build, with the above changes:

Code:
git clone git://github.com/dualminer/dualminer-cgminer.git cgminer
cd cgminer
sudo chmod +x autogen.sh
sudo chmod +x configure
./autogen.sh
./configure --enable-dualminer --enable-scrypt --disable-opencl
make
sudo make install

Note that the "sudo" for the "make install" is required and normal because it will install the binary and libraries in the root owned /usr/local.

Once built and installed, you should be able to call cgminer from any directory, assuming that /usr/local/bin is on your path. I'm not a Raspberry Pi expert, but I think that this is included in your path by default. At least it was on my system.

Third, while setting up mineninja using the instructions from the DualMiner support website, I noticed that in several cases the HTML instructions had curly quotes. I think that if you copy these directly from the website, they probably won't work when pasted to your command line. So I replaced the curly quotes with regular ones before using any copied commands.

In particular, here's the mysql line granting privileges to the "anubis" user with non-curly quotes:

Code:
GRANT ALL PRIVILEGES ON anubis.* TO 'anubis'@'localhost' IDENTIFIED BY 'your password here my passwd is root';

If use of curly quotes is a real problem, and not just imagined by me, then maybe the site author could consider straightening the quotes so that other people won't have problems copying the commands.

Lastly, once I got mineninja running I used it to change the config. But when the web app saved the config file, it nuked the custom config settings that I had manually placed via text editor. I guess it did a complete replace of the config file rather than reading the existing config and extending it.

I assume that this is a mineninja "feature" and nothing to do with DualMiner or their port of the web app. I have to admit that I know next to nothing about mineninja at this point.

I just mention it here in case anyone tries using this mineninja and have manually edited their config (perhaps to set the --dualminer-pll option to your desired frequency, which I suspect is a pretty common thing to do). Instead, you'll probably have to pass this on the command line in the script you use to launch cgminer and keep it out of the config file.

That's about all that I ran into so far. Most of the issues are just nits anyway. I'm pretty impressed as to how easy this setup has been.

Looking forward to receiving my DualMiners so that I can get started doing some actual mining ;-)
1147  Bitcoin / Hardware / Re: [ANN] Introduction to DualMiner USB (could mine both BTC and LTC) on: March 08, 2014, 06:34:45 PM
So whats the news with this web monitor you are working on dualminer?  https://github.com/dualminer/dualminer-mineninja  If I figure it out I will post how it works and the steps I took to get it working.  I would assume that dualminer is working on a guide to get this monitor working w/ the USB sticks.

I'm interested in this too. I was just researching this morning looking for a monitoring/web front end solution.

Ah. There is set up info for their flavor of mineninja on the DualMiner site under "Raspberry Pi User Guide" support page. Looks interesting.

1148  Bitcoin / Hardware / Re: [ANN] Introduction to DualMiner USB (could mine both BTC and LTC) on: March 08, 2014, 06:27:21 PM
So whats the news with this web monitor you are working on dualminer?  https://github.com/dualminer/dualminer-mineninja  If I figure it out I will post how it works and the steps I took to get it working.  I would assume that dualminer is working on a guide to get this monitor working w/ the USB sticks.

I'm interested in this too. I was just researching this morning looking for a monitoring/web front end solution.
1149  Bitcoin / Hardware / Re: [ANN] Introduction to DualMiner USB (could mine both BTC and LTC) on: March 06, 2014, 03:42:06 PM
Per our customers' requests and comments, we will release our 2nd product DualMiner USB 2 very soon. DM 2 is designed specifically for scrypt altcoin mining. We can give our customer better pricing (compared to the DualMiner USB) because of the simplified design and testing efforts. Please go to the 1st page of this thread for more detailed product introduction. Thank you all for your support and interest

That's great news! I'd be very interested in a cheaper scrypt only model. Can you give us an ETA that you're targeting?

Also, will you be building any more of the current DualMiner USB model? As others have pointed out, your site indicates that you're sold out. I'd be willing to buy some now if you had them. I'm on your waiting list already.

Thanks in advance for your answers, and keep up the good work.
1150  Bitcoin / Hardware / Re: [ANN] Introduction to DualMiner USB (could mine both BTC and LTC) on: March 04, 2014, 02:53:12 PM
I'm interested in building a mining rig with a Raspberry Pi and 10 (to start with) DualMiners to mine Litecoin. The guides on this thread are great. It looks like such a rig will be compact, scalable, greener (compared to GPUs) and easier to pull together and manage than other approaches.

Sure it will have a longer ROI than a more traditional GPU design, but I'm betting on the currency increasing in value (as we all are), and I want to have more fun than just currency speculation.

My best deployment options are to put the rig in a server closet or colo rack. So power and cooling are not a problem. Stability is my main concern.

Since I'd be running the rig headless in a different physical location, it's important that I not need to fiddle with the miners once they're up and running. Note that I'll have VPN access to the Raspberry Pi. And if need be, I can plug the USB hubs into a managed UPS that would allow me to power cycle them remotely.

Can anyone with a similar rig comment on stability? How often do you need physical access to your rig, and why?

Thanks in advance.
Pages: « 1 ... 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 [58]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!