|
|
@ -2474,7 +2474,7 @@ static void *statsupdate(void *arg) |
|
|
|
ghs1440 = stats.dsps1440 * nonces / bias; |
|
|
|
ghs1440 = stats.dsps1440 * nonces / bias; |
|
|
|
suffix_string(ghs1440, suffix1440, 16, 0); |
|
|
|
suffix_string(ghs1440, suffix1440, 16, 0); |
|
|
|
|
|
|
|
|
|
|
|
snprintf(fname, 511, "%s/pool.status", ckp->logdir); |
|
|
|
snprintf(fname, 511, "%s/pool/pool.status", ckp->logdir); |
|
|
|
fp = fopen(fname, "we"); |
|
|
|
fp = fopen(fname, "we"); |
|
|
|
if (unlikely(!fp)) |
|
|
|
if (unlikely(!fp)) |
|
|
|
LOGERR("Failed to fopen %s", fname); |
|
|
|
LOGERR("Failed to fopen %s", fname); |
|
|
@ -2483,7 +2483,7 @@ static void *statsupdate(void *arg) |
|
|
|
"runtime", diff.tv_sec, |
|
|
|
"runtime", diff.tv_sec, |
|
|
|
"Users", stats.users, |
|
|
|
"Users", stats.users, |
|
|
|
"Workers", stats.workers); |
|
|
|
"Workers", stats.workers); |
|
|
|
s = json_dumps(val, JSON_NO_UTF8); |
|
|
|
s = json_dumps(val, JSON_NO_UTF8 | JSON_PRESERVE_ORDER); |
|
|
|
json_decref(val); |
|
|
|
json_decref(val); |
|
|
|
LOGNOTICE("Pool:%s", s); |
|
|
|
LOGNOTICE("Pool:%s", s); |
|
|
|
fprintf(fp, "%s\n", s); |
|
|
|
fprintf(fp, "%s\n", s); |
|
|
@ -2496,7 +2496,7 @@ static void *statsupdate(void *arg) |
|
|
|
"hashrate1hr", suffix60, |
|
|
|
"hashrate1hr", suffix60, |
|
|
|
"hashrate6hr", suffix360, |
|
|
|
"hashrate6hr", suffix360, |
|
|
|
"hashrate1d", suffix1440); |
|
|
|
"hashrate1d", suffix1440); |
|
|
|
s = json_dumps(val, JSON_NO_UTF8); |
|
|
|
s = json_dumps(val, JSON_NO_UTF8 | JSON_PRESERVE_ORDER); |
|
|
|
json_decref(val); |
|
|
|
json_decref(val); |
|
|
|
LOGNOTICE("Pool:%s", s); |
|
|
|
LOGNOTICE("Pool:%s", s); |
|
|
|
fprintf(fp, "%s\n", s); |
|
|
|
fprintf(fp, "%s\n", s); |
|
|
@ -2507,7 +2507,7 @@ static void *statsupdate(void *arg) |
|
|
|
"SPS5m", sps5, |
|
|
|
"SPS5m", sps5, |
|
|
|
"SPS15m", sps15, |
|
|
|
"SPS15m", sps15, |
|
|
|
"SPS1h", sps60); |
|
|
|
"SPS1h", sps60); |
|
|
|
s = json_dumps(val, JSON_NO_UTF8); |
|
|
|
s = json_dumps(val, JSON_NO_UTF8 | JSON_PRESERVE_ORDER); |
|
|
|
json_decref(val); |
|
|
|
json_decref(val); |
|
|
|
LOGNOTICE("Pool:%s", s); |
|
|
|
LOGNOTICE("Pool:%s", s); |
|
|
|
fprintf(fp, "%s\n", s); |
|
|
|
fprintf(fp, "%s\n", s); |
|
|
@ -2558,7 +2558,7 @@ static void *statsupdate(void *arg) |
|
|
|
"hashrate1d", suffix1440, |
|
|
|
"hashrate1d", suffix1440, |
|
|
|
"workers", instance->workers); |
|
|
|
"workers", instance->workers); |
|
|
|
|
|
|
|
|
|
|
|
snprintf(fname, 511, "%s/%s", ckp->logdir, instance->username); |
|
|
|
snprintf(fname, 511, "%s/users/%s", ckp->logdir, instance->username); |
|
|
|
fp = fopen(fname, "we"); |
|
|
|
fp = fopen(fname, "we"); |
|
|
|
if (unlikely(!fp)) { |
|
|
|
if (unlikely(!fp)) { |
|
|
|
LOGERR("Failed to fopen %s", fname); |
|
|
|
LOGERR("Failed to fopen %s", fname); |
|
|
|