Browse Source

Rearrange summary lines and include count of active submissions in progress

Luke Dashjr 13 years ago
parent
commit
6adf9f6807
2 changed files with 22 additions and 10 deletions
  1. 5 4
      README
  2. 17 6
      miner.c

+ 5 - 4
README

@@ -406,7 +406,7 @@ dedicated to this program,
 	http://forum.bitcoin.org/index.php?topic=28402.0
 	http://forum.bitcoin.org/index.php?topic=28402.0
 
 
 The output line shows the following:
 The output line shows the following:
-5s:1713.6 avg:1707.8 u:1710.2 Mh/s | A:729  R:8  HW:0  E:242%  U:22.53/m
+5s:1713.6 avg:1707.8 u:1710.2 Mh/s | A:729 R:8 S:0 HW:0 E:242% U:22.53/m
 
 
 Each column is as follows:
 Each column is as follows:
 5s:  A 5 second exponentially decaying average hash rate
 5s:  A 5 second exponentially decaying average hash rate
@@ -414,6 +414,7 @@ avg: An all time average hash rate
 u:   An all time average hash rate based on actual accepted shares
 u:   An all time average hash rate based on actual accepted shares
 A:   The number of Accepted shares
 A:   The number of Accepted shares
 R:   The number of Rejected shares
 R:   The number of Rejected shares
+S:   Stale shares discarded (not submitted so don't count as rejects)
 HW:  The number of HardWare errors
 HW:  The number of HardWare errors
 E:   The Efficiency defined as number of shares returned / work item
 E:   The Efficiency defined as number of shares returned / work item
 U:   The Utility defined as the number of shares / minute
 U:   The Utility defined as the number of shares / minute
@@ -432,16 +433,16 @@ The number of hardware erorrs
 The utility defines as the number of shares / minute
 The utility defines as the number of shares / minute
 
 
 The BFGMiner status line shows:
 The BFGMiner status line shows:
- TQ: 1  ST: 1  SS: 0  DW: 0  NB: 1  GW: 301  LW: 8  GF: 1  RF: 1
+ TQ: 1  ST: 1  DW: 0  GW: 301  LW: 8  GF: 1  NB: 1  AS: 0  RF: 1
 
 
 TQ is Total Queued work items.
 TQ is Total Queued work items.
 ST is STaged work items (ready to use).
 ST is STaged work items (ready to use).
-SS is Stale Shares discarded (detected and not submitted so don't count as rejects)
 DW is Discarded Work items (work from block no longer valid to work on)
 DW is Discarded Work items (work from block no longer valid to work on)
-NB is New Blocks detected on the network
 GW is GetWork requested (work items from pools)
 GW is GetWork requested (work items from pools)
 LW is Locally generated Work items
 LW is Locally generated Work items
 GF is Getwork Fail Occasions (server slow to provide work)
 GF is Getwork Fail Occasions (server slow to provide work)
+NB is New Blocks detected on the network
+AS is Active Submissions (shares in the process of submitting)
 RF is Remote Fail occasions (server slow to accept work)
 RF is Remote Fail occasions (server slow to accept work)
 
 
 NOTE: Running intensities above 9 with current hardware is likely to only
 NOTE: Running intensities above 9 with current hardware is likely to only

+ 17 - 6
miner.c

@@ -240,7 +240,7 @@ static struct timeval miner_started;
 pthread_mutex_t control_lock;
 pthread_mutex_t control_lock;
 
 
 static pthread_mutex_t submitting_lock;
 static pthread_mutex_t submitting_lock;
-static int submitting;
+static int submitting, total_submitting;
 static struct list_head submit_waiting;
 static struct list_head submit_waiting;
 int submit_waiting_notifier[2];
 int submit_waiting_notifier[2];
 
 
@@ -2148,10 +2148,14 @@ static void curses_print_status(void)
 	mvwhline(statuswin, 1, 0, '-', 80);
 	mvwhline(statuswin, 1, 0, '-', 80);
 	mvwprintw(statuswin, 2, 0, " %s", statusline);
 	mvwprintw(statuswin, 2, 0, " %s", statusline);
 	wclrtoeol(statuswin);
 	wclrtoeol(statuswin);
-	mvwprintw(statuswin, 3, 0, " TQ: %d  ST: %d  SS: %d  DW: %d  NB: %d  GW: %d  LW: %d  GF: %d  RF: %d",
-		global_queued(), total_staged(), total_stale, total_discarded, new_blocks,
+	mvwprintw(statuswin, 3, 0, " TQ: %d  ST: %d  DW: %d  GW: %d  LW: %d  GF: %d  NB: %d  AS: %d  RF: %d",
+		global_queued(), total_staged(), total_discarded,
 		total_getworks,
 		total_getworks,
-		local_work, total_go, total_ro);
+		local_work,
+		total_go,
+		new_blocks,
+		total_submitting,
+		total_ro);
 	wclrtoeol(statuswin);
 	wclrtoeol(statuswin);
 	if ((pool_strategy == POOL_LOADBALANCE  || pool_strategy == POOL_BALANCE) && total_pools > 1) {
 	if ((pool_strategy == POOL_LOADBALANCE  || pool_strategy == POOL_BALANCE) && total_pools > 1) {
 		mvwprintw(statuswin, 4, 0, " Connected to multiple pools with%s LP",
 		mvwprintw(statuswin, 4, 0, " Connected to multiple pools with%s LP",
@@ -3827,6 +3831,7 @@ static void *submit_work_thread(void *userdata)
 		if (sws->s)
 		if (sws->s)
 			write_sws = sws;
 			write_sws = sws;
 		++wip;
 		++wip;
+		++total_submitting;
 	}
 	}
 
 
 	fd_set rfds, wfds, efds;
 	fd_set rfds, wfds, efds;
@@ -3852,6 +3857,7 @@ static void *submit_work_thread(void *userdata)
 					write_sws = sws;
 					write_sws = sws;
 				}
 				}
 				++wip;
 				++wip;
+				++total_submitting;
 			}
 			}
 		}
 		}
 		if (!wip)
 		if (!wip)
@@ -3922,6 +3928,7 @@ static void *submit_work_thread(void *userdata)
 				json_t *val = json_rpc_call_completed(cm->easy_handle, cm->data.result, false, NULL, &sws);
 				json_t *val = json_rpc_call_completed(cm->easy_handle, cm->data.result, false, NULL, &sws);
 				if (submit_upstream_work_completed(sws->work, sws->resubmit, &sws->tv_submit, val) || !retry_submission(sws)) {
 				if (submit_upstream_work_completed(sws->work, sws->resubmit, &sws->tv_submit, val) || !retry_submission(sws)) {
 					--wip;
 					--wip;
+					--total_submitting;
 					struct pool *pool = sws->work->pool;
 					struct pool *pool = sws->work->pool;
 					if (pool->sws_waiting_on_curl) {
 					if (pool->sws_waiting_on_curl) {
 						pool->sws_waiting_on_curl->ce = sws->ce;
 						pool->sws_waiting_on_curl->ce = sws->ce;
@@ -5481,12 +5488,13 @@ static void hashmeter(int thr_id, struct timeval *diff,
 		utility_to_hashrate(total_diff_accepted / (total_secs ?: 1) * 60),
 		utility_to_hashrate(total_diff_accepted / (total_secs ?: 1) * 60),
 		H2B_SPACED);
 		H2B_SPACED);
 
 
-	sprintf(statusline, "%s%ds:%s avg:%s u:%s | A:%d  R:%d  HW:%d  E:%.0f%%  U:%.1f/m",
+	sprintf(statusline, "%s%ds:%s avg:%s u:%s | A:%d R:%d S:%d HW:%d E:%.0f%% U:%.1f/m",
 		want_per_device_stats ? "ALL " : "",
 		want_per_device_stats ? "ALL " : "",
 		opt_log_interval,
 		opt_log_interval,
 		cHr, aHr,
 		cHr, aHr,
 		uHr,
 		uHr,
-		total_accepted, total_rejected, hw_errors, efficiency, utility);
+		total_accepted, total_rejected, total_stale,
+		hw_errors, efficiency, utility);
 
 
 
 
 	local_mhashes_done = 0;
 	local_mhashes_done = 0;
@@ -5600,6 +5608,8 @@ fishy:
 			applog(LOG_NOTICE, "Rejected untracked stratum share from pool %d", pool->pool_no);
 			applog(LOG_NOTICE, "Rejected untracked stratum share from pool %d", pool->pool_no);
 		goto out;
 		goto out;
 	}
 	}
+	else
+		--total_submitting;
 	stratum_share_result(val, res_val, err_val, sshare);
 	stratum_share_result(val, res_val, err_val, sshare);
 	free_work(sshare->work);
 	free_work(sshare->work);
 	free(sshare);
 	free(sshare);
@@ -5633,6 +5643,7 @@ static void clear_stratum_shares(struct pool *pool)
 
 
 	mutex_lock(&sshare_lock);
 	mutex_lock(&sshare_lock);
 	HASH_ITER(hh, stratum_shares, sshare, tmpshare) {
 	HASH_ITER(hh, stratum_shares, sshare, tmpshare) {
+		--total_submitting;
 		if (sshare->work->pool == pool) {
 		if (sshare->work->pool == pool) {
 			HASH_DEL(stratum_shares, sshare);
 			HASH_DEL(stratum_shares, sshare);
 			free_work(sshare->work);
 			free_work(sshare->work);