|
|
@ -756,12 +756,25 @@ static void workio_cmd_free(struct workio_cmd *wc) |
|
|
|
free(wc); |
|
|
|
free(wc); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static void kill_work(void) |
|
|
|
static void disable_curses(void) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (curses_active) { |
|
|
|
|
|
|
|
curses_active = false; |
|
|
|
|
|
|
|
delwin(logwin); |
|
|
|
|
|
|
|
delwin(statuswin); |
|
|
|
|
|
|
|
delwin(mainwin); |
|
|
|
|
|
|
|
endwin(); |
|
|
|
|
|
|
|
refresh(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void kill_work(void) |
|
|
|
{ |
|
|
|
{ |
|
|
|
struct workio_cmd *wc; |
|
|
|
struct workio_cmd *wc; |
|
|
|
struct thr_info *thr; |
|
|
|
struct thr_info *thr; |
|
|
|
unsigned int i; |
|
|
|
unsigned int i; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
disable_curses(); |
|
|
|
applog(LOG_INFO, "Received kill message"); |
|
|
|
applog(LOG_INFO, "Received kill message"); |
|
|
|
|
|
|
|
|
|
|
|
/* Kill the watchdog thread */ |
|
|
|
/* Kill the watchdog thread */ |
|
|
@ -796,19 +809,6 @@ static void kill_work(void) |
|
|
|
applog(LOG_ERR, "Failed to tq_push work in kill_work"); |
|
|
|
applog(LOG_ERR, "Failed to tq_push work in kill_work"); |
|
|
|
exit (1); |
|
|
|
exit (1); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static void disable_curses(void) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (curses_active) { |
|
|
|
|
|
|
|
curses_active = false; |
|
|
|
|
|
|
|
delwin(logwin); |
|
|
|
|
|
|
|
delwin(statuswin); |
|
|
|
|
|
|
|
delwin(mainwin); |
|
|
|
|
|
|
|
endwin(); |
|
|
|
|
|
|
|
refresh(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static void sighandler(int sig) |
|
|
|
static void sighandler(int sig) |
|
|
@ -2004,11 +2004,13 @@ static void print_summary(void) |
|
|
|
printf("\nSummary of runtime statistics:\n\n"); |
|
|
|
printf("\nSummary of runtime statistics:\n\n"); |
|
|
|
printf("Started at %s\n", datestamp); |
|
|
|
printf("Started at %s\n", datestamp); |
|
|
|
printf("Runtime: %d hrs : %d mins : %d secs\n", hours, mins, secs); |
|
|
|
printf("Runtime: %d hrs : %d mins : %d secs\n", hours, mins, secs); |
|
|
|
|
|
|
|
if (total_secs) |
|
|
|
printf("Average hashrate: %.1f Megahash/s\n", total_mhashes_done / total_secs); |
|
|
|
printf("Average hashrate: %.1f Megahash/s\n", total_mhashes_done / total_secs); |
|
|
|
printf("Queued work requests: %d\n", getwork_requested); |
|
|
|
printf("Queued work requests: %d\n", getwork_requested); |
|
|
|
printf("Share submissions: %d\n", accepted + rejected); |
|
|
|
printf("Share submissions: %d\n", accepted + rejected); |
|
|
|
printf("Accepted shares: %d\n", accepted); |
|
|
|
printf("Accepted shares: %d\n", accepted); |
|
|
|
printf("Rejected shares: %d\n", rejected); |
|
|
|
printf("Rejected shares: %d\n", rejected); |
|
|
|
|
|
|
|
if (accepted || rejected) |
|
|
|
printf("Reject ratio: %.1f\n", (double)(rejected * 100) / (double)(accepted + rejected)); |
|
|
|
printf("Reject ratio: %.1f\n", (double)(rejected * 100) / (double)(accepted + rejected)); |
|
|
|
printf("Hardware errors: %d\n", hw_errors); |
|
|
|
printf("Hardware errors: %d\n", hw_errors); |
|
|
|
printf("Efficiency (accepted / queued): %.0f%%\n", efficiency); |
|
|
|
printf("Efficiency (accepted / queued): %.0f%%\n", efficiency); |
|
|
@ -2332,7 +2334,7 @@ int main (int argc, char *argv[]) |
|
|
|
gettimeofday(&total_tv_end, NULL); |
|
|
|
gettimeofday(&total_tv_end, NULL); |
|
|
|
curl_global_cleanup(); |
|
|
|
curl_global_cleanup(); |
|
|
|
disable_curses(); |
|
|
|
disable_curses(); |
|
|
|
if (!opt_quiet) |
|
|
|
if (!opt_quiet && successful_connect) |
|
|
|
print_summary(); |
|
|
|
print_summary(); |
|
|
|
|
|
|
|
|
|
|
|
if (gpu_threads) |
|
|
|
if (gpu_threads) |
|
|
|