selaux / miner-dashboard

Node.js based app to show the current status of your miner in a browser.
36 stars 15 forks source link

Possible to display instantaneous hashrate vs average hashrate? #36

Closed Coinucopia closed 10 years ago

Coinucopia commented 10 years ago

First off, thank you again for all your help with this. If I shouldn't be posting small questions like this here, please let me know and I will stop. Feel free to delete this if it shouldn't be here.

So, looking at miner.hbs I see that it calls {{hashrate avgHashrate}} where it publishes the "Hashrate:".

Is it possible to not pull the average but the current hashrate that the miner is at, at that very moment?

Thank you again!

selaux commented 10 years ago

Sorry for the late answer, the displayed hashrate is not the average hashrate but the average hashrate over the last n seconds, where n is your log interval (I think the default is something around 5s).

jedimstr commented 10 years ago

5 seconds for CGMiner 20 seconds (configurable in conf parameters) for recent versions of BFGMiner

Coinucopia commented 10 years ago

I'm using cgminer 3.7.3 (kalroth's version) and it seems to only report what is the OVERALL average shown on the miner, rather than the 5s average.

Is there any way to have it show the 5s average instead?

Currently, whatever the average is for the total time the miner has been running is what is displayed.

selaux commented 10 years ago

How do you come to this conclusion? As I see it in the source code it at least uses different data sources for the two values (MHS av and MHS 5s). See code.

selaux commented 10 years ago

I'm not quite sure if I was right, now after implementing charts the chart looks awfully flat, maybe I need to have another look at it or talk to the cgminer/bfgminer developers.

jedimstr commented 10 years ago

The charts definitely look pretty flat... I have multiple instances/miners with various versions of CGMiner and BFGMiner if you need help diagnosing.

Scrypt Miner running CGMiner 3.2.1: cgminer

Mac running BFGMiner 3.10.0: bfgminer

Antminer S1 with the CGMiner 4.2.0: antminer

selaux commented 10 years ago

Sorry for dismissing the issue first, I thought I implemented the loginterval logic for all hashrates. But in fact I only did it for the device hashrates. This should be fixed now. :flushed: