Bitcoin Forum
June 23, 2024, 01:30:58 PM *
News: Voting for pizza day contest
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: [Resolved]Setup cgminer daemon on Pogoplug E02 USB ASIC ALARM  (Read 2283 times)
ThinkFast (OP)
Member
**
Offline Offline

Activity: 69
Merit: 10


View Profile
September 29, 2013, 02:42:18 AM
Last edit: October 01, 2013, 10:24:29 PM by ThinkFast
 #1

I'm trying to configure cgminer to run as service/daemon on ArchLinuxARM on my Pogoplug E02 with ASIC Block Erupters attached to it.
I just built the OS from the lastest release on 9/25/13. I followed the tutorial from Qui's techNOLOGY Blog. It was easy to follow and was written after the initd and systemd changes. All the other tuts I used were written prior to those changes and created many headaches.

Every guide I have seem is close, but not quite.
Ex: [Seach cgminer]                              [^^^^]
     [Seach cgminer]+[ASIC Block erupter] [^^^]
     [Seach cgminer]+[ASIC Block erupter]+Linux [^]
     [Seach cgminer]+[ASIC Block erupter]+Linux+Pogoplug []

In my first attempt, I followed two guides,
Project: CGMiner 3.4.0 with USB Block Erupters on a 5W pogoplug mobilehttps://bitcointalk.org/index.php?topic=285028.0 and
Tutorials:Raspberry Pi Mining with Arch Linuxhttps://forums.butterflylabs.com/showwiki.php?title=Tutorials:Raspberry+Pi+Mining+with+Arch+Linux which made it confusing.

I have setup the following configuration with three files:
[root@pogoplug01 cgminer-3.4.3]# cat /home/Bitcoin/cgminer/cgminer-3.4.3/cgminer.conf
Code:
{
"pools" : [
        {
                 "url" : "http://pool-us.50btc.com:8332",
                "user" : "xxx@xxx.com_xxx",
                "pass" : "xxxxxxxxxxxxxxxxx"
        }
]
,
       "api-listen" : true,
       "api-port" : "4028",
       "expiry" : "120",
       "failover-only" : true,
       "log" : "5",
       "no-pool-disable" : true,
       "queue" : "2",
       "scan-time" : "60",
       "worktime" : true,
       "shares" : "0",
       "kernel-path" : "/usr/local/bin",
       "api-allow" : "0/0",
       "icarus-options" : "115200:1:1",
       "icarus-timing" : "3.0=100"
}
[root@pogoplug01 Bitcoin]# cat /etc/startscript.sh
Code:
#!/bin/sh
# sleep 1m ### This is one difference between the two guides ###
screen -dmS cgminer /home/Bitcoin/cgminer-3.4.3/cgminer --config /home/Bitcoin/cgminer-3.4.3/cgminer.conf 2> /var/log/cgminer.log
# sleep 100000d ### This is one difference between the two guides ###

[root@pogoplug01 Bitcoin]# cat /usr/lib/systemd/system/cgminer.service
Code:
[Unit]
Description=Start cgminer
Documentation=man:syslog-ng(8)

[Service]
User=root
Type=oneshot
ExecStart=/bin/sh /etc/startscript.sh
StandardOutput=null

[Install]
WantedBy=multi-user.target
# Enable the service: ### This is one difference between the two guides ###
### I commented this out because I didn't think it was valid code! ###
[root@pogoplug01 Bitcoin]#

Then changed permissions for the script:
[root@pogoplug01 Bitcoin]# chmod +x /usr/lib/systemd/system/cgminer.service

Once everything was configured, I shutdown the ssh session which was running cgminer interactively and started the daemon:
[root@pogoplug01 Bitcoin]# systemctl start cgminer.service

[root@pogoplug01 Bitcoin]# systemctl enable cgminer  #This will start the cgminer.service on startup.

Then I tried to restore the screen session with:
[root@pogoplug01 Bitcoin]# screen -r
error:No screen to restore -- Not sure of the exact wording here.

So I looked to see if it logged anything:
[root@pogoplug01 Bitcoin]# cat /var/log/cgminer.log
[root@pogoplug01 Bitcoin]#

Is there a debug version so I can trace my path?

Oh, yes I did post this in the ALARM forum. But it seems the ratio of activity between BT and ALARM is 1000+?/1.
I'm aware this is an immortal sin in the Forum worlds. But I just want to mine too people!
 
Some please point me in the right direction...
Thanks.
b!z
Legendary
*
Offline Offline

Activity: 1582
Merit: 1010



View Profile
September 29, 2013, 05:23:31 AM
 #2

You should post this in the Mining forum when you leave newbie jail. There are more experienced users who can help you out faster.
Zanatos666
Sr. Member
****
Offline Offline

Activity: 280
Merit: 250


Sometimes man, just sometimes.....


View Profile
September 30, 2013, 05:06:39 PM
 #3

Have you tried to also systemctl enable cgminer.service, then rebooting?

Squiggly letters, written really fast, with a couple of dots for good measure.
ThinkFast (OP)
Member
**
Offline Offline

Activity: 69
Merit: 10


View Profile
October 01, 2013, 05:14:13 PM
 #4

Have you tried to also systemctl enable cgminer.service, then rebooting?
No maybe a reboot is necessary...
Thanks.
ThinkFast (OP)
Member
**
Offline Offline

Activity: 69
Merit: 10


View Profile
October 01, 2013, 05:19:23 PM
 #5

Code:
[root@pogoplug01 etc]# systemctl enable cgminer
ln -s '/usr/lib/systemd/system/cgminer.service' '/etc/systemd/system/multi-user.target.wants/cgminer.service'
[root@pogoplug01 etc]#
Is this a sign of success or warning?
Thanks
Zanatos666
Sr. Member
****
Offline Offline

Activity: 280
Merit: 250


Sometimes man, just sometimes.....


View Profile
October 01, 2013, 05:59:56 PM
 #6

It appears to have taken it in some capacity.  Usually if it doesnt like it, it will tell you that it doesnt recognize the command.

Squiggly letters, written really fast, with a couple of dots for good measure.
ThinkFast (OP)
Member
**
Offline Offline

Activity: 69
Merit: 10


View Profile
October 01, 2013, 10:14:29 PM
 #7

Ok. I found the problem. The path is invalid, so the command failed.

[root@pogoplug01 Bitcoin]# cat /etc/startscript.sh
Code:
#!/bin/sh
#...
screen -dmS cgminer /home/Bitcoin/cgminer/cgminer-3.4.3/cgminer
           --config /home/Bitcoin/cgminer-3.4.3/cgminer.conf 2> /var/log/cgminer.log
#...

This is the correct path:
Code:
#!/bin/sh
#...
screen -dmS cgminer /home/Bitcoin/cgminer-3.4.3/cgminer
           --config /home/Bitcoin/cgminer-3.4.3/cgminer.conf 2> /var/log/cgminer.log
#...

Thanks for all your help.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!