TECH: Running multiple instances of cgminer on Linux

water droplets

One may have software, hardware or configuration issues which require multiple instances of cgminer to share the USB bus.

First, discover the addresses of your USB devices

In this example, the user is running one cgminer 3.8.5 instance to handle antminer, while a more modern 3.10.0 handles the older style block eruptor ASICs.


$ lsusb | egrep -i CP210x
Bus 001 Device 006: ID x:x Cygnal Integrated Products.. CP210x UART Bridge ..
Bus 001 Device 004: ID x:x Cygnal Integrated Products.. CP210x UART Bridge ..
Bus 001 Device 008: ID x:x Cygnal Integrated Products.. CP210x UART Bridge ..
Bus 001 Device 007: ID x:x Cygnal Integrated Products.. CP210x UART Bridge ..

On this machine we have 4 USB devices connected at ports; antminer on 1:4, 1:6 and the others using 1:7, 1:8 .

Here our devices report the same generic ‘CP210x..’ vendor string. Pull the miners one by one to determine the mapping between physical devices and bus id #’s .

Next, configure cgminer

For each pair of devices we create a shell script:

block erupters

#!/bin/sh
## version 3.10.0
/usr/local/bitcoin/bin/cgminer \
--usb 1:4,1:6 \
-u username \
-p XXX \
-o stratum+tcp://miningpool.example.org:3333

antminer

#!/bin/sh
## version 3.8.5
/usr/local/bin/cgminer \
--usb 1:7,1:8 \
-u username \
-p XXX \
-o stratum+tcp://miningpool.example.org:3333

Leave a Reply

Your email address will not be published. Required fields are marked *