Author

Topic: SOLVED: BAMT restarting Cgminer 2.7.4 every time system clock reaches HH:MM:01 (Read 6445 times)

hero member
Activity: 840
Merit: 529
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
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
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.
newbie
Activity: 26
Merit: 0
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
Activity: 4088
Merit: 1631
Ruu \o/
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.
sr. member
Activity: 344
Merit: 250
Flixxo - Watch, Share, Earn!
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
newbie
Activity: 26
Merit: 0
Tried with Cgminer 2.3.1f, it works through BAMT without restarting.
newbie
Activity: 26
Merit: 0
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.
newbie
Activity: 26
Merit: 0
[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"
}
Jump to: