From 686c10c40ef1e31591c1bb98ed67a64f60f25aba Mon Sep 17 00:00:00 2001 From: Noel Maersk Date: Tue, 18 Feb 2014 21:33:39 +0200 Subject: [PATCH] pool: LOG_DEBUG messages in watchpool_thread(). --- sgminer.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/sgminer.c b/sgminer.c index c36985d8..017dc287 100644 --- a/sgminer.c +++ b/sgminer.c @@ -7121,6 +7121,7 @@ static void *watchpool_thread(void __maybe_unused *userdata) /* Get a rolling utility per pool over 10 mins */ if (intervals > 19) { + applog(LOG_DEBUG, "Getting rolling utility for %s", pool->poolname); int shares = pool->diff1 - pool->last_shares; pool->last_shares = pool->diff1; @@ -7128,18 +7129,22 @@ static void *watchpool_thread(void __maybe_unused *userdata) pool->shares = pool->utility; } - if (pool->state == POOL_DISABLED) + if (pool->state == POOL_DISABLED) { + applog(LOG_DEBUG, "Skipping disabled %s", pool->poolname); continue; + } /* Don't start testing any pools if the test threads * from startup are still doing their first attempt. */ if (unlikely(pool->testing)) { + applog(LOG_DEBUG, "Testing %s", pool->poolname); pthread_join(pool->test_thread, NULL); pool->testing = false; } /* Test pool is idle once every minute */ if (pool->idle && now.tv_sec - pool->tv_idle.tv_sec > 30) { + applog(LOG_DEBUG, "Testing idle %s", pool->poolname); cgtime(&pool->tv_idle); if (pool_active(pool, true) && pool_tclear(pool, &pool->idle)) pool_resus(pool); @@ -7156,8 +7161,10 @@ static void *watchpool_thread(void __maybe_unused *userdata) } } - if (current_pool()->idle) + if (current_pool()->idle) { + applog(LOG_DEBUG, "%s is idle, switching pools", current_pool()->poolname); switch_pools(NULL); + } if (pool_strategy == POOL_ROTATE && now.tv_sec - rotate_tv.tv_sec > 60 * opt_rotate_period) { cgtime(&rotate_tv);