Pages:
Author

Topic: [ANN] Introduction to DualMiner USB (could mine both BTC and LTC) - page 9. (Read 114631 times)

legendary
Activity: 1150
Merit: 1004
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.
legendary
Activity: 1150
Merit: 1004
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!
newbie
Activity: 41
Merit: 0
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.

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.
sr. member
Activity: 336
Merit: 250
Hello Dualminer, just sent you a PM. Thanks.
legendary
Activity: 1150
Merit: 1004
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.
legendary
Activity: 1150
Merit: 1004
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.
full member
Activity: 183
Merit: 100
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......

imho

J
legendary
Activity: 1890
Merit: 1031
Guess power problem, volt drop amp drop
legendary
Activity: 1150
Merit: 1004
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.
newbie
Activity: 7
Merit: 0
Hi, edonkey
     
    The Pi Guide has updated according to your feedback. Thank you so much.
       
      http://support.dualminer.com/raspberry-pi-user-guide/
   
    BTW: The BeagleBone Black User Guide released.

      http://support.dualminer.com/beagleboard-black-user-guide/
legendary
Activity: 1150
Merit: 1004
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 ;-)
full member
Activity: 178
Merit: 100
Ok.  I want one.  I have neither Paypal nor LTC/BTC.  :/
legendary
Activity: 1150
Merit: 1004
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.

legendary
Activity: 1150
Merit: 1004
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.
full member
Activity: 134
Merit: 100
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.
newbie
Activity: 41
Merit: 0
I like the new offering for your DualMiner 2 ASIC but can you tell me when you intend to create a mining app to run this ASIC on my Mac?

Also when I see a new revision no in the name,I usually expect higher performance or reduced energy use if hashrate is the same.Is it even possible to increase the scrypt hashrate of the DualMiner or would running off a USB port prove too difficult (as there's not much of a power envelope)?

I'm just curious to know.Thanks Smiley

I believe these questions have already been answered: someone has compiled a version for Mac from git which should work on both sticks. This can be found with search. Regarding running more gc3355's per USB slot:

Is it possible to put 2 chips on 1 usb?

140KH/s @ 3 watts?

Making a 2-chip USB miner is not difficult at all, but the tricky part is how do you provide the power required by this miner? Our DM miners was designed using BUS power scheme, which means the miner is powered from USB2.0 bus (or USB2.0 cable). Now, the USB2.0 specification only provides up to 2.5W (or 500ma current at 5V) power to one USB device, so that will put 2-chip USB miner out of the power supply range of USB2.0 bus.
This was found on the thread one page back..
legendary
Activity: 1022
Merit: 1000
Freelance videographer
I like the new offering for your DualMiner 2 ASIC but can you tell me when you intend to create a mining app to run this ASIC on my Mac?

Also when I see a new revision no in the name,I usually expect higher performance or reduced energy use if hashrate is the same.Is it even possible to increase the scrypt hashrate of the DualMiner or would running off a USB port prove too difficult (as there's not much of a power envelope)?

I'm just curious to know.Thanks Smiley
legendary
Activity: 1050
Merit: 1001


Wow thanks for this, was able to get cgminer for my dualminers and my gridseed 5 chip pod

although I have to run the gridseed's cgminer before the dualminer's cgminer otherwise the gridseed isn't recognized saying the chips are already in use

oh well.. minor inconvenience !
member
Activity: 94
Merit: 10
Will there be different shipping options in the future? 16 bucks for 1 unit is steep here in the states.
member
Activity: 112
Merit: 10
To anyone who is interested in purchasing our DM or DM2, we have re-stocked both DM and DM2 products in our on-line store www.dualminer.com, so you could place order again. Thank you for your business.
Do you ship to Brazil?

They do.
120 USD via UPS...  Embarrassed
Pages:
Jump to: