|
@@ -2018,7 +2018,7 @@ static void get_statline(char *buf, struct cgpu_info *cgpu)
|
|
|
char displayed_hashes[16], displayed_rolling[16];
|
|
char displayed_hashes[16], displayed_rolling[16];
|
|
|
uint64_t dh64, dr64;
|
|
uint64_t dh64, dr64;
|
|
|
struct timeval now;
|
|
struct timeval now;
|
|
|
- double dev_runtime;
|
|
|
|
|
|
|
+ double dev_runtime, wu;
|
|
|
|
|
|
|
|
if (cgpu->dev_start_tv.tv_sec == 0)
|
|
if (cgpu->dev_start_tv.tv_sec == 0)
|
|
|
dev_runtime = total_secs;
|
|
dev_runtime = total_secs;
|
|
@@ -2030,6 +2030,8 @@ static void get_statline(char *buf, struct cgpu_info *cgpu)
|
|
|
if (dev_runtime < 1.0)
|
|
if (dev_runtime < 1.0)
|
|
|
dev_runtime = 1.0;
|
|
dev_runtime = 1.0;
|
|
|
|
|
|
|
|
|
|
+ wu = cgpu->diff1 / dev_runtime * 60.0;
|
|
|
|
|
+
|
|
|
dh64 = (double)cgpu->total_mhashes / dev_runtime * 1000000ull;
|
|
dh64 = (double)cgpu->total_mhashes / dev_runtime * 1000000ull;
|
|
|
dr64 = (double)cgpu->rolling * 1000000ull;
|
|
dr64 = (double)cgpu->rolling * 1000000ull;
|
|
|
suffix_string(dh64, displayed_hashes, 4);
|
|
suffix_string(dh64, displayed_hashes, 4);
|
|
@@ -2037,14 +2039,14 @@ static void get_statline(char *buf, struct cgpu_info *cgpu)
|
|
|
|
|
|
|
|
sprintf(buf, "%s%d ", cgpu->drv->name, cgpu->device_id);
|
|
sprintf(buf, "%s%d ", cgpu->drv->name, cgpu->device_id);
|
|
|
cgpu->drv->get_statline_before(buf, cgpu);
|
|
cgpu->drv->get_statline_before(buf, cgpu);
|
|
|
- tailsprintf(buf, "(%ds):%s (avg):%sh/s | A:%d R:%d HW:%d U:%.1f/m",
|
|
|
|
|
|
|
+ tailsprintf(buf, "(%ds):%s (avg):%sh/s | DA:%.0f DR:%.0f HW:%d WU:%.1f/m",
|
|
|
opt_log_interval,
|
|
opt_log_interval,
|
|
|
displayed_rolling,
|
|
displayed_rolling,
|
|
|
displayed_hashes,
|
|
displayed_hashes,
|
|
|
- cgpu->accepted,
|
|
|
|
|
- cgpu->rejected,
|
|
|
|
|
|
|
+ cgpu->diff_accepted,
|
|
|
|
|
+ cgpu->diff_rejected,
|
|
|
cgpu->hw_errors,
|
|
cgpu->hw_errors,
|
|
|
- cgpu->utility);
|
|
|
|
|
|
|
+ wu);
|
|
|
cgpu->drv->get_statline(buf, cgpu);
|
|
cgpu->drv->get_statline(buf, cgpu);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -2102,16 +2104,22 @@ static void adj_width(int var, int *length)
|
|
|
(*length)++;
|
|
(*length)++;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+static void adj_fwidth(float var, int *length)
|
|
|
|
|
+{
|
|
|
|
|
+ if ((int)(log10(var) + 1) > *length)
|
|
|
|
|
+ (*length)++;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
static int dev_width;
|
|
static int dev_width;
|
|
|
|
|
|
|
|
static void curses_print_devstatus(struct cgpu_info *cgpu, int count)
|
|
static void curses_print_devstatus(struct cgpu_info *cgpu, int count)
|
|
|
{
|
|
{
|
|
|
- static int awidth = 1, rwidth = 1, hwwidth = 1, uwidth = 1;
|
|
|
|
|
|
|
+ static int dawidth = 1, drwidth = 1, hwwidth = 1, wuwidth = 1;
|
|
|
char logline[256];
|
|
char logline[256];
|
|
|
char displayed_hashes[16], displayed_rolling[16];
|
|
char displayed_hashes[16], displayed_rolling[16];
|
|
|
uint64_t dh64, dr64;
|
|
uint64_t dh64, dr64;
|
|
|
struct timeval now;
|
|
struct timeval now;
|
|
|
- double dev_runtime;
|
|
|
|
|
|
|
+ double dev_runtime, wu;
|
|
|
|
|
|
|
|
if (opt_compact)
|
|
if (opt_compact)
|
|
|
return;
|
|
return;
|
|
@@ -2133,6 +2141,7 @@ static void curses_print_devstatus(struct cgpu_info *cgpu, int count)
|
|
|
dev_runtime = 1.0;
|
|
dev_runtime = 1.0;
|
|
|
|
|
|
|
|
cgpu->utility = cgpu->accepted / dev_runtime * 60;
|
|
cgpu->utility = cgpu->accepted / dev_runtime * 60;
|
|
|
|
|
+ wu = cgpu->diff1 / dev_runtime * 60;
|
|
|
|
|
|
|
|
wmove(statuswin,devcursor + count, 0);
|
|
wmove(statuswin,devcursor + count, 0);
|
|
|
wprintw(statuswin, " %s %*d: ", cgpu->drv->name, dev_width, cgpu->device_id);
|
|
wprintw(statuswin, " %s %*d: ", cgpu->drv->name, dev_width, cgpu->device_id);
|
|
@@ -2160,17 +2169,17 @@ static void curses_print_devstatus(struct cgpu_info *cgpu, int count)
|
|
|
wprintw(statuswin, "REST ");
|
|
wprintw(statuswin, "REST ");
|
|
|
else
|
|
else
|
|
|
wprintw(statuswin, "%6s", displayed_rolling);
|
|
wprintw(statuswin, "%6s", displayed_rolling);
|
|
|
- adj_width(cgpu->accepted, &awidth);
|
|
|
|
|
- adj_width(cgpu->rejected, &rwidth);
|
|
|
|
|
|
|
+ adj_fwidth(cgpu->diff_accepted, &dawidth);
|
|
|
|
|
+ adj_fwidth(cgpu->diff_rejected, &drwidth);
|
|
|
adj_width(cgpu->hw_errors, &hwwidth);
|
|
adj_width(cgpu->hw_errors, &hwwidth);
|
|
|
- adj_width(cgpu->utility, &uwidth);
|
|
|
|
|
|
|
+ adj_width(wu, &wuwidth);
|
|
|
|
|
|
|
|
- wprintw(statuswin, "/%6sh/s | A:%*d R:%*d HW:%*d U:%*.2f/m",
|
|
|
|
|
|
|
+ wprintw(statuswin, "/%6sh/s | DA:%*.0f DR:%*d HW:%*d WU:%*.2f/m",
|
|
|
displayed_hashes,
|
|
displayed_hashes,
|
|
|
- awidth, cgpu->accepted,
|
|
|
|
|
- rwidth, cgpu->rejected,
|
|
|
|
|
|
|
+ dawidth, cgpu->diff_accepted,
|
|
|
|
|
+ drwidth, cgpu->rejected,
|
|
|
hwwidth, cgpu->hw_errors,
|
|
hwwidth, cgpu->hw_errors,
|
|
|
- uwidth + 3, cgpu->utility);
|
|
|
|
|
|
|
+ wuwidth + 3, wu);
|
|
|
|
|
|
|
|
logline[0] = '\0';
|
|
logline[0] = '\0';
|
|
|
cgpu->drv->get_statline(logline, cgpu);
|
|
cgpu->drv->get_statline(logline, cgpu);
|
|
@@ -4726,10 +4735,10 @@ static void hashmeter(int thr_id, struct timeval *diff,
|
|
|
suffix_string(dh64, displayed_hashes, 4);
|
|
suffix_string(dh64, displayed_hashes, 4);
|
|
|
suffix_string(dr64, displayed_rolling, 4);
|
|
suffix_string(dr64, displayed_rolling, 4);
|
|
|
|
|
|
|
|
- sprintf(statusline, "%s(%ds):%s (avg):%sh/s | A:%d R:%d HW:%d U:%.1f/m WU:%.1f/m",
|
|
|
|
|
|
|
+ sprintf(statusline, "%s(%ds):%s (avg):%sh/s | DA:%.0f DR:%.0f HW:%d U:%.1f/m WU:%.1f/m",
|
|
|
want_per_device_stats ? "ALL " : "",
|
|
want_per_device_stats ? "ALL " : "",
|
|
|
opt_log_interval, displayed_rolling, displayed_hashes,
|
|
opt_log_interval, displayed_rolling, displayed_hashes,
|
|
|
- total_accepted, total_rejected, hw_errors, utility,
|
|
|
|
|
|
|
+ total_diff_accepted, total_diff_rejected, hw_errors, utility,
|
|
|
total_diff1 / total_secs * 60);
|
|
total_diff1 / total_secs * 60);
|
|
|
|
|
|
|
|
local_mhashes_done = 0;
|
|
local_mhashes_done = 0;
|