Bitcoin Forum
May 04, 2024, 09:33:48 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: SOLVED: BAMT restarting Cgminer 2.7.4 every time system clock reaches HH:MM:01  (Read 6414 times)
rontus (OP)
Newbie
*
Offline Offline

Activity: 26
Merit: 0



View Profile
August 30, 2012, 01:00:46 PM
Last edit: August 30, 2012, 02:19:30 PM by rontus
 #1

[solved by ckolivas, thank you!]

Hi, I hope I found the right place for my post.

I am looking for a help to debug a problem I think is something really really small, but still very frustrating for me.

I am currently setting up my machines to use BAMT. BAMT came with Cgminer 2.3.x and it was too old for me so I successfully upgraded Cgminer to version 2.7.4 after first running BAMT fixer for newest BAMT fixes. Mining works for hours straight if I start the miner with command ./cgminer --api-listen --config /etc/bamt/cgminer.conf when in /opt/miners/cgminer/

BUT, my problem is:
If I let BAMT start the miner when machine is started the Cgminer shuts down when system clock reaches HH:MM:01, every single time.
And Cgminer starts again at 15 seconds later (HH:MM:16). This happens if I start the machine, or start the mining by command /etc/init.d/mine start or restart

I guess this might have something do to with me using different version of Cgminer than the one which came with BAMT. New info: I tried with Cgminer 2.3.1f which came with BAMT, no problems with it!

Any ideas for a fix or ways to debug this more? Thank you!

Here is a log from /var/log/bamt.log, which just tells Cgminer is stopped and started again, and stopped again and started again...
Code:
Aug 30 12:51:07 rig-5 start_mining[20878]: generating munin config, stopping munin-node
Aug 30 12:51:07 rig-5 start_mining[20878]: replace hostname in munin.conf
Aug 30 12:51:07 rig-5 start_mining[20878]: generating munin summary plugins...
Aug 30 12:51:07 rig-5 start_mining[20878]: generating per gpu munin plugins for template gpuhash...
Aug 30 12:51:07 rig-5 start_mining[20878]: generating per gpu munin plugins for template gpushares...
Aug 30 12:51:07 rig-5 start_mining[20878]: generating per gpu munin plugins for template gputemp...
Aug 30 12:51:07 rig-5 start_mining[20878]: done generating munin config, starting munin-node
Aug 30 12:51:16 rig-5 start_mining[21282]: starting cgminer with cmd: cd /opt/miners/cgminer;/usr/bin/screen -d -m -S cgminer /opt/miners/cgminer/cgminer --api-listen --config /etc/bamt/cgminer.conf
Aug 30 12:52:01 rig-5 stop_mining[21361]: stopping mining processes...
Aug 30 12:52:01 rig-5 stop_mining[21361]: send quit command to cgminer api
Aug 30 12:52:01 rig-5 stop_mining[21361]: kill cgminer
Aug 30 12:52:06 rig-5 start_mining[21370]: starting mining processes
Aug 30 12:52:06 rig-5 start_mining[21370]: generating munin config, stopping munin-node
Aug 30 12:52:07 rig-5 start_mining[21370]: replace hostname in munin.conf
Aug 30 12:52:07 rig-5 start_mining[21370]: generating munin summary plugins...
Aug 30 12:52:07 rig-5 start_mining[21370]: generating per gpu munin plugins for template gpuhash...
Aug 30 12:52:07 rig-5 start_mining[21370]: generating per gpu munin plugins for template gpushares...
Aug 30 12:52:07 rig-5 start_mining[21370]: generating per gpu munin plugins for template gputemp...
Aug 30 12:52:07 rig-5 start_mining[21370]: done generating munin config, starting munin-node
Aug 30 12:52:16 rig-5 start_mining[21775]: starting cgminer with cmd: cd /opt/miners/cgminer;/usr/bin/screen -d -m -S cgminer /opt/miners/cgminer/cgminer --api-listen --config /etc/bamt/cgminer.conf
Aug 30 12:53:01 rig-5 stop_mining[21865]: stopping mining processes...
Aug 30 12:53:01 rig-5 stop_mining[21865]: send quit command to cgminer api
Aug 30 12:53:01 rig-5 stop_mining[21865]: kill cgminer
Aug 30 12:53:06 rig-5 start_mining[21872]: starting mining processes
Aug 30 12:53:07 rig-5 start_mining[21872]: generating munin config, stopping munin-node
Aug 30 12:53:07 rig-5 start_mining[21872]: replace hostname in munin.conf
Aug 30 12:53:07 rig-5 start_mining[21872]: generating munin summary plugins...
Aug 30 12:53:07 rig-5 start_mining[21872]: generating per gpu munin plugins for template gpuhash...
Aug 30 12:53:07 rig-5 start_mining[21872]: generating per gpu munin plugins for template gpushares...
Aug 30 12:53:07 rig-5 start_mining[21872]: generating per gpu munin plugins for template gputemp...
Aug 30 12:53:07 rig-5 start_mining[21872]: done generating munin config, starting munin-node
Aug 30 12:53:16 rig-5 start_mining[22276]: starting cgminer with cmd: cd /opt/miners/cgminer;/usr/bin/screen -d -m -S cgminer /opt/miners/cgminer/cgminer --api-listen --config /etc/bamt/cgminer.conf
Aug 30 12:54:01 rig-5 stop_mining[22376]: stopping mining processes...
Aug 30 12:54:01 rig-5 stop_mining[22376]: send quit command to cgminer api
Aug 30 12:54:01 rig-5 stop_mining[22376]: kill cgminer
Aug 30 12:54:06 rig-5 start_mining[22383]: starting mining processes
Aug 30 12:54:07 rig-5 start_mining[22383]: generating munin config, stopping munin-node
Aug 30 12:54:07 rig-5 start_mining[22383]: replace hostname in munin.conf
Aug 30 12:54:07 rig-5 start_mining[22383]: generating munin summary plugins...
Aug 30 12:54:07 rig-5 start_mining[22383]: generating per gpu munin plugins for template gpuhash...
Aug 30 12:54:07 rig-5 start_mining[22383]: generating per gpu munin plugins for template gpushares...
Aug 30 12:54:07 rig-5 start_mining[22383]: generating per gpu munin plugins for template gputemp...
Aug 30 12:52:07 rig-5 start_mining[21370]: done generating munin config, starting munin-node
Aug 30 12:52:16 rig-5 start_mining[21775]: starting cgminer with cmd: cd /opt/miners/cgminer;/usr/bin/screen -d -m -S cgminer /opt/miners/cgminer/cgminer --api-listen --config /etc/bamt/cgminer.conf
Aug 30 12:53:01 rig-5 stop_mining[21865]: stopping mining processes...
Aug 30 12:53:01 rig-5 stop_mining[21865]: send quit command to cgminer api
Aug 30 12:53:01 rig-5 stop_mining[21865]: kill cgminer
Aug 30 12:53:06 rig-5 start_mining[21872]: starting mining processes
Aug 30 12:53:07 rig-5 start_mining[21872]: generating munin config, stopping munin-node
Aug 30 12:53:07 rig-5 start_mining[21872]: replace hostname in munin.conf
Aug 30 12:53:07 rig-5 start_mining[21872]: generating munin summary plugins...
Aug 30 12:53:07 rig-5 start_mining[21872]: generating per gpu munin plugins for template gpuhash...
Aug 30 12:53:07 rig-5 start_mining[21872]: generating per gpu munin plugins for template gpushares...
Aug 30 12:53:07 rig-5 start_mining[21872]: generating per gpu munin plugins for template gputemp...
Aug 30 12:53:07 rig-5 start_mining[21872]: done generating munin config, starting munin-node
Aug 30 12:53:16 rig-5 start_mining[22276]: starting cgminer with cmd: cd /opt/miners/cgminer;/usr/bin/screen -d -m -S cgminer /opt/miners/cgminer/cgminer --api-listen --config /etc/bamt/cgminer.conf
Aug 30 12:54:01 rig-5 stop_mining[22376]: stopping mining processes...
Aug 30 12:54:01 rig-5 stop_mining[22376]: send quit command to cgminer api
Aug 30 12:54:01 rig-5 stop_mining[22376]: kill cgminer
Aug 30 12:54:06 rig-5 start_mining[22383]: starting mining processes
Aug 30 12:54:07 rig-5 start_mining[22383]: generating munin config, stopping munin-node
Aug 30 12:54:07 rig-5 start_mining[22383]: replace hostname in munin.conf
Aug 30 12:54:07 rig-5 start_mining[22383]: generating munin summary plugins...
Aug 30 12:54:07 rig-5 start_mining[22383]: generating per gpu munin plugins for template gpuhash...
Aug 30 12:54:07 rig-5 start_mining[22383]: generating per gpu munin plugins for template gpushares...
Aug 30 12:54:07 rig-5 start_mining[22383]: generating per gpu munin plugins for template gputemp...
Aug 30 12:54:07 rig-5 start_mining[22383]: done generating munin config, starting munin-node
Aug 30 12:55:16 rig-5 start_mining[23554]: starting cgminer with cmd: cd /opt/miners/cgminer;/usr/bin/screen -d -m -S cgminer /opt/miners/cgminer/cgminer --api-listen --config /etc/bamt/cgminer.conf
Aug 30 12:56:02 rig-5 stop_mining[23640]: stopping mining processes...

And the /etc/init.d/mine which somehow starts/controls(?) mining in BAMT, I have NOT modified this, I think this is important:
Code:
#! /bin/sh
### BEGIN INIT INFO
# Provides:          mine
# Should-Start:      console-screen kbd acpid dbus hal network-manager
# Required-Start:    $local_fs $remote_fs x11-common gdm mine-pre
# Required-Stop:     $local_fs $remote_fs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: mine
# Description:       init miners
### END INIT INFO
#
#
set -e

PATH=/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/sbin/start_mining

test -x $DAEMON || exit 0

if [ -r /etc/default/locale ]; then
  . /etc/default/locale
  export LANG LANGUAGE
fi

. /lib/lsb/init-functions


case "$1" in
  start)
        if [ -e /tmp/noMine ];
        then
                log_failure_msg "Mining has been disabled by presense of /tmp/noMine! BAMT does this when aticonfig fails to generate an X config."
        else
                log_daemon_msg "Starting mining processes..." "mine"
                start_daemon $DAEMON
                log_end_msg $?
        fi
  ;;
  stop)
        log_daemon_msg "Stopping mining processes..." "mine"
        set +e
        /usr/sbin/stop_mining
        start-stop-daemon --stop --quiet --pidfile /var/run/mine.pid \
                --name mine --retry 5
        set -e
        log_end_msg $?
  ;;
  status)
        status_of_proc -p "$PIDFILE" "$DAEMON" mine && exit 0 || exit $?
  ;;
  restart|force-reload|reload)
        $0 stop
        sleep 3
        $0 start
  ;;
  *)
        echo "Usage: /etc/init.d/mine {start|stop|restart|reload|force-reload|status}"
        exit 1
  ;;
esac

exit 0

And /usr/sbin/start_mining is here http://pastebin.com/z2FC1NL6
and /usr/sbin/stop_mining is here http://pastebin.com/0yJsmFaj
and /usr/sbin/mine is here http://pastebin.com/ZJMRL2cp
these are not modified by me.


I think these do not matter, but just in case they do, I post them as well:
Here are my configs:

/etc/bamt/bamt.conf
Code:
settings:
  miner_id: rig-5
  miner_loc: blaa
  do_monitor: 0
  do_bcast_status: 1
  cgminer: 1
  cgminer_opts: --api-listen --config /etc/bamt/cgminer.conf
gpu0:
  disabled: 0
  cgminer: 1
  monitor_temp_lo: 35
  monitor_temp_hi: 80
  monitor_load_lo: 80
  monitor_hash_lo: 125
  monitor_fan_lo: 1000
  monitor_reject_hi: 2
gpu1:
  disabled: 0
  cgminer: 1
  monitor_temp_lo: 35
  monitor_temp_hi: 80
  monitor_load_lo: 80
  monitor_hash_lo: 125
  monitor_fan_lo: 1000
  monitor_reject_hi: 2

/etc/bamt/cgminer.conf
Code:
{
"pools" : [
        {
                "url" : "http://10.0.0.1:8337",
                "user" : "rig-5",
                "pass" : "x"
        }
]
,
"intensity" : "10",
"vectors" : "2",
"worksize" : "128",
"kernel" : "phatk",
"gpu-threads" : "1",
"gpu-engine" : "675-750",
"gpu-fan" : "0-40",
"gpu-memclock" : "170",
"gpu-memdiff" : "0",
"gpu-powertune" : "0",
"gpu-vddc" : "1",
"temp-cutoff" : "95",
"temp-overheat" : "89",
"temp-target" : "75",
"api-port" : "4028",
"expiry" : "120",
"gpu-dyninterval" : "7",
"gpu-platform" : "0",
"log" : "5",
"queue" : "1",
"scan-time" : "60",
"temp-hysteresis" : "3",
"shares" : "0",
"kernel-path" : "/usr/local/bin"
}
1714815228
Hero Member
*
Offline Offline

Posts: 1714815228

View Profile Personal Message (Offline)

Ignore
1714815228
Reply with quote  #2

1714815228
Report to moderator
1714815228
Hero Member
*
Offline Offline

Posts: 1714815228

View Profile Personal Message (Offline)

Ignore
1714815228
Reply with quote  #2

1714815228
Report to moderator
No Gods or Kings. Only Bitcoin
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714815228
Hero Member
*
Offline Offline

Posts: 1714815228

View Profile Personal Message (Offline)

Ignore
1714815228
Reply with quote  #2

1714815228
Report to moderator
rontus (OP)
Newbie
*
Offline Offline

Activity: 26
Merit: 0



View Profile
August 30, 2012, 01:45:07 PM
 #2

Tried with the same USB stick in another quite similar computer, does the same trick. Please help Smiley

I don't know if it did the same with old Cgminer version, as I upgraded it quite right away.

Using Phoenix instead works like a charm, BAMT does not restart mining process every single minute.
rontus (OP)
Newbie
*
Offline Offline

Activity: 26
Merit: 0



View Profile
August 30, 2012, 02:05:48 PM
 #3

Tried with Cgminer 2.3.1f, it works through BAMT without restarting.
Subo1977
Sr. Member
****
Offline Offline

Activity: 344
Merit: 250


Flixxo - Watch, Share, Earn!


View Profile
August 30, 2012, 02:09:43 PM
 #4

I Run BAMT with cgminer 2.7.4 without problems.

i use the following paramters:--api-listen --api-network --api-allow W:IP-from-Monitoring-server,W:IP-BAMT,W:127.0.0.1

I think you have the problem that BAMT dont see the cgminer-process over API and make a restart

X       ▄▄█████████▄▄
    ▄██▀▀         ▀▀██▄
  ▄██▀              ▀██▄
 ▄██     ██▄▄          ██▄
▄██      █████▄▄        ██▄
██       ████████▄▄      ██
██       ███████████▄    ██
██       ██████████▀     ██
▀██      ███████▀       ██▀
 ▀██     ████▀         ██▀
  ▀██▄   █▀          ▄██▀
    ▀██▄▄         ▄▄██▀
       ▀▀█████████▀▀
.flixxo    X▄████████████████████▄
██████████████████████
██████████████████████
████████████▀▀███████
█████▀████░░░░░░▄████
█████░░░░░░░░░░▄█████
█████▄░░░░░░░░░░██████
██████░░░░░░░░░███████
███████░░░░░░▄████████
████▄▄░░░░▄▄██████████
██████████████████████
██████████████████████
▀████████████████████▀
▄████████████████████▄
██████████████████████
█████████▀█▀██████████
██████▀▀▀▀▀████████
██████▄▄░░▄▄▄░░███████
████████░░███░░███████
████████░░░░░░▀███████
████████░░███▄░░██████
██████▀▀░░▀▀▀░░░██████
██████▄▄▄▄▄▄███████
█████████▄█▄██████████
██████████████████████
▀████████████████████▀
X[[]]X
-ck
Legendary
*
Offline Offline

Activity: 4102
Merit: 1631


Ruu \o/


View Profile WWW
August 30, 2012, 02:10:05 PM
 #5

It's incompatible with recent versions of cgminer as it doesn't think cgminer is running and kills it off inappropriately. Try replacing the BAMT mother file in the /opt/bamt directory with this one:
http://ck.kolivas.org/apps/cgminer/temp/mother

Note that in the next version of bamt, apparently they're dropping support of cgminer.

Developer/maintainer for cgminer, ckpool/ckproxy, and the -ck kernel
2% Fee Solo mining at solo.ckpool.org
-ck
rontus (OP)
Newbie
*
Offline Offline

Activity: 26
Merit: 0



View Profile
August 30, 2012, 02:18:47 PM
 #6

It's incompatible with recent versions of cgminer as it doesn't think cgminer is running and kills it off inappropriately. Try replacing the BAMT mother file in the /opt/bamt directory with this one:
http://ck.kolivas.org/apps/cgminer/temp/mother

Note that in the next version of bamt, apparently they're dropping support of cgminer.

Ha! I was not aware of those files. Beyond my knowledge level of these things. I do not know what you modified, but it works!

Sent you a small quarter of BTC tip for being so helpful!

Well, I guess I don't really have a need to upgrade BAMT after this so it is no problem.

Difference between new mother-file and the old one:
Code:
269,270c269,272
<       #  babysit cgminer
<       my $cg = `ps Haux | grep cgminer | wc -l`;
---
>       #  babysit cgminer
>       my @ps = `ps axu | grep /opt/miners/cgminer`;
>
>       my $cg = 0;
272c274,282
<       if ( $cg -gt "1" )
---
>       foreach $l (@ps)
>         {
>               if ($l =~ /\/opt\/miners\/cgminer\scgminer/)
>               {
>                       $cg = 1;
>               }
>       }
>
>       if ($cg)
-ck
Legendary
*
Offline Offline

Activity: 4102
Merit: 1631


Ruu \o/


View Profile WWW
August 30, 2012, 02:48:41 PM
 #7

It's incompatible with recent versions of cgminer as it doesn't think cgminer is running and kills it off inappropriately. Try replacing the BAMT mother file in the /opt/bamt directory with this one:
http://ck.kolivas.org/apps/cgminer/temp/mother

Note that in the next version of bamt, apparently they're dropping support of cgminer.

Ha! I was not aware of those files. Beyond my knowledge level of these things. I do not know what you modified, but it works!

Sent you a small quarter of BTC tip for being so helpful!
Thanks Wink

Well on the rare chance that cgminer actually *does* die, that mother file will not restart it. However it will not inappropriately kill it off as current bamt does, and I'm pretty confident about the stability of cgminer 2.7.4 anyway.

Developer/maintainer for cgminer, ckpool/ckproxy, and the -ck kernel
2% Fee Solo mining at solo.ckpool.org
-ck
craked5
Hero Member
*****
Offline Offline

Activity: 840
Merit: 529



View Profile
August 30, 2012, 06:20:31 PM
 #8

I was having the same problem! Thanks so much for the new "mother" ckolivas! I will send you some coins when i have them Smiley
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!