1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-09 14:28:12 +00:00
Commit Graph

282 Commits

Author SHA1 Message Date
Kano
f56a0fb719 API always report failed send() replies 2013-03-01 16:57:22 +11:00
Kano
6fb32f7b5d convert sleep(const) to nmsleep() 2013-02-08 02:32:27 +11:00
Kano
bc5755233c call a separate get_devices() with locking, as required 2013-02-08 02:12:09 +11:00
Kano
983fe2b0c0 usbutils hotplug v0.1 2013-02-08 01:42:36 +11:00
Con Kolivas
5d122cad93 Provide wrappers for grabbing of thr value under the mining_thr_lock. 2013-02-03 23:41:41 +11:00
Kano
7abf30b2c0 distinguish between drv and it's id enum now called drv_id 2013-02-03 22:51:05 +11:00
Kano
61ec1fe91f mutex all access to mining_thr 2013-02-02 20:14:55 +11:00
Kano
212f32e5e0 Split thr_info array into control_thr and mining_thr pointers so more mining threads can be added later 2013-02-02 20:14:53 +11:00
Kano
7fbc3770b4 USB move usbdev info that needs to stay around into usbinfo 2013-02-02 20:14:36 +11:00
Kano
c1eae36f7b API stats - include pool network bytes + in miner.php 2013-02-02 20:14:33 +11:00
Kano
24525edbef api.c update copyright year 2013-02-02 20:14:30 +11:00
Kano
34bcc1c66d USB automatically handle losing the device and report nodev in the API 2013-02-02 20:14:29 +11:00
Kano
0b3d8c89c2 API zero - zero statistics - all or bestshare - with optional on screen summary 2013-02-02 20:14:27 +11:00
Kano
bd5f20ebf5 api.c pgaenable not re-enabling the device - plus related debug 2013-02-02 20:14:25 +11:00
Kano
a344deb6ac rename device_api -> device_drv and all related api -> drv and add a device_drv->drv enum for identifying which driver each is 2013-02-02 20:14:19 +11:00
Kano
1ce817d4df Merge branch 'api' 2013-01-03 21:48:22 +11:00
Kano
abaaf93c8d Correct API version to match docs 2013-01-02 21:52:38 +11:00
Kano
03f626e68d Remember best share per pool and return in API pools 2013-01-02 21:51:09 +11:00
Kano
07db1ed687 BFL USB api.c usbstats 2013-01-01 00:29:17 +11:00
Kano
e931b72753 API V1.23 - new pgaset command, to be used soon 2012-12-19 10:43:27 +11:00
Kano
454bc4c3d2 API show if pool has GBT (so people know not to use that pool) 2012-12-13 18:30:51 +11:00
Kano
800ea01658 API stats - display pool byte transfer stats 2012-12-13 01:09:03 +11:00
Kano
a58933dc09 api use a dynamic io buffer, truncated before it reaches the current ~64k limit 2012-12-11 15:43:24 +11:00
Con Kolivas
f3b96b8d26 Do not do any setup if opt_api_listen is disabled in api.c. 2012-12-10 10:51:40 +11:00
Kano
e55fe73f9a API add Best Share to summary 2012-12-03 23:08:11 +11:00
Kano
a67e96c3e4 API lock access to some summary statistics (and copy them) 2012-12-03 11:36:15 +11:00
Kano
152e7e36a2 mmq usb v0.4 + api usb stats 2012-12-02 21:48:37 +11:00
Kano
29484e8411 API - add Stratum information to pools 2012-10-21 17:04:15 +11:00
Con Kolivas
0a90207111 Merge branch 'master' into stratum 2012-10-07 13:22:17 +11:00
Con Kolivas
c113534feb Begin support for mingw stratum build.
Conflicts:
	configure.ac
2012-10-04 17:52:35 +10:00
Kano
6d6692ce9a api.c DEBUG message has no paramter 2012-09-30 17:38:27 +10:00
Con Kolivas
f6f43500c0 Detect stratum in common place when adding urls, and use a bool to tell us when it's active. 2012-09-27 09:06:56 +10:00
Con Kolivas
144a016097 Add data structures to pool struct for socket communications. 2012-09-24 16:50:04 +10:00
Con Kolivas
b3cdd8029a Put all socket definitions in util.h to allow reusing by added socket functions to be used in util.c. 2012-09-24 16:27:47 +10:00
Kano
7c32562d80 API stats add some pool getwork difficulty stats 2012-09-24 11:34:50 +10:00
Kano
17973c59c4 API don't change 'Diff1 Shares' - backward compatability FTW 2012-09-21 11:25:43 +10:00
Kano
a6bf276f6b API - Add last share difficulty for devices and pool 2012-09-19 01:14:43 +10:00
Kano
89b6989fb3 Store and report Accepted,Rejected,Stale difficulty in the summary and API 2012-09-19 00:54:55 +10:00
Kano
a2cc588c51 api.c remove compile warnings 2012-09-18 14:12:32 +10:00
Kano
bd3c98aaaf Optional WorkTime details with each Accepted/Rejected work item 2012-09-15 14:04:57 +10:00
Kano
ade940bcba api.c all STATUS messages automatically escaped 2012-09-13 09:44:58 +10:00
Kano
fd2fa260c7 api.c add missing escape for comma in MSG_PGAUNW 2012-09-12 23:27:48 +10:00
Kano
99f0607fb2 API add display of and setting queue,scantime,expiry 2012-09-12 23:26:43 +10:00
Kano
cef9731fbc CURL support for individual proxy per pool and all proxy types 2012-09-12 07:44:00 +10:00
Kano
9950cff5ae API pgaidentify - unsupported message should be a warning 2012-09-04 12:57:22 +10:00
Kano
9487ba05cd API/BFL identify a device - currently only BFL to flash the led 2012-09-04 12:52:11 +10:00
Kano
7a2407f15c BFL add throttle count to internal stats + API 2012-09-04 02:26:17 +10:00
Kano
93555e271a API add device diff1 work 2012-09-04 01:23:32 +10:00
Kano
381478e65c api.c Correct diff1 field name 2012-09-02 08:05:50 +10:00
Kano
568b0fed89 API allow full debug settings control 2012-09-01 18:21:08 +10:00
Kano
d5f485c517 Pools: add RollTime info to API 'stats' and 'Stats' button in miner.php 2012-08-23 19:20:12 +10:00
Kano
b3e9858c9f API new command 'coin' with mining information 2012-08-20 16:07:20 +10:00
Kano
9210abdf60 API V1.17 show Work Utility and Diff1 Shares 2012-08-19 15:09:45 +10:00
Kano
70c57e7d40 api.c typo 2012-08-14 12:58:08 +10:00
Kano
95dff7363e API allow display/change failover-only setting 2012-08-14 12:54:27 +10:00
Kano
b33ea2674d api.c update API start message and include port number 2012-08-06 01:05:21 +10:00
Kano
56f06e1e9b API remove unused warning in non-GPU compile 2012-08-04 16:55:55 +10:00
Kano
ede0dd6a52 api.c in linux allow to open a closed socket in TIME_WAIT 2012-08-04 16:48:55 +10:00
Kano
70cba2ae25 Style 2012-07-30 07:34:06 +10:00
Kano
51940ec719 api.c verify poolpriority parameters before changing pools 2012-07-29 23:40:01 +10:00
Kano
854a80ff03 api.c poolpriority changes 2012-07-29 23:15:20 +10:00
kanoi
fe23dfd3d4 Merge pull request #2 from luke-jr/rpc_poolpriority
RPC: New "poolpriority" command to set the order of pool priorities
2012-07-29 04:16:29 -07:00
Con Kolivas
e87ff7c177 Keep a counter of enabled pools and use that instead of iterating over the pool list. Use that value to ensure we don't set the last remaining active pool to the rejecting state. 2012-07-29 13:15:39 +10:00
Luke Dashjr
5ef9c13924 Bugfix: API: Report errors from poolpriority command 2012-07-27 21:28:13 +00:00
Luke Dashjr
8326d2dcaf RPC: New "poolpriority" command to set the order of pool priorities 2012-07-27 21:27:37 +00:00
Luke Dashjr
a854779077 rpc: Use a single switch statement for both stringifications of cgpu->status 2012-07-12 17:05:25 +00:00
Con Kolivas
0ed757a020 Use switch statement for cgpu->status and fix spelling. 2012-07-12 16:05:17 +10:00
Con Kolivas
96f3a98838 Merge pull request #264 from luke-jr/life_init
Bugfix: Don't declare devices SICK if they're just busy initializing
2012-07-11 23:00:35 -07:00
Luke Dashjr
c57c308d1f Bugfix: Don't declare devices SICK if they're just busy initializing
This mainly applies to ModMiner since it takes 4-5 minutes to upload the bitstream
2012-07-11 20:29:06 +00:00
Zefir Kurtisi
7502af263c fix API support for big endian machines
Previously the allowed IP addresses were stored in little
endian representation and caused mismatch when run on big
endian machines.

Allowed IPs and netmasks are now kept in network byte
order and converted to little endian for matching
connecting client IP with allowed ones.
2012-07-08 16:25:39 +02:00
Kano
ff0afb94ec Add API Notify counter 'Comms Error' 2012-07-03 13:14:30 +10:00
Con Kolivas
8b050083a0 Style police on api.c 2012-07-03 11:32:42 +10:00
Kano
c8535133aa api.c put version up to 1.14 2012-07-01 15:29:41 +10:00
Kano
06f5f35ad4 api.c allow NULL data displayed as (null) 2012-07-01 00:42:34 +10:00
Kano
eab9debc72 api.c data structure - all testing attempted successful 2012-06-30 23:41:22 +10:00
Kano
d8abfb713e api.c data structure - tested + updated get_api_stats/driver-icarus.c 2012-06-30 15:58:31 +10:00
Kano
538653a53e api.c data structure - 2nd - untested 2012-06-30 12:44:57 +10:00
Kano
21e4cd85ea api.c data structure rather than raw sprintf - 1st test 2012-06-30 02:49:01 +10:00
Kano
b63a374de2 api.c ensure old mode is always available when not using --api-groups + quit() on param errors 2012-06-28 11:59:11 +10:00
Kano
05b8f5b099 api.c fix json already closed 2012-06-28 05:59:31 +10:00
Kano
659e50434e implement and document API option --api-groups 2012-06-28 02:29:58 +10:00
Kano
e4f9cc4e3e api.c allow unwell devices to be enabled so they can be cured 2012-06-27 21:21:54 +10:00
Con Kolivas
c027492fa4 Make the pools array a dynamically allocated array to allow unlimited pools to be added. 2012-06-25 17:06:26 +10:00
Kano
195d915a6c api.c display Pool Av in json 2012-06-24 16:31:11 +10:00
Con Kolivas
f32ffb8718 Work out a rolling average getwork delay stored in pool_stats. 2012-06-24 13:20:17 +10:00
Paul Sheppard
7ae22e21e3 Disable OpenCL code when not available. 2012-06-16 20:24:40 -07:00
Con Kolivas
30bb3c62a6 Merge pull request #224 from kanoi/master
API add ModMinerQuad support
2012-06-14 02:38:24 -07:00
drizztbsd
7dcd9f3ed2 Fix typo in some API messages (succeess/success) 2012-06-13 20:31:03 +03:00
Kano
836b76a0d6 api.c MMQ stat bugs 2012-06-14 03:14:02 +10:00
Kano
913221c373 API add ModMinerQuad support 2012-06-14 02:57:37 +10:00
Kano
fdcd72b9ae API add stats for pool getworks 2012-06-10 11:19:21 +10:00
Con Kolivas
71378a4bd8 Merge pull request #209 from kanoi/977aecc4a60928d05719e3b0b534335b1f82effa
API save default config file if none specified
2012-06-01 22:12:08 -07:00
Kano
977aecc4a6 API update version to V1.11 and document changes 2012-05-31 23:30:38 +10:00
Kano
3cb3f09a50 API save default config file if none specified 2012-05-31 23:18:55 +10:00
Kano
fd9285eb72 api.c save success incorrectly returns error 2012-05-31 22:46:43 +10:00
Kano
a0936815a3 api.c replace BUFSIZ (linux/windows have different values) 2012-05-31 22:41:04 +10:00
Con Kolivas
84f3bf998b Use correct pool enabled enums in api.c. 2012-05-06 15:49:40 +10:00
Kano
00158c3a1f API 'stats' allow devices to add their own stats also for testing/debug 2012-05-05 16:25:19 +10:00
Kano
976e27c4cb API add getwork stats to cgminer - accesable from API 'stats' 2012-05-05 15:04:15 +10:00
Kano
a8619ad6f7 API support new pool status 2012-05-04 20:54:11 +10:00
Kano
44fc698750 API add last share time to each pool 2012-05-04 00:13:42 +10:00
Con Kolivas
d5d8c2cc5b Implement an older header fix for a label existing before the pthread_cleanup macro. 2012-05-03 10:49:42 +10:00
Kano
afa3fa56b6 API bool's and 1TBS fixes 2012-05-03 10:49:42 +10:00
Kano
524e2fb8f2 api.c V1.9 add 'restart' + redesign 'quit' so thread exits cleanly 2012-05-03 10:49:42 +10:00
Kano
01c93bc1d4 api.c bug - remove extra ']'s in notify command 2012-05-03 10:49:42 +10:00
Con Kolivas
06bf44b06f Restarting cgminer leads to a socket that can't be bound for 60 seconds, so increase the interval that API binding waits to 30 seconds to minimise the number of times it will retry, spamming the logs. 2012-04-28 13:41:18 +10:00
Kano
b249d72e1c api.c include zTex in the FPGA support list 2012-04-26 01:45:04 +10:00
Kano
9febdb5a84 api.c ensure 'devs' shows PGA's when only PGA code is compiled 2012-04-26 00:35:15 +10:00
Kano
c4567ee67f api.c combine all pairs of sprintfs() 2012-04-26 00:08:36 +10:00
Kano
87a5f0d87a api.c uncomment and use BLANK (and COMMA) 2012-04-25 22:39:22 +10:00
Kano
6962514e06 api.c 'devdetails' list static details of devices 2012-04-25 19:23:10 +10:00
Kano
7e65126936 api.c fix unused variable compile warning 2012-04-23 22:01:36 +10:00
Con Kolivas
9b5615d5f3 Shut down the api cleanly when the api thread is cancelled. This should allow the api socket to be closed successfully to next be reopened with app_restart. 2012-04-21 17:20:33 +10:00
Luke Dashjr
b8778839e9 Merge branch 'master' into unify_drivers
Conflicts:
	cgminer.c
2012-04-21 02:36:19 -04:00
Kano
2e1d2017de API add removepool like the screen interface 2012-04-21 03:15:41 +10:00
Kano
eec7c1a963 api.c escape required characters in return strings + pools returns the username 2012-04-20 23:50:27 +10:00
Kano
3fa3f60b74 api.c new commands: pgaenable pgadisable 2012-03-30 22:28:42 +11:00
Kano
0699061ade api.c devicecode/osinfo incorrectly swapped for json 2012-03-28 10:50:28 +11:00
Kano
25f914a334 api.c miner.php add a '*' to the front of all notify counters - simplifies future support of new counters 2012-03-24 23:20:48 +11:00
Kano
25ca0687a1 api.c notify should report disabled devices also - of course 2012-03-23 10:00:23 +11:00
Kano
18a8b5506e API returns the simple device history with the 'notify' command 2012-03-23 03:17:20 +11:00
Kano
8747a472f3 api.c Report an OS string in config to help with device issues 2012-03-22 20:33:17 +11:00
Kano
6be50fab80 api.c fix Log Interval - integer in JSON 2012-03-22 19:50:15 +11:00
Kano
6e35503e57 api.c config 'Device Code' to show list of compiled devices + README 2012-03-22 19:47:23 +11:00
Kano
3dee276308 api.c increase buffer size close to current code allowable limit 2012-03-22 18:57:30 +11:00
Luke Dashjr
e131dfab31 Unify drivers as driver-*.c and add driver name to API 2012-03-13 12:18:23 -04:00
Kano
1f118078eb api.c: correct error messages 2012-03-04 14:51:11 +11:00
Kano
cb3323b7b5 Add API support for Icarus and Bitforce 2012-02-29 21:17:10 +11:00
Kano
c9b7a223e5 Next API version is 1.4 (1.3 is current) 2012-02-27 12:58:35 +11:00
Kano
b4c7c56fa7 README/api.c add "When" the request was processed to STATUS 2012-02-27 12:02:14 +11:00
Kano
0abac0b5d9 API implement addpool command 2012-02-24 03:00:01 +11:00
Kano
54ef2d951b API return the untouched Total MH also (API now version 1.3) 2012-02-23 23:53:15 +11:00
Kano
60c5ac6844 API new commands enablepool and disablepool (version already incremented) 2012-02-23 16:10:17 +11:00
Con Kolivas
d1cddf8bad Update licensing to GPL V3. 2012-02-21 22:23:07 +11:00
Kano
de40e6df4f Modify API debug messages to say API instead of DBG 2012-02-21 20:04:00 +11:00
Kano
e3281c2643 When API shuts down cgminer don't kill itself 2012-02-21 20:03:13 +11:00
Kano
dd233ec244 API add 'privileged' command so can verify access level 2012-02-21 11:08:29 +11:00
Kano
60b7c01e7a API restrict access to all non display commands by default 2012-02-20 20:10:21 +11:00
Kano
c25aead886 Update API version to 1.2 for new 'Log Interval' 2012-02-20 19:15:22 +11:00
Kano
3bd16acf12 API add --log Interval to 'config' reply 2012-02-20 19:12:46 +11:00
Kano
3955fefec0 --api-allow special case 0/0 means all 2012-02-20 19:03:25 +11:00
Con Kolivas
02295c69c8 Allow devices that are disabled due to overheating to be flagged as recovering instead of disabling them and re-enable them if they're below ideal
temperatures and --no-restart has not been set.
2012-02-19 20:19:47 +11:00
Con Kolivas
86a53824b5 Delete unused variable. 2012-02-16 21:15:58 +11:00
Con Kolivas
1885374802 Merge pull request #112 from luke-jr/jansson_compat
Restore compatibility with Jansson 1.3 and 2.0 (api.c required 2.1)
2012-02-11 22:01:51 -08:00
Luke Dashjr
fdadb0b549 Restore compatibility with Jansson 1.3 and 2.0 (api.c required 2.1) 2012-02-11 15:46:08 -05:00
zefir
713e8be629 move CPU chipset specific optimization into device-cpu 2012-02-11 20:25:41 +01:00
Con Kolivas
405a2120f8 Remove unnecessary check for opt_debug on every invocation of applog at LOG_DEBUG and place the check in applog(). 2012-02-11 20:11:18 +11:00
Con Kolivas
8c609579f4 Merge pull request #107 from kanoi/master
Allow API to restrict access by IP address + other commits
2012-02-10 19:07:53 -08:00
Con Kolivas
b54d462c85 Missing include to build on newer mingw32. 2012-02-09 21:56:07 +11:00
Kano
dab9b7e477 Define in_addr_t in windows if required 2012-02-08 19:55:29 +11:00