cgminer as service on Pogoplug E02

This forum is for topics dealing with problems with software specifically in the ARMv5 repo.

cgminer as service on Pogoplug E02

Postby ThinkFast » Sat Sep 28, 2013 11:06 pm

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.

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
$this->bbcode_second_pass_code('', '{
"pools" : [
{
"url" : "http://pool-us.50btc.com:8332",
"user" : "xxx@gmail.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
$this->bbcode_second_pass_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')

[root@pogoplug01 Bitcoin]# cat /usr/lib/systemd/system/cgminer.service
$this->bbcode_second_pass_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')
[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

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]#

Any ideas? Thanks.
ThinkFast
 
Posts: 29
Joined: Fri Mar 01, 2013 2:14 am

Re: cgminer as service on Pogoplug E02

Postby WarheadsSE » Sun Sep 29, 2013 3:16 pm

Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: cgminer as service on Pogoplug E02

Postby ThinkFast » Sun Sep 29, 2013 5:00 pm

Thanks WarheadSE! :ugeek:
I will test and confirm. I should have suspected something. I was just to eggre to mine :evil: Just kidding :geek:
ThinkFast
 
Posts: 29
Joined: Fri Mar 01, 2013 2:14 am

Re: cgminer as service on Pogoplug E02

Postby ThinkFast » Sun Sep 29, 2013 10:28 pm

Re: cgminer as service on Pogoplug E02

Postby WarheadsSE » Sun Sep 29, 2013 10:16 am
Switch type to forking
https://wiki.archlinux.org/index.php/Sy ... ces#screen

Haven't tested yet, but I'm confident that this will solve it.
Thanks!
ThinkFast
 
Posts: 29
Joined: Fri Mar 01, 2013 2:14 am


Return to ARMv5

Who is online

Users browsing this forum: No registered users and 14 guests