Title: Modification to show HW% and rejected% on Avalon Cgminer Status page Post by: BenTuras on July 11, 2013, 02:14:49 PM 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% :) 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 ? Title: Re: Modification to show HW% on Avalon Cgminer Status page Post by: mdbssm on July 11, 2013, 04:28:29 PM 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). Title: Re: Modification to show HW% on Avalon Cgminer Status page Post by: mdbssm on August 06, 2013, 12:47:43 AM 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% :) 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. Title: Re: Modification to show HW% on Avalon Cgminer Status page Post by: BenTuras on August 06, 2013, 09:42:15 AM 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. Title: Re: Modification to show HW% on Avalon Cgminer Status page Post by: mdbssm on August 06, 2013, 05:19:06 PM 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. Title: Re: Modification to show HW% and rejected% on Avalon Cgminer Status page Post by: cryptograd on August 06, 2013, 07:04:30 PM can someone post screens of this patch in action
Title: Re: Modification to show HW% and rejected% on Avalon Cgminer Status page Post by: BenTuras on August 07, 2013, 05:33:51 AM can someone post screens of this patch in action http://img7.imageshack.us/img7/7974/qzl5.pngTitle: Re: Modification to show HW% and rejected% on Avalon Cgminer Status page Post by: CoinHoarder on August 07, 2013, 05:46:05 AM can someone post screens of this patch in action http://anonymouse.org/cgi-bin/anon-www.cgi/http://img7.imageshack.us/img7/7974/qzl5.pngI love you so much right now! :D ;D Thanks for this! Title: Re: Modification to show HW% and rejected% on Avalon Cgminer Status page Post by: BenTuras on August 07, 2013, 06:35:13 AM can someone post screens of this patch in action http://anonymouse.org/cgi-bin/anon-www.cgi/http://anonymouse.org/cgi-bin/anon-www.cgi/http://img7.imageshack.us/img7/7974/qzl5.pngI love you so much right now! :D ;D Thanks for this! Title: Re: Modification to show HW% and rejected% on Avalon Cgminer Status page Post by: sharky101 on August 07, 2013, 07:05:35 AM Awesome. You going to merge this into the avalon build?
Title: Re: Modification to show HW% and rejected% on Avalon Cgminer Status page Post by: BenTuras on August 07, 2013, 07:44:46 AM Awesome. You going to merge this into the avalon build? I asked CKolivas to include it in his build.Title: Re: Modification to show HW% and rejected% on Avalon Cgminer Status page Post by: GandalfG on August 12, 2013, 02:33:51 PM Super !
Very useful. Thank You so much. Title: Re: Modification to show HW% and rejected% on Avalon Cgminer Status page Post by: SolarSilver on August 13, 2013, 05:57:44 AM 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? Title: Re: Modification to show HW% and rejected% on Avalon Cgminer Status page Post by: aneutronic on August 13, 2013, 09:09:16 AM Great mod, this helps a lot, thank you. 8)
Title: Re: Modification to show HW% and rejected% on Avalon Cgminer Status page Post by: SolarSilver on August 13, 2013, 10:00:27 AM 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 Title: Re: Modification to show HW% and rejected% on Avalon Cgminer Status page Post by: SolarSilver on August 22, 2013, 07:42:09 AM 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 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 Title: Re: Modification to show HW% and rejected% on Avalon Cgminer Status page Post by: aynstein on November 08, 2013, 03:55:28 PM 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), Title: Re: Modification to show HW% and rejected% on Avalon Cgminer Status page Post by: BenTuras on November 08, 2013, 08:30:24 PM 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 ? Title: Re: Modification to show HW% and rejected% on Avalon Cgminer Status page Post by: aynstein on November 09, 2013, 02:47:03 AM 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!
|