Bitcoin Forum
November 05, 2024, 06:08:24 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Modification to show HW% and rejected% on Avalon Cgminer Status page  (Read 3174 times)
BenTuras (OP)
Hero Member
*****
Offline Offline

Activity: 826
Merit: 1001



View Profile
July 11, 2013, 02:14:49 PM
Last edit: August 06, 2013, 09:43:26 AM by BenTuras
 #1

I have a small modification to show the HW% on the Cgminer Status page:

ssh into your unit with ssh -l root <ip address>
cd to the directory /usr/lib/lua/luci/controller
vi cgminer.lua
Scroll down to the following lines:

   for line in summary do
      local elapsed, mhsav, foundblocks, getworks, accepted, rejected, hw, utility, discarded, stale, getfailures, localwork, remotefailures, networkblocks, totalmh, wu, diffaccep
      if elapsed then
         local mhw = string.format("%d(%1.2f%%)",hw,(100*hw/(diffaccepted+diffrejected+hw)));
         local str
         local days

Add the local mhw = line

Scroll down to the lines:

            ['accepted'] = accepted,
            ['rejected'] = rejected,      
            ['hw'] = hw,                
            ['utility'] = utility,        
            ['discarded'] = discarded,

Change the = hw that you see into = mhw

Save the new file and cd to /tmp
remove the luci caches: rm -rf luci-indexcache luci-modulecache
reload the Cgminer Status page in your browser and admire your HW% Smiley

Note1: This mod might go away after a reboot
Note2: The calculation of HW is not 100% correct since I can't use Diff1shares but have to use DiffA + DiffR but it's close enough!

Update: rejected% instructions below in message #4

@CKolivas: Can you add this mod to your next release when you're back from a well deserved vacation ?

I am selling in stock OneStringMiner boards, based on the Bitfury chips. Have a look here: https://bitcointalk.org/index.php?topic=495536.0
mdbssm
Full Member
***
Offline Offline

Activity: 182
Merit: 100


View Profile
July 11, 2013, 04:28:29 PM
 #2

I have a small modification to show the HW% on the Cgminer Status page:
..snip..

Very nice. Thanks so much for this mod. Guess I'm not the only one sick of manually calculation the HW error rate!

On my machine it does persist after a soft reboot (system/reboot tab).
mdbssm
Full Member
***
Offline Offline

Activity: 182
Merit: 100


View Profile
August 06, 2013, 12:47:43 AM
 #3

I have a small modification to show the HW% on the Cgminer Status page:

ssh into your unit with ssh -l root <ip address>
cd to the directory /usr/lib/lua/luci/controller
vi cgminer.lua
Scroll down to the following lines:

   for line in summary do
      local elapsed, mhsav, foundblocks, getworks, accepted, rejected, hw, utility, discarded, stale, getfailures, localwork, remotefailures, networkblocks, totalmh, wu, diffaccep
      if elapsed then
         local mhw = string.format("%d(%1.2f%%)",hw,(100*hw/(diffaccepted+diffrejected+hw)));
         local str
         local days

Add the local mhw = line

Scroll down to the lines:

            ['accepted'] = accepted,
            ['rejected'] = rejected,      
            ['hw'] = hw,                
            ['utility'] = utility,        
            ['discarded'] = discarded,

Change the = hw that you see into = mhw

Save the new file and cd to /tmp
remove the luci caches: rm -rf luci-indexcache luci-modulecache
reload the Cgminer Status page in your browser and admire your HW% Smiley

Note1: This mod might go away after a reboot
Note2: The calculation of HW is not 100% correct since I can't use Diff1shares but have to use DiffA + DiffR but it's close enough!

@CKolivas: Can you add this mod to your next release when you're back from a well deserved vacation ?

Ben,

Could you do a similar patch to show % rejected shares? That would be very helpful to see as well.

Thanks again.
BenTuras (OP)
Hero Member
*****
Offline Offline

Activity: 826
Merit: 1001



View Profile
August 06, 2013, 09:42:15 AM
 #4

Sure,

Below the mhw line add this line:

local mrj = string.format("%d(%1.2f%%)",rejected,(100*rejected/(accepted+rejected)));

Scroll down and change the line
     ['rejected'] = rejected, 
into
     ['rejected'] = mrj

After clearing the cache as described in the first message, refresh your browser page and admire your %rejected.

I am selling in stock OneStringMiner boards, based on the Bitfury chips. Have a look here: https://bitcointalk.org/index.php?topic=495536.0
mdbssm
Full Member
***
Offline Offline

Activity: 182
Merit: 100


View Profile
August 06, 2013, 05:19:06 PM
Last edit: August 06, 2013, 07:23:14 PM by mdbssm
 #5

Sure,

Below the mhw line add this line:

local mrj = string.format("%d(%1.2f%%)",rejected,(100*rejected/(accepted+rejected)));

Scroll down and change the line
     ['rejected'] = rejected,  
into
     ['rejected'] = mrj,  

After clearing the cache as described in the first message, refresh your browser page and admire your %rejected.


Fabulous!

Where this really helps is with the 4 module batch 3 avalons. With the stock PSU at least, it seems that the clue to too aggressive overclocking is a rising rejected share rate, not a HW error rate. Reject rate begins to rise, then it dies, or goes into a partial shutdown, hashing at a much reduced rate. The latter mode is harder to catch, as pools don't generally have alerts for reduced hash rate.

cryptograd
Member
**
Offline Offline

Activity: 112
Merit: 10



View Profile
August 06, 2013, 07:04:30 PM
 #6

can someone post screens of this patch in action


Liked something I said ->17ry6rrknqmQ2S1NRArzdrNMmG2Zk449AE
Most important bitcointalk post in history
https://bitcointalk.org/index.php?topic=120184.msg1381739#msg1381739
BenTuras (OP)
Hero Member
*****
Offline Offline

Activity: 826
Merit: 1001



View Profile
August 07, 2013, 05:33:51 AM
 #7

can someone post screens of this patch in action

I am selling in stock OneStringMiner boards, based on the Bitfury chips. Have a look here: https://bitcointalk.org/index.php?topic=495536.0
CoinHoarder
Legendary
*
Offline Offline

Activity: 1484
Merit: 1026

In Cryptocoins I Trust


View Profile
August 07, 2013, 05:46:05 AM
 #8

can someone post screens of this patch in action


I love you so much right now!  Cheesy Grin

Thanks for this!
BenTuras (OP)
Hero Member
*****
Offline Offline

Activity: 826
Merit: 1001



View Profile
August 07, 2013, 06:35:13 AM
 #9

can someone post screens of this patch in action


I love you so much right now!  Cheesy Grin

Thanks for this!
LOL *squeezes his buttocks together*

I am selling in stock OneStringMiner boards, based on the Bitfury chips. Have a look here: https://bitcointalk.org/index.php?topic=495536.0
sharky101
Member
**
Offline Offline

Activity: 108
Merit: 10


View Profile
August 07, 2013, 07:05:35 AM
 #10

Awesome. You going to merge this into the avalon build?

ASICMINERTUBE
   
  The Best $/Gh Bitcoin Miner So Far
   ►►►   DISCOVER NOW !!!   ◄◄◄
BenTuras (OP)
Hero Member
*****
Offline Offline

Activity: 826
Merit: 1001



View Profile
August 07, 2013, 07:44:46 AM
 #11

Awesome. You going to merge this into the avalon build?
I asked CKolivas to include it in his build.

I am selling in stock OneStringMiner boards, based on the Bitfury chips. Have a look here: https://bitcointalk.org/index.php?topic=495536.0
GandalfG
Sr. Member
****
Offline Offline

Activity: 259
Merit: 250


Dig your freedom


View Profile
August 12, 2013, 02:33:51 PM
 #12

Super !
Very useful. Thank You so much.


Want to say thanks? 16ragydppe9QFRVhrdwEUjgfMS7KCfEFGY
SolarSilver
Legendary
*
Offline Offline

Activity: 1112
Merit: 1000


View Profile
August 13, 2013, 05:57:44 AM
 #13

Awesome. You going to merge this into the avalon build?
I asked CKolivas to include it in his build.

it's not in 20130813 yet, perhaps a future update?
aneutronic
Full Member
***
Offline Offline

Activity: 175
Merit: 100


View Profile
August 13, 2013, 09:09:16 AM
 #14

Great mod, this helps a lot, thank you.      Cool
SolarSilver
Legendary
*
Offline Offline

Activity: 1112
Merit: 1000


View Profile
August 13, 2013, 10:00:27 AM
 #15

it's not in 20130813 yet, perhaps a future update?

OK, ckolivas does not like it:

https://bitcointalk.org/index.php?topic=140539.msg2923379#msg2923379
SolarSilver
Legendary
*
Offline Offline

Activity: 1112
Merit: 1000


View Profile
August 22, 2013, 07:42:09 AM
Last edit: October 18, 2013, 12:50:45 PM by SolarSilver
 #16


And now another modification has been made so that the HW% is visible in the interface

https://bitcointalk.org/index.php?topic=140539.msg2984460#msg2984460
aynstein
Full Member
***
Offline Offline

Activity: 128
Merit: 100

Fortune favors the bold, and sometimes the bald.


View Profile
November 08, 2013, 03:55:28 PM
 #17

any help is appreciated.
this shows on the status page

/usr/lib/lua/luci/dispatcher.lua:448: Failed to execute cbi dispatcher target for entry '/admin/status/cgminerstatus'.
The called action terminated with an exception:
/usr/lib/lua/luci/controller/cgminer.lua:32: bad argument #1 to 'floor' (number expected, got string)
stack traceback:
   [C]: in function 'assert'
   /usr/lib/lua/luci/dispatcher.lua:448: in function 'dispatch'
   /usr/lib/lua/luci/dispatcher.lua:195: in function </usr/lib/lua/luci/dispatcher.lua:194>

What did i do wrong?
below is my config mods ... (I pasted the file in using cat>/usr/....)

   for line in summary do
      local elapsed, mhsav, foundblocks, getworks, accepted, rejected, hw, utility, discarded, stale, getfailures, localwork, remotefailures, networkblocks, totalmh, wu, diffaccepted, diffrejected, diffstale, bestshare = line:match("Elapsed=(%d+),MHS av=([%d%.]+),Found Blocks=(%d+),Getworks=(%d+),Accepted=(%d+),Rejected=(%d+),Hardware Errors=(%d+),Utility=([%d%.]+),Discarded=(%d+),Stale=(%d+),Get Failures=(%d+),Local Work=(%d+),Remote Failures=(%d+),Network Blocks=(%d+),Total MH=([%d%.]+),Work Utility=([%d%.]+),Difficulty Accepted=([%d]+)%.%d+,Difficulty Rejected=([%d]+)%.%d+,Difficulty Stale=([%d]+)%.%d+,Best Share=(%d+)")
      if elapsed then
     local mhw = string.format("%d(%1.2f%%)",hw,(100*hw/(diffaccepted+diffrejected+hw)));
     local mrj = string.format("%d(%1.2f%%)",rejected,(100*rejected/(accepted+rejected)));
    local str
    local days
    local h
    local m
    local s = elapsed % 60;
   
...

    data[#data+1] = {
       ['elapsed'] = str,
       ['mhsav'] = num_commas(mhsav),
       ['foundblocks'] = foundblocks,
       ['getworks'] = num_commas(getworks),
       ['accepted'] = num_commas(accepted),
       ['hw'] = mhw,
       ['rejected'] = mrj,
       ['utility'] = num_commas(utility),
       ['discarded'] = num_commas(discarded),

AltaVista 4 Life!
BenTuras (OP)
Hero Member
*****
Offline Offline

Activity: 826
Merit: 1001



View Profile
November 08, 2013, 08:30:24 PM
 #18

I am not 100% sure, but it looks to me that you are applying the patch to a rather new version of the software and I am not sure if the patch is compatible with it.
I made the patch when version 20130703 was current.

Maybe you can post the complete script with linenumbers and make the lines you changed bold ?

I am selling in stock OneStringMiner boards, based on the Bitfury chips. Have a look here: https://bitcointalk.org/index.php?topic=495536.0
aynstein
Full Member
***
Offline Offline

Activity: 128
Merit: 100

Fortune favors the bold, and sometimes the bald.


View Profile
November 09, 2013, 02:47:03 AM
 #19

bingo, you got it. I thought it would be nice to have the rejects in %. looks like I am missing something in the way this script works... I will post the full file when I get home!

AltaVista 4 Life!
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!