Pages:
Author

Topic: [Avalon] How to automate restarting of Avalon/cgminer when it stops mining? - page 2. (Read 5312 times)

full member
Activity: 155
Merit: 100
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!
legendary
Activity: 3080
Merit: 1080
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.
legendary
Activity: 3080
Merit: 1080
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?
newbie
Activity: 30
Merit: 0
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
legendary
Activity: 1610
Merit: 1000
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
sr. member
Activity: 388
Merit: 250
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
legendary
Activity: 1176
Merit: 1001
Has anyone experienced some hard crash that required a manual machine reboot to fix? Or respawing cgminer is enough?
legendary
Activity: 3080
Merit: 1080
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).

sr. member
Activity: 388
Merit: 250
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
legendary
Activity: 1610
Merit: 1000
Dude,

This is my way and it works 100%
https://bitcointalksearch.org/topic/m.1603942
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
hero member
Activity: 607
Merit: 500
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?!
legendary
Activity: 1890
Merit: 1003
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.
sr. member
Activity: 388
Merit: 250
is the same for me stopped after 4h
do you have the network pool connections to failsafe or balanced ?
hero member
Activity: 607
Merit: 500
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
full member
Activity: 155
Merit: 100
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.
legendary
Activity: 3080
Merit: 1080
How often does this happen? I too am using the latest firmware but for me it's stable. 1 day and 13 hours uptime.
full member
Activity: 155
Merit: 100
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.
sr. member
Activity: 336
Merit: 251
Avalon ASIC Team
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.
full member
Activity: 155
Merit: 100
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!
Pages:
Jump to: