Bitcoin Forum
April 25, 2024, 06:49:38 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 »  All
  Print  
Author Topic: [Avalon] How to automate restarting of Avalon/cgminer when it stops mining?  (Read 5256 times)
coinnewb (OP)
Full Member
***
Offline Offline

Activity: 155
Merit: 100



View Profile
March 24, 2013, 04:09:12 AM
 #1

From time to time, I see that it stops hashing.  I would like to automate detection and restart and was wondering if anyone had any pointer.
Thanks in advance!
1714070978
Hero Member
*
Offline Offline

Posts: 1714070978

View Profile Personal Message (Offline)

Ignore
1714070978
Reply with quote  #2

1714070978
Report to moderator
Bitcoin mining is now a specialized and very risky industry, just like gold mining. Amateur miners are unlikely to make much money, and may even lose money. Bitcoin is much more than just mining, though!
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714070978
Hero Member
*
Offline Offline

Posts: 1714070978

View Profile Personal Message (Offline)

Ignore
1714070978
Reply with quote  #2

1714070978
Report to moderator
BitSyncom
Sr. Member
****
Offline Offline

Activity: 336
Merit: 251

Avalon ASIC Team


View Profile
March 24, 2013, 04:11:02 AM
 #2

From time to time, I see that it stops hashing.  I would like to automate detection and restart and was wondering if anyone had any pointer.
Thanks in advance!

Update to latest firmware that was released recently, which fixes some "stuck" issue and will continue to automatically restart.

https://en.bitcoin.it/wiki/Avalon#20130321

or you can try the NEXT firmware which is in testing.

coinnewb (OP)
Full Member
***
Offline Offline

Activity: 155
Merit: 100



View Profile
March 24, 2013, 04:16:11 AM
 #3

Thanks for the reply, BitSyncom. I am using 20130321 firmware, and, yes, I noticed the system restart (fan noise), but it still stayed idle.  I will definitely give the next firmware update when it comes out.
allinvain
Legendary
*
Offline Offline

Activity: 3080
Merit: 1080



View Profile WWW
March 24, 2013, 04:31:59 AM
 #4

How often does this happen? I too am using the latest firmware but for me it's stable. 1 day and 13 hours uptime.

coinnewb (OP)
Full Member
***
Offline Offline

Activity: 155
Merit: 100



View Profile
March 24, 2013, 04:37:34 AM
 #5

How often does this happen? I too am using the latest firmware but for me it's stable. 1 day and 13 hours uptime.
With the latest firmware, it only happened once around 23 hour mark, but when it does happen and can be costly.
luffy
Hero Member
*****
Offline Offline

Activity: 607
Merit: 500



View Profile
March 24, 2013, 05:58:03 AM
 #6

the same for me also after 21-22 hours. cgminer just stopped with fans to go full and to low periodically, that is how
i noticing it. then it needs a reboot  Smiley
thorvald
Sr. Member
****
Offline Offline

Activity: 388
Merit: 250



View Profile
March 24, 2013, 06:03:59 AM
 #7

is the same for me stopped after 4h
do you have the network pool connections to failsafe or balanced ?

▄▄▄████████▄▄▄
▄▄██████████████████▄▄
▄████████████████████████▄
▄██████████████████████▀  ███▄
████████████▀▀    ▀▀███▀  ▄█████
██████████▀         ██▀  ▄████████
█████████▀      ▄▄▄▄██▀  ▄██████████
████████     ▄██████▀  ▄██  ████████
████████     ███████▀  ▄██    ████████
████████    ██████▀  ▄████    ████████
████████    █████▀  ▄█████    ████████
████████    ███▀  ▄██████     ████████
████████  ███▀  ▄█████▀     ████████
███████████▀  ▄█▀▀▀▀      ▄█████████
█████████▀  ▄█         ▄██████████
██████▀  ▄██▄▄    ▄▄████████████
▀████  ▄█████████████████████▀
▀████████████████████████▀
▀▀██████████████████▀▀
▀▀▀████████▀▀▀




██████            ██████          ▄▄██████          ▄▄███████▄▄                ▄▄███████▄▄
 ██████          ██████        ▄██████████       ▄███████████████▄          ▄███████████████▄
 ▀█████▄        ▄█████▀       ████████████      ███████████████████        ███████████████████
  ▀█████▄      ▄█████▀       ████████▀▀        ███████▀▀    ▀▀██████      ██████▀▀     ▀▀██████
   ██████      ██████       ███████           ██████▀       ▄██████      █████▀           ▀█████
   ▀█████▄    ▄█████▀      ███████           ██████       ▄██████▀      █████               █████
    ▀█████▄  ▄█████▀       ██████            █████      ▄██████▀        █████               █████
     ██████  ██████        ██████            █████    ▄██████▀          █████               █████
     ▀█████▄▄█████▀        ██████            █████▄ ▄██████▀            █████               █████
      ▀██████████▀         ██████             ███████████▀     ▄███▄     █████▄           ▄█████
       ██████████          ██████              ████████▀    ▄▄██████      ██████▄▄     ▄▄██████
       ▀████████▀          ██████               ███████████████████        ███████████████████
        ▀██████▀           ██████                ▀███████████████▀          ▀███████████████▀
         ▀████▀            ██████                   ▀▀███████▀▀                ▀▀███████▀▀




[
 ▄███████████████████████▄
██▀                     ▀██
██  ▄█████████████████▄  ██
██  ███             ███  ██
██  ███             ███  ██
██  ███             ███  ██
██  ███             ███  ██
██  ███             ███  ██
██  ▀████████████████▀   ██
██                       ██
██                  ▄▄▄  ██
██   ██             ███  ██
██ ██████       ▄▄▄      ██
██   ██         ███    ▄ ██
██        ▄  ▄       ▄▀ ▄██
██      ▄▀ ▄▀      ▄▀ ▄██▀
██▄               ▀ ▄██▀
 ▀███████████████████▀
Telegram
ANN Thread
Website
]
PuertoLibre
Legendary
*
Offline Offline

Activity: 1834
Merit: 1003


View Profile
March 24, 2013, 06:15:03 AM
 #8

From time to time, I see that it stops hashing.  I would like to automate detection and restart and was wondering if anyone had any pointer.
Thanks in advance!

Update to latest firmware that was released recently, which fixes some "stuck" issue and will continue to automatically restart.

https://en.bitcoin.it/wiki/Avalon#20130321

or you can try the NEXT firmware which is in testing.
Is there a change log for the NEXT firmware?

By the way, it is running very well (3/21/2013).

Edit: My only complaint (not a serious one either) is that the web interface tends to timeout quite often if you are refreshing it frequently.
luffy
Hero Member
*****
Offline Offline

Activity: 607
Merit: 500



View Profile
March 24, 2013, 06:35:12 AM
Last edit: March 24, 2013, 06:59:09 AM by luffy
 #9

is the same for me stopped after 4h
do you have the network pool connections to failsafe or balanced ?
i got it to "failover". in "balance", cgminer used all 3 pools at the same time! (i wonder if this was a bug or pool's responsibility at the time)

edit: forget it, this is how balance is working (i am sooooo newbie :p )
do you think that balance or load balance is better for avalon even if i choose a zero fee pps first pool and the rest has 2% fees?
is the first pool's lagging worst that the fees of other 2 pools?!
loshia
Legendary
*
Offline Offline

Activity: 1610
Merit: 1000


View Profile
March 24, 2013, 06:54:14 AM
 #10

Dude,

This is my way and it works 100%
https://bitcointalk.org/index.php?topic=140539.msg1603942#msg1603942
However there is a chance with latest Avalon FW problem to be fixed - no restarts since upgrade 1 day and 10 hours.
But we can now for sure if when up time reaches at least a week

Please help the Led Boy aka Bicknellski to make us a nice Christmas led tree and pay WASP membership fee here:
https://bitcointalk.org/index.php?topic=643999.msg7191563#msg7191563
And remember Bicknellski is not collecting money from community;D
thorvald
Sr. Member
****
Offline Offline

Activity: 388
Merit: 250



View Profile
March 24, 2013, 08:54:41 AM
 #11

hello you have lower the content of the monitor from version latest 321
this wil not fix the not hassing issue

#!/bin/sh
# This file is for cron job

C=`pidof cgminer | wc -w`
if [ "$C" != "1" ]; then
   /etc/init.d/cgminer stop
   /etc/init.d/cgminer start
   exit 0;
fi

A=`cat /tmp/cm.log`
B=`cgminer-api  | grep "^   \[Accepted\]"`
echo $B > /tmp/cm.log
if [ "$A" == "$B" ]; then
   /etc/init.d/cgminer stop
   /etc/init.d/cgminer start
   exit 0;
fi

▄▄▄████████▄▄▄
▄▄██████████████████▄▄
▄████████████████████████▄
▄██████████████████████▀  ███▄
████████████▀▀    ▀▀███▀  ▄█████
██████████▀         ██▀  ▄████████
█████████▀      ▄▄▄▄██▀  ▄██████████
████████     ▄██████▀  ▄██  ████████
████████     ███████▀  ▄██    ████████
████████    ██████▀  ▄████    ████████
████████    █████▀  ▄█████    ████████
████████    ███▀  ▄██████     ████████
████████  ███▀  ▄█████▀     ████████
███████████▀  ▄█▀▀▀▀      ▄█████████
█████████▀  ▄█         ▄██████████
██████▀  ▄██▄▄    ▄▄████████████
▀████  ▄█████████████████████▀
▀████████████████████████▀
▀▀██████████████████▀▀
▀▀▀████████▀▀▀




██████            ██████          ▄▄██████          ▄▄███████▄▄                ▄▄███████▄▄
 ██████          ██████        ▄██████████       ▄███████████████▄          ▄███████████████▄
 ▀█████▄        ▄█████▀       ████████████      ███████████████████        ███████████████████
  ▀█████▄      ▄█████▀       ████████▀▀        ███████▀▀    ▀▀██████      ██████▀▀     ▀▀██████
   ██████      ██████       ███████           ██████▀       ▄██████      █████▀           ▀█████
   ▀█████▄    ▄█████▀      ███████           ██████       ▄██████▀      █████               █████
    ▀█████▄  ▄█████▀       ██████            █████      ▄██████▀        █████               █████
     ██████  ██████        ██████            █████    ▄██████▀          █████               █████
     ▀█████▄▄█████▀        ██████            █████▄ ▄██████▀            █████               █████
      ▀██████████▀         ██████             ███████████▀     ▄███▄     █████▄           ▄█████
       ██████████          ██████              ████████▀    ▄▄██████      ██████▄▄     ▄▄██████
       ▀████████▀          ██████               ███████████████████        ███████████████████
        ▀██████▀           ██████                ▀███████████████▀          ▀███████████████▀
         ▀████▀            ██████                   ▀▀███████▀▀                ▀▀███████▀▀




[
 ▄███████████████████████▄
██▀                     ▀██
██  ▄█████████████████▄  ██
██  ███             ███  ██
██  ███             ███  ██
██  ███             ███  ██
██  ███             ███  ██
██  ███             ███  ██
██  ▀████████████████▀   ██
██                       ██
██                  ▄▄▄  ██
██   ██             ███  ██
██ ██████       ▄▄▄      ██
██   ██         ███    ▄ ██
██        ▄  ▄       ▄▀ ▄██
██      ▄▀ ▄▀      ▄▀ ▄██▀
██▄               ▀ ▄██▀
 ▀███████████████████▀
Telegram
ANN Thread
Website
]
allinvain
Legendary
*
Offline Offline

Activity: 3080
Merit: 1080



View Profile WWW
March 24, 2013, 09:49:43 AM
 #12

How often does this happen? I too am using the latest firmware but for me it's stable. 1 day and 13 hours uptime.
With the latest firmware, it only happened once around 23 hour mark, but when it does happen and can be costly.

Ok, that is odd. As far as I am aware the latest firmware is supposed to fix this issue. Perhaps there is something peculiar to your unit alone that causes the bug to still manifest itself.

Also did you make sure you're really running the latest firmware - 3/21/2013.

Ssh into the box and go into /etc
and then run: "cat avalon_version"
it should read:

20130321
cgminer-7c1428a
luci-46afd4a
openwrt-package-10ee304

Mine is still going, 1 day 18 hrs 22 min

I don't think this should make any difference but I have mine set to Failover mode. It will mine on btcguild and if that fails it will switch over to a backup pool. BTCguild with vardiff setting at 32 (I debated increasing it to 64 but I don't think it will make that huge of a difference).


cedivad
Legendary
*
Offline Offline

Activity: 1176
Merit: 1001



View Profile
March 24, 2013, 09:52:56 AM
 #13

Has anyone experienced some hard crash that required a manual machine reboot to fix? Or respawing cgminer is enough?

My anger against what is wrong in the Bitcoin community is productive:
Bitcointa.lk - Replace "Bitcointalk.org" with "Bitcointa.lk" in this url to see how this page looks like on a proper forum (Announcement Thread)
Hashfast.org - Wiki for screwed customers
thorvald
Sr. Member
****
Offline Offline

Activity: 388
Merit: 250



View Profile
March 24, 2013, 10:37:09 AM
 #14

i had the same setting/firmware as you , at 1day 23h it stoped hassing
stop start cgminer fixed it for about 3h-5h
after reset it seems to go on until it stops again
it is like no new work is subited to the worker   The Alive tab has 0mhs
i have random results about the hassing stop 
at 6h
at 4h
at about 3h
after 13h

it seems that maybe the monitor crom job is going in a loop , the only thing in the log si about the monitor job
Thorvald

▄▄▄████████▄▄▄
▄▄██████████████████▄▄
▄████████████████████████▄
▄██████████████████████▀  ███▄
████████████▀▀    ▀▀███▀  ▄█████
██████████▀         ██▀  ▄████████
█████████▀      ▄▄▄▄██▀  ▄██████████
████████     ▄██████▀  ▄██  ████████
████████     ███████▀  ▄██    ████████
████████    ██████▀  ▄████    ████████
████████    █████▀  ▄█████    ████████
████████    ███▀  ▄██████     ████████
████████  ███▀  ▄█████▀     ████████
███████████▀  ▄█▀▀▀▀      ▄█████████
█████████▀  ▄█         ▄██████████
██████▀  ▄██▄▄    ▄▄████████████
▀████  ▄█████████████████████▀
▀████████████████████████▀
▀▀██████████████████▀▀
▀▀▀████████▀▀▀




██████            ██████          ▄▄██████          ▄▄███████▄▄                ▄▄███████▄▄
 ██████          ██████        ▄██████████       ▄███████████████▄          ▄███████████████▄
 ▀█████▄        ▄█████▀       ████████████      ███████████████████        ███████████████████
  ▀█████▄      ▄█████▀       ████████▀▀        ███████▀▀    ▀▀██████      ██████▀▀     ▀▀██████
   ██████      ██████       ███████           ██████▀       ▄██████      █████▀           ▀█████
   ▀█████▄    ▄█████▀      ███████           ██████       ▄██████▀      █████               █████
    ▀█████▄  ▄█████▀       ██████            █████      ▄██████▀        █████               █████
     ██████  ██████        ██████            █████    ▄██████▀          █████               █████
     ▀█████▄▄█████▀        ██████            █████▄ ▄██████▀            █████               █████
      ▀██████████▀         ██████             ███████████▀     ▄███▄     █████▄           ▄█████
       ██████████          ██████              ████████▀    ▄▄██████      ██████▄▄     ▄▄██████
       ▀████████▀          ██████               ███████████████████        ███████████████████
        ▀██████▀           ██████                ▀███████████████▀          ▀███████████████▀
         ▀████▀            ██████                   ▀▀███████▀▀                ▀▀███████▀▀




[
 ▄███████████████████████▄
██▀                     ▀██
██  ▄█████████████████▄  ██
██  ███             ███  ██
██  ███             ███  ██
██  ███             ███  ██
██  ███             ███  ██
██  ███             ███  ██
██  ▀████████████████▀   ██
██                       ██
██                  ▄▄▄  ██
██   ██             ███  ██
██ ██████       ▄▄▄      ██
██   ██         ███    ▄ ██
██        ▄  ▄       ▄▀ ▄██
██      ▄▀ ▄▀      ▄▀ ▄██▀
██▄               ▀ ▄██▀
 ▀███████████████████▀
Telegram
ANN Thread
Website
]
loshia
Legendary
*
Offline Offline

Activity: 1610
Merit: 1000


View Profile
March 24, 2013, 10:49:07 AM
 #15

i had the same setting/firmware as you , at 1day 23h it stoped hassing
stop start cgminer fixed it for about 3h-5h
after reset it seems to go on until it stops again
it is like no new work is subited to the worker   The Alive tab has 0mhs
i have random results about the hassing stop 
at 6h
at 4h
at about 3h
after 13h

it seems that maybe the monitor crom job is going in a loop , the only thing in the log si about the monitor job
Thorvald

cron job is not looping power off/on is needed sometimes to recover
PS Latest FW:    1day 12h 42m 04s up time so far

Please help the Led Boy aka Bicknellski to make us a nice Christmas led tree and pay WASP membership fee here:
https://bitcointalk.org/index.php?topic=643999.msg7191563#msg7191563
And remember Bicknellski is not collecting money from community;D
Mills00013
Newbie
*
Offline Offline

Activity: 30
Merit: 0


View Profile
March 24, 2013, 10:19:49 PM
 #16

Quasi fixed the issue with the miner quitting. The cgminer-monitor script has an error in it which writes out "   [ACCEPTED] => X" in the file it's comparing against "[ACCEPTED] => X". These extra spaces caused the files to not match which causes the script to think that cgminer is still mining correctly. This script below removes all spaces from the files when they are created and makes the checking accurate. Replace the contents of /usr/bin/cgminer-monitor with the script below and the cron job should once again be able to properly reset cgminer when it stops mining.



#!/bin/sh
# This file is for cron job

C=`pidof cgminer | wc -w`
if [ "$C" != "1" ]; then
   /etc/init.d/cgminer stop
   /etc/init.d/cgminer start
   exit 0;
fi

A=`cat /tmp/cm.log | sed "s/ //g"`
B=`cgminer-api  | grep "^   \[Accepted\]" | sed "s/ //g"`
echo $B > /tmp/cm.log
if [ "$A" == "$B" ]; then
   /etc/init.d/cgminer stop
   /etc/init.d/cgminer start
   exit 0;
fi
allinvain
Legendary
*
Offline Offline

Activity: 3080
Merit: 1080



View Profile WWW
March 24, 2013, 11:59:40 PM
 #17

Ok, I'd like to hear from BitSyncom as to which is the proper content to have in the cron job. At the moment I have this:

Code:
#!/bin/sh
# This file is for cron job

C=`pidof cgminer | wc -w`
if [ "$C" != "1" ]; then
        /etc/init.d/cgminer stop
        /etc/init.d/cgminer start
        exit 0;
fi

A=`cat /tmp/cm.log`
B=`cgminer-api  | grep "^   \[Accepted\]"`
echo $B > /tmp/cm.log
if [ "$A" == "$B" ]; then
        /etc/init.d/cgminer stop
        /etc/init.d/cgminer start
        exit 0;
fi


Is the code Mills00013 posted what we should have?

allinvain
Legendary
*
Offline Offline

Activity: 3080
Merit: 1080



View Profile WWW
March 25, 2013, 12:28:20 AM
 #18

Hmm, so I guess that is indeed the fix. The latest testing firmware includes this fix:

http://downloads.qi-hardware.com/people/xiangfu/avalon/next-testing/

I think I shall wait until it's officially released out of the testing phase before updating. For now I've noticed no restarts.

coinnewb (OP)
Full Member
***
Offline Offline

Activity: 155
Merit: 100



View Profile
March 25, 2013, 03:53:27 AM
 #19

Quasi fixed the issue with the miner quitting. The cgminer-monitor script has an error in it which writes out "   [ACCEPTED] => X" in the file it's comparing against "[ACCEPTED] => X". These extra spaces caused the files to not match which causes the script to think that cgminer is still mining correctly. This script below removes all spaces from the files when they are created and makes the checking accurate. Replace the contents of /usr/bin/cgminer-monitor with the script below and the cron job should once again be able to properly reset cgminer when it stops mining.



#!/bin/sh
# This file is for cron job

C=`pidof cgminer | wc -w`
if [ "$C" != "1" ]; then
   /etc/init.d/cgminer stop
   /etc/init.d/cgminer start
   exit 0;
fi

A=`cat /tmp/cm.log | sed "s/ //g"`
B=`cgminer-api  | grep "^   \[Accepted\]" | sed "s/ //g"`
echo $B > /tmp/cm.log
if [ "$A" == "$B" ]; then
   /etc/init.d/cgminer stop
   /etc/init.d/cgminer start
   exit 0;
fi


This is a good catch.  I've changed mine like this as well and will see if this does the trick.  Thanks!
coinnewb (OP)
Full Member
***
Offline Offline

Activity: 155
Merit: 100



View Profile
March 25, 2013, 03:53:57 AM
 #20

Hmm, so I guess that is indeed the fix. The latest testing firmware includes this fix:

http://downloads.qi-hardware.com/people/xiangfu/avalon/next-testing/

I think I shall wait until it's officially released out of the testing phase before updating. For now I've noticed no restarts.

The latest testing firmware does not include this fix.
Pages: [1] 2 »  All
  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!