mirror of
https://github.com/GOSTSec/sgminer
synced 2025-03-10 04:31:03 +00:00
api.c Report an OS string in config to help with device issues
This commit is contained in:
parent
6be50fab80
commit
8747a472f3
23
api.c
23
api.c
@ -184,6 +184,25 @@ static const char *DEVICECODE = ""
|
|||||||
#endif
|
#endif
|
||||||
"";
|
"";
|
||||||
|
|
||||||
|
static const char *OSINFO =
|
||||||
|
#if defined(__linux)
|
||||||
|
"Linux";
|
||||||
|
#else
|
||||||
|
#if defined(__APPLE__)
|
||||||
|
"Apple";
|
||||||
|
#else
|
||||||
|
#if defined (WIN32)
|
||||||
|
"Windows";
|
||||||
|
#else
|
||||||
|
#if defined(unix)
|
||||||
|
"Unix";
|
||||||
|
#else
|
||||||
|
"Unknown";
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#define _DEVS "DEVS"
|
#define _DEVS "DEVS"
|
||||||
#define _POOLS "POOLS"
|
#define _POOLS "POOLS"
|
||||||
#define _SUMMARY "SUMMARY"
|
#define _SUMMARY "SUMMARY"
|
||||||
@ -658,9 +677,9 @@ static void minerconfig(__maybe_unused SOCKETTYPE c, __maybe_unused char *param,
|
|||||||
strcpy(io_buffer, message(MSG_MINECON, 0, NULL, isjson));
|
strcpy(io_buffer, message(MSG_MINECON, 0, NULL, isjson));
|
||||||
|
|
||||||
if (isjson)
|
if (isjson)
|
||||||
sprintf(buf, "," JSON_MINECON "{\"GPU Count\":%d,\"PGA Count\":%d,\"CPU Count\":%d,\"Pool Count\":%d,\"ADL\":\"%s\",\"ADL in use\":\"%s\",\"Strategy\":\"%s\",\"Log Interval\":%d,\"Device Code\":\"%s\"}" JSON_CLOSE, nDevs, pgacount, cpucount, total_pools, adl, adlinuse, strategies[pool_strategy].s, opt_log_interval, DEVICECODE);
|
sprintf(buf, "," JSON_MINECON "{\"GPU Count\":%d,\"PGA Count\":%d,\"CPU Count\":%d,\"Pool Count\":%d,\"ADL\":\"%s\",\"ADL in use\":\"%s\",\"Strategy\":\"%s\",\"Log Interval\":%d,\"Device Code\":\"%s\",\"OS\":\"%s\"}" JSON_CLOSE, nDevs, pgacount, cpucount, total_pools, adl, adlinuse, strategies[pool_strategy].s, opt_log_interval, OSINFO, DEVICECODE);
|
||||||
else
|
else
|
||||||
sprintf(buf, _MINECON ",GPU Count=%d,PGA Count=%d,CPU Count=%d,Pool Count=%d,ADL=%s,ADL in use=%s,Strategy=%s,Log Interval=%d,Device Code=%s%c", nDevs, pgacount, cpucount, total_pools, adl, adlinuse, strategies[pool_strategy].s, opt_log_interval, DEVICECODE, SEPARATOR);
|
sprintf(buf, _MINECON ",GPU Count=%d,PGA Count=%d,CPU Count=%d,Pool Count=%d,ADL=%s,ADL in use=%s,Strategy=%s,Log Interval=%d,Device Code=%s,OS=%s%c", nDevs, pgacount, cpucount, total_pools, adl, adlinuse, strategies[pool_strategy].s, opt_log_interval, DEVICECODE, OSINFO, SEPARATOR);
|
||||||
|
|
||||||
strcat(io_buffer, buf);
|
strcat(io_buffer, buf);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user