Browse Source

api.c config 'Device Code' to show list of compiled devices + README

nfactor-troky
Kano 13 years ago
parent
commit
6e35503e57
  1. 5
      README
  2. 21
      api.c

5
README

@ -620,7 +620,7 @@ The STATUS section is:
This defaults to the cgminer version but is the value of --api-description This defaults to the cgminer version but is the value of --api-description
if it was specified at runtime. if it was specified at runtime.
For API version 1.5: For API version 1.6:
The list of requests - a (*) means it requires privileged access - and replies are: The list of requests - a (*) means it requires privileged access - and replies are:
@ -637,7 +637,8 @@ The list of requests - a (*) means it requires privileged access - and replies a
ADL=X, <- Y or N if ADL is compiled in the code ADL=X, <- Y or N if ADL is compiled in the code
ADL in use=X, <- Y or N if any GPU has ADL ADL in use=X, <- Y or N if any GPU has ADL
Strategy=Name, <- the current pool strategy Strategy=Name, <- the current pool strategy
Log Interval=N| <- log interval (--log N) Log Interval=N, <- log interval (--log N)
Device Code=GPU ICA | <- spaced list of compiled devices
summary SUMMARY The status summary of the miner summary SUMMARY The status summary of the miner
e.g. Elapsed=NNN,Found Blocks=N,Getworks=N,...| e.g. Elapsed=NNN,Found Blocks=N,Getworks=N,...|

21
api.c

@ -157,7 +157,7 @@ static const char *COMMA = ",";
static const char SEPARATOR = '|'; static const char SEPARATOR = '|';
static const char GPUSEP = ','; static const char GPUSEP = ',';
static const char *APIVERSION = "1.5"; static const char *APIVERSION = "1.6";
static const char *DEAD = "Dead"; static const char *DEAD = "Dead";
static const char *SICK = "Sick"; static const char *SICK = "Sick";
static const char *NOSTART = "NoStart"; static const char *NOSTART = "NoStart";
@ -169,6 +169,21 @@ static const char *DYNAMIC = _DYNAMIC;
static const char *YES = "Y"; static const char *YES = "Y";
static const char *NO = "N"; static const char *NO = "N";
static const char *DEVICECODE = ""
#ifdef HAVE_OPENCL
"GPU "
#endif
#ifdef USE_BITFORCE
"BFL "
#endif
#ifdef USE_ICARUS
"ICA "
#endif
#ifdef WANT_CPUMINE
"CPU "
#endif
"";
#define _DEVS "DEVS" #define _DEVS "DEVS"
#define _POOLS "POOLS" #define _POOLS "POOLS"
#define _SUMMARY "SUMMARY" #define _SUMMARY "SUMMARY"
@ -643,9 +658,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\"}" JSON_CLOSE, nDevs, pgacount, cpucount, total_pools, adl, adlinuse, strategies[pool_strategy].s, opt_log_interval); 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);
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%c", nDevs, pgacount, cpucount, total_pools, adl, adlinuse, strategies[pool_strategy].s, opt_log_interval, 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%c", nDevs, pgacount, cpucount, total_pools, adl, adlinuse, strategies[pool_strategy].s, opt_log_interval, DEVICECODE, SEPARATOR);
strcat(io_buffer, buf); strcat(io_buffer, buf);
} }

Loading…
Cancel
Save