Browse Source

Include count of working devices/processors in totals statline

Luke Dashjr 12 years ago
parent
commit
51775a8905
2 changed files with 16 additions and 5 deletions
  1. 2 2
      README
  2. 14 3
      miner.c

+ 2 - 2
README

@@ -413,10 +413,10 @@ U  is Utility defined as the number of shares / minute
 BS is the all time Best Share difficulty you've found
 
 The totals line shows the following:
- (32)   75.0C | 171.3/170.8/171.2Gh/s | A:729 R:8+0(.01%) HW:0/.81%
+ 6/32   75.0C | 171.3/170.8/171.2Gh/s | A:729 R:8+0(.01%) HW:0/.81%
 
 Each column is as follows:
-  The number of processors registered with BFGMiner
+  The number of devices and processors currently mining
   Hottest temperature reported by any processor
   5 second exponentially decaying average hash rate
   An all time average hash rate

+ 14 - 3
miner.c

@@ -6386,17 +6386,28 @@ static void hashmeter(int thr_id, struct timeval *diff,
 	if (curses_active_locked()) {
 		float temp = 0;
 		struct cgpu_info *proc;
-		int i;
-		
-		sprintf(statusline, "(%d)    ", total_devices);
+		int i, working_devs = 0, working_procs = 0;
 		
 		// Find the highest temperature of all processors
 		for (i = 0; i < total_devices; ++i)
 		{
 			proc = get_devices(i);
+			
 			if (proc->temp > temp)
 				temp = proc->temp;
+			
+			if (likely(proc->status == LIFE_WELL && proc->deven == DEV_ENABLED && proc->rolling > .1))
+			{
+				++working_procs;
+				if (proc->device == proc)
+					++working_devs;
+			}
 		}
+		
+		if (working_devs == working_procs)
+			sprintf(statusline, "%d      ", working_devs);
+		else
+			sprintf(statusline, "%d/%d    ", working_devs, working_procs);
 		if (temp > 0.)
 			sprintf(&statusline[7], "%4.1fC | ", temp);
 		else