Simplify output code and remove HW errors from CPU stats.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
diff --git a/main.c b/main.c
index c54e13b..55adcbc 100644
--- a/main.c
+++ b/main.c
@@ -1350,26 +1350,19 @@ static void curses_print_status(int thr_id)
wmove(statuswin, gpucursor + gpu, 0);
+ wprintw(statuswin, " GPU %d: ", gpu);
if (cgpu->status == LIFE_DEAD)
- wprintw(statuswin, " GPU %d: [DEAD / %.1f Mh/s] [Q:%d A:%d R:%d HW:%d E:%.0f%% U:%.2f/m]",
- gpu, cgpu->total_mhashes / total_secs,
- cgpu->getworks, cgpu->accepted, cgpu->rejected, cgpu->hw_errors,
- cgpu->efficiency, cgpu->utility);
+ wprintw(statuswin, "[DEAD ");
else if (cgpu->status == LIFE_SICK)
- wprintw(statuswin, " GPU %d: [SICK / %.1f Mh/s] [Q:%d A:%d R:%d HW:%d E:%.0f%% U:%.2f/m]",
- gpu, cgpu->total_mhashes / total_secs,
- cgpu->getworks, cgpu->accepted, cgpu->rejected, cgpu->hw_errors,
- cgpu->efficiency, cgpu->utility);
+ wprintw(statuswin, "[SICK ");
else if (!gpu_devices[gpu])
- wprintw(statuswin, " GPU %d: [DISABLED / %.1f Mh/s] [Q:%d A:%d R:%d HW:%d E:%.0f%% U:%.2f/m]",
- gpu, cgpu->total_mhashes / total_secs,
- cgpu->getworks, cgpu->accepted, cgpu->rejected, cgpu->hw_errors,
- cgpu->efficiency, cgpu->utility);
+ wprintw(statuswin, "[DISABLED ");
else
- wprintw(statuswin, " GPU %d: [%.1f / %.1f Mh/s] [Q:%d A:%d R:%d HW:%d E:%.0f%% U:%.2f/m]",
- gpu, cgpu->rolling, cgpu->total_mhashes / total_secs,
- cgpu->getworks, cgpu->accepted, cgpu->rejected, cgpu->hw_errors,
- cgpu->efficiency, cgpu->utility);
+ wprintw(statuswin, "[%.1f ", cgpu->rolling);
+ wprintw(statuswin, "/ %.1f Mh/s] [Q:%d A:%d R:%d HW:%d E:%.0f%% U:%.2f/m]",
+ cgpu->total_mhashes / total_secs,
+ cgpu->getworks, cgpu->accepted, cgpu->rejected, cgpu->hw_errors,
+ cgpu->efficiency, cgpu->utility);
wclrtoeol(statuswin);
} else if (thr_id >= gpu_threads) {
int cpu = dev_from_id(thr_id);
@@ -1380,9 +1373,9 @@ static void curses_print_status(int thr_id)
wmove(statuswin, cpucursor + cpu, 0);
- wprintw(statuswin, " CPU %d: [%.1f / %.1f Mh/s] [Q:%d A:%d R:%d HW:%d E:%.0f%% U:%.2f/m]",
+ wprintw(statuswin, " CPU %d: [%.1f / %.1f Mh/s] [Q:%d A:%d R:%d E:%.0f%% U:%.2f/m]",
cpu, cgpu->rolling, cgpu->total_mhashes / total_secs,
- cgpu->getworks, cgpu->accepted, cgpu->rejected, cgpu->hw_errors,
+ cgpu->getworks, cgpu->accepted, cgpu->rejected,
cgpu->efficiency, cgpu->utility);
wclrtoeol(statuswin);
}