Author

Topic: Modification to show HW% and rejected% on Avalon Cgminer Status page (Read 3177 times)

full member
Activity: 128
Merit: 100
Fortune favors the bold, and sometimes the bald.
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!
hero member
Activity: 826
Merit: 1001
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 ?
full member
Activity: 128
Merit: 100
Fortune favors the bold, and sometimes the bald.
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

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),
legendary
Activity: 1112
Merit: 1000
it's not in 20130813 yet, perhaps a future update?

OK, ckolivas does not like it:

https://bitcointalksearch.org/topic/m.2923379

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

https://bitcointalksearch.org/topic/m.2984460
legendary
Activity: 1112
Merit: 1000
full member
Activity: 175
Merit: 100
Great mod, this helps a lot, thank you.      Cool
legendary
Activity: 1112
Merit: 1000
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?
sr. member
Activity: 259
Merit: 250
Dig your freedom
Super !
Very useful. Thank You so much.

hero member
Activity: 826
Merit: 1001
Awesome. You going to merge this into the avalon build?
I asked CKolivas to include it in his build.
member
Activity: 108
Merit: 10
Awesome. You going to merge this into the avalon build?
hero member
Activity: 826
Merit: 1001
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*
legendary
Activity: 1484
Merit: 1026
In Cryptocoins I Trust
can someone post screens of this patch in action


I love you so much right now!  Cheesy Grin

Thanks for this!
hero member
Activity: 826
Merit: 1001
member
Activity: 112
Merit: 10
can someone post screens of this patch in action

full member
Activity: 182
Merit: 100
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.

hero member
Activity: 826
Merit: 1001
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.
full member
Activity: 182
Merit: 100
I have a small modification to show the HW% on the Cgminer Status page:

ssh into your unit with ssh -l root
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.
full member
Activity: 182
Merit: 100
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).
hero member
Activity: 826
Merit: 1001
I have a small modification to show the HW% on the Cgminer Status page:

ssh into your unit with ssh -l root
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 ?
Jump to: