diff --git a/AUTHORS.md b/AUTHORS.md index 85d41156..dfc3c653 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -5,17 +5,17 @@ * Scrypt-only refactor and maintenance: Noel Maersk LfxRFgXzA13TSTxgFGUFEtumv5ShGzAmLw * Core code: Con Kolivas 15qSxP1SQcUX3o4nhkfdbgyoWEFMomJ4rZ * Improvements to core: Martin Danielsen +* API: Andrew Smith 1Jjk2LmktEQKnv8r2cZ9MvLiZwZ9gxabKm ## Bug fixes Too many to list. See: -* [veox/cgminer](https://github.com/veox/cgminer/graphs/contributors) +* [veox/sgminer](https://github.com/veox/sgminer/graphs/contributors) * [ckolivas/cgminer](https://github.com/ckolivas/cgminer/graphs/contributors) ## Legacy -* API: Andrew Smith 1Jjk2LmktEQKnv8r2cZ9MvLiZwZ9gxabKm * Original CPU mining software: Jeff Garzik diff --git a/Makefile.am b/Makefile.am index 01990d84..e357acb0 100644 --- a/Makefile.am +++ b/Makefile.am @@ -12,33 +12,33 @@ SUBDIRS = lib compat ccan INCLUDES = $(PTHREAD_FLAGS) -fno-strict-aliasing $(JANSSON_CPPFLAGS) -bin_PROGRAMS = cgminer +bin_PROGRAMS = sgminer -cgminer_LDFLAGS = $(PTHREAD_FLAGS) -cgminer_LDADD = $(DLOPEN_FLAGS) @LIBCURL_LIBS@ @JANSSON_LIBS@ @PTHREAD_LIBS@ \ +sgminer_LDFLAGS = $(PTHREAD_FLAGS) +sgminer_LDADD = $(DLOPEN_FLAGS) @LIBCURL_LIBS@ @JANSSON_LIBS@ @PTHREAD_LIBS@ \ @OPENCL_LIBS@ @NCURSES_LIBS@ @PDCURSES_LIBS@ @WS2_LIBS@ \ @MM_LIBS@ @RT_LIBS@ @MATH_LIBS@ lib/libgnu.a ccan/libccan.a -cgminer_CPPFLAGS += -I$(top_builddir)/lib -I$(top_srcdir)/lib @OPENCL_FLAGS@ +sgminer_CPPFLAGS += -I$(top_builddir)/lib -I$(top_srcdir)/lib @OPENCL_FLAGS@ if !HAVE_WINDOWS -cgminer_CPPFLAGS += @LIBCURL_CFLAGS@ +sgminer_CPPFLAGS += @LIBCURL_CFLAGS@ endif -cgminer_CPPFLAGS += $(ADL_CPPFLAGS) - -cgminer_SOURCES := cgminer.c -cgminer_SOURCES += api.c -cgminer_SOURCES += elist.h miner.h compat.h bench_block.h -cgminer_SOURCES += util.c util.h uthash.h -cgminer_SOURCES += sha2.c sha2.h -cgminer_SOURCES += logging.c logging.h -cgminer_SOURCES += driver-opencl.c driver-opencl.h -cgminer_SOURCES += ocl.c ocl.h -cgminer_SOURCES += findnonce.c findnonce.h -cgminer_SOURCES += adl.c adl.h adl_functions.h -cgminer_SOURCES += scrypt.c scrypt.h -cgminer_SOURCES += *.cl +sgminer_CPPFLAGS += $(ADL_CPPFLAGS) + +sgminer_SOURCES := sgminer.c +sgminer_SOURCES += api.c +sgminer_SOURCES += elist.h miner.h compat.h bench_block.h +sgminer_SOURCES += util.c util.h uthash.h +sgminer_SOURCES += sha2.c sha2.h +sgminer_SOURCES += logging.c logging.h +sgminer_SOURCES += driver-opencl.c driver-opencl.h +sgminer_SOURCES += ocl.c ocl.h +sgminer_SOURCES += findnonce.c findnonce.h +sgminer_SOURCES += adl.c adl.h adl_functions.h +sgminer_SOURCES += scrypt.c scrypt.h +sgminer_SOURCES += *.cl bin_SCRIPTS = $(top_srcdir)/*.cl diff --git a/README.md b/README.md index 441a1dde..e4ae6277 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,4 @@ -# cgminer - -**WARNING**: this experimental version of cgminer is only meant to -support Scrypt. It will be renamed appropriately to reflect the fact if -ever ready for general use. +# sgminer ## Introduction @@ -12,7 +8,7 @@ This is a multi-threaded multi-pool GPU miner with ATI GPU monitoring, cgminer by Con Kolivas (ckolivas), which is in turn based on cpuminer by Jeff Garzik (jgarzik). -GIT TREE: https://github.com/veox/cgminer +GIT TREE: https://github.com/veox/sgminer License: GPLv3. See `COPYING` for details. @@ -57,27 +53,27 @@ If building from git: autoconf automake -CGMiner specific configuration options: +sgminer-specific configuration options: --disable-adl Override detection and disable building with adl - --without-curses Compile support for curses TUI (default enabled) + --without-curses Do not compile support for curses TUI ### *nix build instructions -If needed, place include headers (`*.h` files) from `ADL_SDK_**.zip` in `cgminer/ADL_SDK`. +If needed, place include headers (`*.h` files) from `ADL_SDK_**.zip` in `sgminer/ADL_SDK`. Then: autoreconf -i CFLAGS="-O2 -Wall -march=native" ./configure -Systemwide installation is optional. You may run cgminer from the build +Systemwide installation is optional. You may run `sgminer` from the build directory directly, or `make install` if you wish to install -cgminer to a system location or location you specified with `--prefix`. +`sgminer` to a system location or a location you specified with `--prefix`. ### Windows build instructions -See `windows-build.txt` (might be outdated). +See `doc/windows-build.txt` (might be outdated). ## Basic Usage @@ -85,7 +81,7 @@ See `windows-build.txt` (might be outdated). **WARNING**: documentation below this point has not been updated since the fork. -After saving configuration from the menu, you do not need to give cgminer +After saving configuration from the menu, you do not need to give sgminer any arguments and it will load your configuration. Any configuration file may also contain a single @@ -99,23 +95,23 @@ output. Single pool: -cgminer -o http://pool:port -u username -p password +sgminer -o http://pool:port -u username -p password Multiple pools: -cgminer -o http://pool1:port -u pool1username -p pool1password -o http://pool2:port -u pool2usernmae -p pool2password +sgminer -o http://pool1:port -u pool1username -p pool1password -o http://pool2:port -u pool2usernmae -p pool2password Single pool with a standard http proxy, regular desktop: -cgminer -o "http:proxy:port|http://pool:port" -u username -p password +sgminer -o "http:proxy:port|http://pool:port" -u username -p password Single pool with a socks5 proxy, regular desktop: -cgminer -o "socks5:proxy:port|http://pool:port" -u username -p password +sgminer -o "socks5:proxy:port|http://pool:port" -u username -p password Single pool with stratum protocol support: -cgminer -o stratum+tcp://pool:port -u username -p password +sgminer -o stratum+tcp://pool:port -u username -p password The list of proxy types are: http: standard http 1.1 proxy @@ -125,15 +121,15 @@ The list of proxy types are: socks4a: socks4a proxy socks5h: socks5 proxy using a hostname -If you compile cgminer with a version of CURL before 7.19.4 then some of +If you compile sgminer with a version of CURL before 7.19.4 then some of the above will not be available. All are available since CURL version 7.19.4. -If you specify the --socks-proxy option to cgminer, it will only be +If you specify the --socks-proxy option to sgminer, it will only be applied to all pools that don't specify their own proxy setting like above. -For more advanced usage , run `cgminer --help`. +For more advanced usage , run `sgminer --help`. See `doc/GPU` for more information regarding GPU mining and `doc/SCRYPT` for more information regarding Scrypt mining. @@ -231,7 +227,7 @@ The total difficulty of rejected shares The number of hardware erorrs The work utility defined as the number of diff1 shares work / minute -The cgminer status line shows: +The sgminer status line shows: ST: 1 SS: 0 NB: 1 LW: 8 GF: 1 RF: 1 ST is STaged work items (ready to use). @@ -245,7 +241,7 @@ The block display shows: Block: 0074c5e482e34a506d2a051a... Started: [17:17:22] Best share: 2.71K This shows a short stretch of the current block, when the new block started, -and the all time best difficulty share you've found since starting cgminer +and the all time best difficulty share you've found since starting sgminer this time. @@ -337,7 +333,7 @@ the above quotas in a configuration file they would be specified thus: ## Logging -cgminer will log to stderr if it detects stderr is being redirected to a +sgminer will log to stderr if it detects stderr is being redirected to a file. To enable logging simply append `2>logfile.txt` to your command line and `logfile.txt` will contain the logged output at the log level you specify (normal, verbose, debug etc.) @@ -366,14 +362,14 @@ usually 0.000 unless there was a problem with submitting the work, S:n.nnn is how long it took to submit the completed work and await the reply, R:hh:mm:ss is the actual time the work submit reply was received -If you start cgminer with the --sharelog option, you can get detailed +If you start sgminer with the --sharelog option, you can get detailed information for each share found. The argument to the option may be "-" for standard output (not advisable with the ncurses UI), any valid positive number for that file descriptor, or a filename. To log share data to a file named "share.log", you can use either: -./cgminer --sharelog 50 -o xxx -u yyy -p zzz 50>share.log -./cgminer --sharelog share.log -o xxx -u yyy -p zzz +./sgminer --sharelog 50 -o xxx -u yyy -p zzz 50>share.log +./sgminer --sharelog share.log -o xxx -u yyy -p zzz For every share found, data will be logged in a CSV (Comma Separated Value) format: diff --git a/api.c b/api.c index 2dd07f49..27f7d24e 100644 --- a/api.c +++ b/api.c @@ -368,7 +368,7 @@ struct CODES { { SEVERITY_ERR, MSG_MISID, PARAM_NONE, "Missing device id parameter" }, { SEVERITY_SUCC, MSG_GPUDEV, PARAM_GPU, "GPU%d" }, { SEVERITY_SUCC, MSG_NUMGPU, PARAM_NONE, "GPU count" }, - { SEVERITY_SUCC, MSG_VERSION, PARAM_NONE, "CGMiner versions" }, + { SEVERITY_SUCC, MSG_VERSION, PARAM_NONE, "SGMiner versions" }, { SEVERITY_ERR, MSG_INVJSON, PARAM_NONE, "Invalid JSON" }, { SEVERITY_ERR, MSG_MISCMD, PARAM_CMD, "Missing JSON '%s'" }, { SEVERITY_ERR, MSG_MISPID, PARAM_NONE, "Missing pool id parameter" }, @@ -1552,7 +1552,7 @@ static void apiversion(struct io_data *io_data, __maybe_unused SOCKETTYPE c, __m message(io_data, MSG_VERSION, 0, NULL, isjson); io_open = io_add(io_data, isjson ? COMSTR JSON_VERSION : _VERSION COMSTR); - root = api_add_string(root, "CGMiner", VERSION, false); + root = api_add_string(root, "SGMiner", VERSION, false); root = api_add_const(root, "API", APIVERSION, false); root = print_data(root, buf, isjson, false); diff --git a/configure.ac b/configure.ac index da6d69dc..ac0c2bd7 100644 --- a/configure.ac +++ b/configure.ac @@ -11,12 +11,12 @@ m4_define([lt_age], v_min) ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## -AC_INIT([cgminer], [v_ver], [kernel@kolivas.org]) +AC_INIT([sgminer], [v_ver], [kernel@kolivas.org]) AC_PREREQ(2.59) AC_CANONICAL_SYSTEM AC_CONFIG_MACRO_DIR([m4]) -AC_CONFIG_SRCDIR([cgminer.c]) +AC_CONFIG_SRCDIR([sgminer.c]) AC_CONFIG_HEADERS([config.h]) AM_INIT_AUTOMAKE([foreign subdir-objects]) @@ -27,9 +27,9 @@ AC_USE_SYSTEM_EXTENSIONS ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--## m4_ifdef([v_rev], , [m4_define([v_rev], [0])]) m4_ifdef([v_rel], , [m4_define([v_rel], [])]) -AC_DEFINE_UNQUOTED(CGMINER_MAJOR_VERSION, [v_maj], [Major version]) -AC_DEFINE_UNQUOTED(CGMINER_MINOR_VERSION, [v_min], [Minor version]) -AC_DEFINE_UNQUOTED(CGMINER_MINOR_SUBVERSION, [v_mic], [Micro version]) +AC_DEFINE_UNQUOTED(SGMINER_MAJOR_VERSION, [v_maj], [Major version]) +AC_DEFINE_UNQUOTED(SGMINER_MINOR_VERSION, [v_min], [Minor version]) +AC_DEFINE_UNQUOTED(SGMINER_MINOR_SUBVERSION, [v_mic], [Micro version]) version_info="lt_rev:lt_cur:lt_age" release_info="v_rel" AC_SUBST(version_info) @@ -128,11 +128,11 @@ if test "x$have_win32" != xtrue; then fi fi -have_cgminer_sdk=false -if test -n "$CGMINER_SDK"; then - have_cgminer_sdk=true - CPPFLAGS="-I$CGMINER_SDK/include $CPPFLAGS" - LDFLAGS="-L$CGMINER_SDK/lib/$target $LDFLAGS" +have_sgminer_sdk=false +if test -n "$SGMINER_SDK"; then + have_sgminer_sdk=true + CPPFLAGS="-I$SGMINER_SDK/include $CPPFLAGS" + LDFLAGS="-L$SGMINER_SDK/lib/$target $LDFLAGS" fi opencl="yes" @@ -194,8 +194,8 @@ if test "$found_opencl" = 1; then if test "x$adl" != xno; then ADL_CPPFLAGS= AC_CHECK_FILE([$srcdir/ADL_SDK/adl_sdk.h], [have_adl=true; ADL_CPPFLAGS=-I$srcdir], have_adl=false,) - if test x$have_adl+$have_cgminer_sdk = xfalse+true; then - AC_CHECK_FILE([$CGMINER_SDK/include/ADL_SDK/adl_sdk.h], [have_adl=true; ADL_CPPFLAGS=-I$CGMINER_SDK/include], have_adl=false,) + if test x$have_adl+$have_sgminer_sdk = xfalse+true; then + AC_CHECK_FILE([$SGMINER_SDK/include/ADL_SDK/adl_sdk.h], [have_adl=true; ADL_CPPFLAGS=-I$SGMINER_SDK/include], have_adl=false,) fi if test x$have_adl = xtrue then @@ -241,14 +241,14 @@ JANSSON_LIBS="compat/jansson-2.5/src/.libs/libjansson.a" PKG_PROG_PKG_CONFIG() -if test "x$have_cgminer_sdk" = "xtrue"; then +if test "x$have_sgminer_sdk" = "xtrue"; then if test "x$have_x86_64" = xtrue; then ARCH_DIR=x86_64 else ARCH_DIR=x86 fi - PKG_CONFIG="${PKG_CONFIG:-pkg-config} --define-variable=arch=$ARCH_DIR --define-variable=target=$target --define-variable=cgminersdkdir=$CGMINER_SDK" - PKG_CONFIG_PATH="$CGMINER_SDK/lib/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}" + PKG_CONFIG="${PKG_CONFIG:-pkg-config} --define-variable=arch=$ARCH_DIR --define-variable=target=$target --define-variable=sgminersdkdir=$SGMINER_SDK" + PKG_CONFIG_PATH="$SGMINER_SDK/lib/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}" fi AC_ARG_ENABLE([libcurl], @@ -315,7 +315,7 @@ if test "x$prefix" = xNONE; then prefix=/usr/local fi -AC_DEFINE_UNQUOTED([CGMINER_PREFIX], ["$prefix/bin"], [Path to cgminer install]) +AC_DEFINE_UNQUOTED([SGMINER_PREFIX], ["$prefix/bin"], [Path to sgminer install]) AC_DEFINE_UNQUOTED([SCRYPT_KERNNAME], ["scrypt130511"], [Filename for scrypt kernel]) diff --git a/doc/API b/doc/API index e4f9b30e..198c1f11 100644 --- a/doc/API +++ b/doc/API @@ -1,13 +1,13 @@ -This README contains details about the cgminer RPC API +This README contains details about the sgminer RPC API It also includes some detailed information at the end, about using miner.php -If you start cgminer with the "--api-listen" option, it will listen on a +If you start sgminer with the "--api-listen" option, it will listen on a simple TCP/IP socket for single string API requests from the same machine -running cgminer and reply with a string and then close the socket each time +running sgminer and reply with a string and then close the socket each time If you add the "--api-network" option, it will accept API requests from any network attached computer. @@ -22,7 +22,7 @@ IP addresses are automatically padded with extra '.0's as needed Without a /prefix is the same as specifying /32 0/0 means all IP addresses. The 'W:' on the front gives that address/subnet privileged access to commands -that modify cgminer (thus all API commands) +that modify sgminer (thus all API commands) Without it those commands return an access denied status. See --api-groups below to define other groups like W: Privileged access is checked in the order the IP addresses were supplied to @@ -32,7 +32,7 @@ Using the "--api-allow" option overides the "--api-network" option if they are both specified With "--api-allow", 127.0.0.1 is not by default given access unless specified -If you start cgminer also with the "--api-mcast" option, it will listen for +If you start sgminer also with the "--api-mcast" option, it will listen for a multicast message and reply to it with a message containing it's API port number, but only if the IP address of the sender is allowed API access @@ -106,7 +106,7 @@ The STATUS section is: Message matching the Code value N Description=string - This defaults to the cgminer version but is the value of --api-description + This defaults to the sgminer version but is the value of --api-description if it was specified at runtime. For API version 1.10 and later: @@ -115,7 +115,7 @@ The list of requests - a (*) means it requires privileged access - and replies: Request Reply Section Details ------- ------------- ------- - version VERSION CGMiner=cgminer, version + version VERSION SGMiner=sgminer, version API=API| version config CONFIG Some miner configuration information: @@ -241,13 +241,13 @@ The list of requests - a (*) means it requires privileged access - and replies: save|filename (*) none There is no reply section just the STATUS section - stating success or failure saving the cgminer + stating success or failure saving the sgminer config to filename - The filename is optional and will use the cgminer + The filename is optional and will use the sgminer default if not specified quit (*) none There is no status section but just a single "BYE" - reply before cgminer quits + reply before sgminer quits notify NOTIFY The last status and history count of each devices problem @@ -260,7 +260,7 @@ The list of requests - a (*) means it requires privileged access - and replies: stating an error if you do not have privileged access to the API and success if you do have privilege - The command doesn't change anything in cgminer + The command doesn't change anything in sgminer pgaenable|N (*) none There is no reply section just the STATUS section @@ -298,7 +298,7 @@ The list of requests - a (*) means it requires privileged access - and replies: e.g. DEVDETAILS=0,Name=GPU,ID=0,Driver=opencl,...| restart (*) none There is no status section but just a single - "RESTART" reply before cgminer restarts + "RESTART" reply before sgminer restarts stats STATS Each device or pool that has 1 or more getworks with a list of stats regarding getwork times @@ -370,14 +370,14 @@ The list of requests - a (*) means it requires privileged access - and replies: none There is no reply section just the STATUS section stating that the zero, and optional summary, was done - If Which='all', all normal cgminer and API + If Which='all', all normal sgminer and API statistics will be zeroed other than the numbers displayed by the usbstats and stats commands If Which='bestshare', only the 'Best Share' values are zeroed for each pool and the global 'Best Share' The true/false option determines if a full summary - is shown on the cgminer display like is normally + is shown on the sgminer display like is normally displayed on exit. hotplug|N (*) none There is no reply section just the STATUS section @@ -440,11 +440,11 @@ The list of requests - a (*) means it requires privileged access - and replies: lockstats (*) none There is no reply section just the STATUS section stating the results of the request A warning reply means lock stats are not compiled - into cgminer + into sgminer The API writes all the lock stats to stderr When you enable, disable or restart a GPU, PGA or ASC, you will also get -Thread messages in the cgminer status window +Thread messages in the sgminer status window The 'poolpriority' command can be used to reset the priority order of multiple pools with a single command - 'switchpool' only sets a single pool to first @@ -457,13 +457,13 @@ If the priority change affects the miner's preference for mining, it may switch immediately When you switch to a different pool to the current one (including by priority -change), you will get a 'Switching to URL' message in the cgminer status +change), you will get a 'Switching to URL' message in the sgminer status windows Obviously, the JSON format is simply just the names as given before the '=' with the values after the '=' -If you enable cgminer debug (-D or --debug) or, when cgminer debug is off, +If you enable sgminer debug (-D or --debug) or, when sgminer debug is off, turn on debug with the API command 'debug|debug' you will also get messages showing some details of the requests received and the replies @@ -474,7 +474,7 @@ api-example.php - a php script to access the API by default it sends a 'summary' request to the miner at 127.0.0.1:4028 If you specify a command it will send that request instead You must modify the line "$socket = getsock('127.0.0.1', 4028);" at the - beginning of "function request($cmd)" to change where it looks for cgminer + beginning of "function request($cmd)" to change where it looks for sgminer API.java/API.class a java program to access the API (with source code) @@ -497,24 +497,24 @@ miner.php - an example web page to access the API Feature Changelog for external applications using the API: -API V1.32 (cgminer v3.6.5) +API V1.32 (sgminer v3.6.5) Modified API commands: 'devs' 'gpu' 'pga' and 'asc' - add 'Device Elapsed' --------- -API V1.31 (cgminer v3.6.3) +API V1.31 (sgminer v3.6.3) Added API command: - 'lockstats' - display cgminer dev lock stats if compiled in + 'lockstats' - display sgminer dev lock stats if compiled in Modified API command: 'summary' - add 'MHS %ds' (where %d is the log interval) --------- -API V1.30 (cgminer v3.4.3) +API V1.30 (sgminer v3.4.3) Added API command: 'poolquota' - Set pool quota for load-balance strategy. @@ -524,13 +524,13 @@ Modified API command: --------- -API V1.29 (cgminer v3.4.1) +API V1.29 (sgminer v3.4.1) Muticast identification added to the API ---------- -API V1.28 (cgminer v3.3.4) +API V1.28 (sgminer v3.3.4) Modified API commands: 'devs', 'pga', 'asc', 'gpu' - add 'Device Hardware%' and 'Device Rejected%' @@ -540,7 +540,7 @@ Modified API commands: ---------- -API V1.27 (cgminer v3.3.2) +API V1.27 (sgminer v3.3.2) Added API commands: 'ascset' - with: BTB opt=millivolts val=1000 to 1310 - core voltage @@ -548,9 +548,9 @@ Added API commands: ---------- -API V1.26 (cgminer v3.2.3) +API V1.26 (sgminer v3.2.3) -Remove all CPU support (cgminer v3.0.0) +Remove all CPU support (sgminer v3.0.0) Added API commands: 'asc' @@ -576,7 +576,7 @@ Modified API commands: ---------- -API V1.24 (cgminer v2.11.0) +API V1.24 (sgminer v2.11.0) Added API commands: 'zero' @@ -588,14 +588,14 @@ Modified API commands: ---------- -API V1.23 (cgminer v2.10.2) +API V1.23 (sgminer v2.10.2) Added API commands: 'pgaset' - with: MMQ opt=clock val=160 to 230 (and a multiple of 2) ---------- -API V1.22 (cgminer v2.10.1) +API V1.22 (sgminer v2.10.1) Enforced output limitation: all extra records beyond the output limit of the API (~64k) are ignored @@ -608,7 +608,7 @@ Modified API commands: ---------- -API V1.21 (cgminer v2.10.0) +API V1.21 (sgminer v2.10.0) Added API commands: 'usbstats' @@ -621,14 +621,14 @@ Modified output: ---------- -API V1.20 (cgminer v2.8.5) +API V1.20 (sgminer v2.8.5) Modified API commands: 'pools' - add 'Has Stratum', 'Stratum Active', 'Stratum URL' ---------- -API V1.19 (cgminer v2.7.6) +API V1.19 (sgminer v2.7.6) Added API commands: 'debug' @@ -652,7 +652,7 @@ Modified API commands: ---------- -API V1.18 (cgminer v2.7.4) +API V1.18 (sgminer v2.7.4) Modified API commands: 'stats' - add 'Work Had Roll Time', 'Work Can Roll', 'Work Had Expire', @@ -661,7 +661,7 @@ Modified API commands: ---------- -API V1.17 (cgminer v2.7.1) +API V1.17 (sgminer v2.7.1) Added API commands: 'coin' @@ -672,7 +672,7 @@ Modified API commands: ---------- -API V1.16 (cgminer v2.6.5) +API V1.16 (sgminer v2.6.5) Added API commands: 'failover-only' @@ -682,14 +682,14 @@ Modified API commands: ---------- -API V1.15 (cgminer v2.6.1) +API V1.15 (sgminer v2.6.1) Added API commands: 'poolpriority' ---------- -API V1.14 (cgminer v2.5.0) +API V1.14 (sgminer v2.5.0) Modified API commands: 'stats' - more icarus timing stats added @@ -700,17 +700,17 @@ Completely backward compatible ---------- -API V1.13 (cgminer v2.4.4) +API V1.13 (sgminer v2.4.4) Added API commands: 'check' -Support was added to cgminer for API access groups with the --api-groups option +Support was added to sgminer for API access groups with the --api-groups option It's 100% backward compatible with previous --api-access commands ---------- -API V1.12 (cgminer v2.4.3) +API V1.12 (sgminer v2.4.3) Modified API commands: 'stats' - more pool stats added @@ -719,7 +719,7 @@ Support for the ModMinerQuad FPGA was added ---------- -API V1.11 (cgminer v2.4.2) +API V1.11 (sgminer v2.4.2) Modified API commands: 'save' no longer requires a filename (use default if not specified) @@ -729,7 +729,7 @@ It now correctly returns S (success) ---------- -API V1.10 (cgminer v2.4.1) +API V1.10 (sgminer v2.4.1) Added API commands: 'stats' @@ -737,14 +737,14 @@ Added API commands: N.B. the 'stats' command can change at any time so any specific content present should not be relied upon. The data content is mainly used for debugging purposes or hidden options -in cgminer and can change as development work requires +in sgminer and can change as development work requires Modified API commands: 'pools' added "Last Share Time" ---------- -API V1.9 (cgminer v2.4.0) +API V1.9 (sgminer v2.4.0) Added API commands: 'restart' @@ -754,7 +754,7 @@ Modified API commands: ---------- -API V1.8 (cgminer v2.3.5) +API V1.8 (sgminer v2.3.5) Added API commands: 'devdetails' @@ -763,7 +763,7 @@ Support for the ZTex FPGA was added ---------- -API V1.7 (cgminer v2.3.4) +API V1.7 (sgminer v2.3.4) Added API commands: 'removepool' @@ -778,7 +778,7 @@ For Text the 4 characters '|' ',' '=' and '\' are escaped the same way ---------- -API V1.6 (cgminer v2.3.2) +API V1.6 (sgminer v2.3.2) Added API commands: 'pga' @@ -799,7 +799,7 @@ API V1.5 was not released ---------- -API V1.4 (Kano's interim release of cgminer v2.3.1) +API V1.4 (Kano's interim release of sgminer v2.3.1) Added API commands: 'notify' @@ -811,7 +811,7 @@ Added "When" to the STATUS reply section of all commands ---------- -API V1.3 (cgminer v2.3.1-2) +API V1.3 (sgminer v2.3.1-2) Added API commands: 'addpool' @@ -822,7 +822,7 @@ Modified API commands: ---------- -API V1.2 (cgminer v2.3.0) +API V1.2 (sgminer v2.3.0) Added API commands: 'enablepool' @@ -838,15 +838,15 @@ security, will return an "Access denied" Error Status ---------- -API V1.1 (cgminer v2.2.4) +API V1.1 (sgminer v2.2.4) -There were no changes to the API commands in cgminer v2.2.4, -however support was added to cgminer for IP address restrictions +There were no changes to the API commands in sgminer v2.2.4, +however support was added to sgminer for IP address restrictions with the --api-allow option ---------- -API V1.1 (cgminer v2.2.2) +API V1.1 (sgminer v2.2.2) Prior to V1.1, devs/gpu incorrectly reported GPU0 Intensity for all GPUs @@ -855,7 +855,7 @@ Modified API commands: ---------- -API V1.0 (cgminer v2.2.0) +API V1.0 (sgminer v2.2.0) Remove default CPU support @@ -873,9 +873,9 @@ Added API commands: ---------- -API V0.7 (cgminer v2.1.0) +API V0.7 (sgminer v2.1.0) -Initial release of the API in the main cgminer git +Initial release of the API in the main sgminer git Commands: 'version' @@ -896,18 +896,18 @@ Commands: miner.php ========= -miner.php is a PHP based interface to the cgminer RPC API +miner.php is a PHP based interface to the sgminer RPC API (referred to simply as the API below) It can show rig details, summaries and input fields to allow you to change -cgminer +sgminer You can also create custom summary pages with it It has two levels to the security: -1) cgminer can be configured to allow or disallow API access and access level +1) sgminer can be configured to allow or disallow API access and access level security for miner.php -2) miner.php can be configured to allow or disallow privileged cgminer - access, if cgminer is configured to allow privileged access for miner.php +2) miner.php can be configured to allow or disallow privileged sgminer + access, if sgminer is configured to allow privileged access for miner.php --------- @@ -931,40 +931,40 @@ Try one of these (apparently the first one is easiest - thanks jborkl) --------- -The basic cgminer option to enable the API is: +The basic sgminer option to enable the API is: --api-listen -or in your cgminer.conf +or in your sgminer.conf "api-listen" : true, (without the ',' on the end if it is the last item) -If the web server is running on the cgminer computer, the above +If the web server is running on the sgminer computer, the above is the only change required to give miner.php basic access to -the cgminer API +the sgminer API - -If the web server runs on a different computer to cgminer, -you will also need to tell cgminer to allow the web server -to access cgminer's API and tell miner.php where cgminer is +If the web server runs on a different computer to sgminer, +you will also need to tell sgminer to allow the web server +to access sgminer's API and tell miner.php where sgminer is Assuming a.b.c.d is the IP address of the web server, you -would add the following to cgminer: +would add the following to sgminer: --api-listen --api-allow a.b.c.d -or in your cgminer.conf +or in your sgminer.conf "api-listen" : true, "api-allow" : "a.b.c.d", -to tell cgminer to give the web server read access to the API +to tell sgminer to give the web server read access to the API -You also need to tell miner.php where cgminer is. -Assuming cgminer is at IP address e.f.g.h, then you would +You also need to tell miner.php where sgminer is. +Assuming sgminer is at IP address e.f.g.h, then you would edit miner.php and change the line $rigs = array('127.0.0.1:4028'); @@ -976,14 +976,14 @@ to See --api-network or --api-allow for more access details and how to give write access -You can however, also tell miner.php to find your cgminer rigs automatically +You can however, also tell miner.php to find your sgminer rigs automatically on the local subnet -Add the following to each cgminer: +Add the following to each sgminer: --api-mcast -or in your cgminer.conf +or in your sgminer.conf "api-mcast" : true, @@ -1020,7 +1020,7 @@ Done :) The rest of this documentation deals with the more complex functions of miner.php, using myminer.php, creaing custom -summaries and displaying multiple cgminer rigs +summaries and displaying multiple sgminer rigs --------- @@ -1125,13 +1125,13 @@ Default: $readonly = false; Set $readonly to true to force miner.php to be readonly -This means it won't allow you to change cgminer even if the cgminer API +This means it won't allow you to change sgminer even if the sgminer API options allow it to -If you set $readonly to false then it will check cgminer 'privileged' +If you set $readonly to false then it will check sgminer 'privileged' and will show input fields and buttons on the single rig page allowing you to change devices, pools and even quit or restart -cgminer +sgminer However, if the 'privileged' test fails, the code will set $readonly to true @@ -1178,7 +1178,7 @@ table of data Set $notify to true to attempt to display the notify command on the single rig page -If your older version of cgminer returns an 'Invalid command' +If your older version of sgminer returns an 'Invalid command' coz it doesn't have notify - it just shows the error status table --------- @@ -1218,7 +1218,7 @@ However, if $readonly is true, it will not display them Default: $rigs = array('127.0.0.1:4028'); -Set $rigs to an array of your cgminer rigs that are running +Set $rigs to an array of your sgminer rigs that are running format: 'IP:Port' or 'Host:Port' or 'Host:Port:Name' If you only have one rig, it will just show the detail of that rig If you have more than one rig it will show a summary of all the rigs @@ -1247,21 +1247,21 @@ If fewer are found, an error will be included at the top of the page Default: $mcastaddr = '224.0.0.75'; -API Multicast address all cgminers are listening on +API Multicast address all sgminers are listening on --------- Default: $mcastport = 4028; -API Multicast UDP port all cgminers are listening on +API Multicast UDP port all sgminers are listening on --------- Default: $mcastcode = 'FTW'; -The code all cgminers expect in the Multicast message sent +The code all sgminers expect in the Multicast message sent The message sent is "cgm-code-listport" Don't use the '-' character if you change it @@ -1271,7 +1271,7 @@ Default: $mcastlistport = 4027; UDP port number that is added to the broadcast message sent -that specifies to the cgminers the port to reply on +that specifies to the sgminers the port to reply on --------- @@ -1292,7 +1292,7 @@ Set $mcastretries to the number of times to retry the multicast If $mcastexpect is 0, this is simply the number of extra times that it will send the multicast request -N.B. cgminer doesn't listen for multicast requests for 1000ms after +N.B. sgminer doesn't listen for multicast requests for 1000ms after each one it hears If $mcastexpect is > 0, it will stop looking for replies once it @@ -1353,9 +1353,9 @@ The numbers are integer seconds The defaults should be OK for most cases However, the longer SND is, the longer you have to wait while -php hangs if the target cgminer isn't runnning or listening +php hangs if the target sgminer isn't runnning or listening -RCV should only ever be relevant if cgminer has hung but the +RCV should only ever be relevant if sgminer has hung but the API thread is still running, RCV would normally be >= SND Feel free to increase SND if your network is very slow @@ -1575,10 +1575,10 @@ The example given: --------- -With cgminer 2.10.2 and later, miner.php includes an extension to +With sgminer 2.10.2 and later, miner.php includes an extension to the custom pages that allows you to apply SQL style commands to the data: where, group, and having -cgminer 3.4.2 also includes another option 'gen' +sgminer 3.4.2 also includes another option 'gen' As an example, miner.php includes a more complex custom page called 'Pools' this includes the extension: @@ -1655,10 +1655,10 @@ in this case is the average difficulty of each share submitted THERE IS A SECURITY RISK WITH HOW GEN WORKS It simply replaces all the variables with their values and then requests PHP -to execute the formula - thus if a field value returned from a cgminer API +to execute the formula - thus if a field value returned from a sgminer API request contained PHP code, it could be executed by your web server -Of course cgminer doesn't do this, but if you do not control the cgminer that -returns the data in the API calls, someone could modify cgminer to return a +Of course sgminer doesn't do this, but if you do not control the sgminer that +returns the data in the API calls, someone could modify sgminer to return a PHP string in a field you use in 'gen' Thus use 'gen' at your own risk If someone feels the urge to write a mathematical interpreter in PHP to get diff --git a/doc/FAQ b/doc/FAQ index 8d22c6af..6de7e9c9 100644 --- a/doc/FAQ +++ b/doc/FAQ @@ -2,11 +2,11 @@ FAQ Q: Can I mine on servers from different networks (eg smartcoin and bitcoin) at the same time? -A: No, cgminer keeps a database of the block it's working on to ensure it does +A: No, sgminer keeps a database of the block it's working on to ensure it does not work on stale blocks, and having different blocks from two networks would make it invalidate the work from each other. -Q: Can I configure cgminer to mine with different login credentials or pools +Q: Can I configure sgminer to mine with different login credentials or pools for each separate device? A: No. @@ -25,18 +25,18 @@ their feature requests implemented. Q: Work keeps going to my backup pool even though my primary pool hasn't failed? -A: Cgminer checks for conditions where the primary pool is lagging and will +A: sgminer checks for conditions where the primary pool is lagging and will pass some work to the backup servers under those conditions. The reason for doing this is to try its absolute best to keep the GPUs working on something useful and not risk idle periods. You can disable this behaviour with the option --failover-only. Q: Is this a virus? -A: Cgminer is being packaged with other trojan scripts and some antivirus -software is falsely accusing cgminer.exe as being the actual virus, rather -than whatever it is being packaged with. If you installed cgminer yourself, +A: sgminer is being packaged with other trojan scripts and some antivirus +software is falsely accusing sgminer.exe as being the actual virus, rather +than whatever it is being packaged with. If you installed sgminer yourself, then you do not have a virus on your computer. Complain to your antivirus -software company. They seem to be flagging even source code now from cgminer +software company. They seem to be flagging even source code now from sgminer as viruses, even though text source files can't do anything by themself. Q: Can you modify the display to include more of one thing in the output and @@ -55,10 +55,10 @@ Q: What happened to CPU mining? A: Being increasingly irrelevant for most users, and a maintenance issue, it is no longer under active development and will not be supported. No binary builds supporting CPU mining will be released. Virtually all remaining users of CPU -mining are as back ends for illegal botnets. The main reason cgminer is being +mining are as back ends for illegal botnets. The main reason sgminer is being inappopriately tagged as a virus by antivirus software is due to the trojans packaging a CPU mining capable version of it. There is no longer ANY CPU mining -code in cgminer. If you are mining bitcoin with CPU today, you are spending +code in sgminer. If you are mining bitcoin with CPU today, you are spending 1000x more in electricity costs than you are earning in bitcoin. Q: GUI version? @@ -66,7 +66,7 @@ A: No. The RPC interface makes it possible for someone else to write one though. Q: I'm having an issue. What debugging information should I provide? -A: Start cgminer with your regular commands and add -D -T --verbose and provide +A: Start sgminer with your regular commands and add -D -T --verbose and provide the full startup output and a summary of your hardware, operating system, ATI driver version and ATI stream version. @@ -78,17 +78,17 @@ Q: Is it faster to mine on windows or linux? A: It makes no difference. It comes down to choice of operating system for their various features. Linux offers much better long term stability and remote monitoring and security, while windows offers you overclocking tools -that can achieve much more than cgminer can do on linux. +that can achieve much more than sgminer can do on linux. -Q: Can I mine with cgminer on a MAC? -A: cgminer will compile on OSX, but the performance of GPU mining is +Q: Can I mine with sgminer on a MAC? +A: sgminer will compile on OSX, but the performance of GPU mining is compromised due to the opencl implementation on OSX, there is no temperature or fanspeed monitoring, and the cooling design of most MACs, despite having powerful GPUs, will usually not cope with constant usage leading to a high risk of thermal damage. It is highly recommended not to mine on a MAC unless it is to a USB device. -Q: I'm trying to mine litecoin but cgminer shows MH values instead of kH and +Q: I'm trying to mine litecoin but sgminer shows MH values instead of kH and submits no shares? A: Add the --scrypt parameter. @@ -107,7 +107,7 @@ with -g 1. It is also recommended to use --failover-only since the work is effectively like a different block chain. If mining with a minirig, it is worth adding the --bfl-range option. -Q: Are OpenCL kernels from other mining software useable in cgminer? +Q: Are OpenCL kernels from other mining software useable in sgminer? A: No, the APIs are slightly different between the different software and they will not work. @@ -117,13 +117,13 @@ working in the logs? A: http://us.php.net/manual/en/sockets.installation.php Q: What is a PGA? -A: At the moment, cgminer supports 3 FPGAs: BitForce, Icarus and ModMiner. +A: At the moment, sgminer supports 3 FPGAs: BitForce, Icarus and ModMiner. They are Field-Programmable Gate Arrays that have been programmed to do Bitcoin mining. Since the acronym needs to be only 3 characters, the "Field-" part has been skipped. Q: What is an ASIC? -A: Cgminer currently supports 2 ASICs: Avalon and BitForce SC devices. They +A: sgminer currently supports 2 ASICs: Avalon and BitForce SC devices. They are Application Specify Integrated Circuit devices and provide the highest performance per unit power due to being dedicated to only one purpose. @@ -133,14 +133,14 @@ A: No. Q: What is stratum and how do I use it? A: Stratum is a protocol designed for pooled mining in such a way as to minimise the amount of network communications, yet scale to hardware of any -speed. With versions of cgminer 2.8.0+, if a pool has stratum support, cgminer +speed. With versions of sgminer 2.8.0+, if a pool has stratum support, sgminer will automatically detect it and switch to the support as advertised if it can. If you input the stratum port directly into your configuration, or use the -special prefix "stratum+tcp://" instead of "http://", cgminer will ONLY try to +special prefix "stratum+tcp://" instead of "http://", sgminer will ONLY try to use stratum protocol mining. The advantages of stratum to the miner are no delays in getting more work for the miner, less rejects across block changes, and far less network communications for the same amount of mining hashrate. If -you do NOT wish cgminer to automatically switch to stratum protocol even if it +you do NOT wish sgminer to automatically switch to stratum protocol even if it is detected, add the --fix-protocol option. Q: Why don't the statistics add up: Accepted, Rejected, Stale, Hardware Errors, @@ -156,7 +156,7 @@ Q: Why do the scrypt diffs not match with the current difficulty target? A: The current scrypt block difficulty is expressed in terms of how many multiples of the BTC difficulty it currently is (eg 28) whereas the shares of "difficulty 1" are actually 65536 times smaller than the BTC ones. The diff -expressed by cgminer is as multiples of difficulty 1 shares. +expressed by sgminer is as multiples of difficulty 1 shares. Q: Can I make a donation in litecoin? A: Yes, see SCRYPT-README for the address, but the author prefers bitcoin if @@ -165,7 +165,7 @@ possible. Q: My keyboard input momentarily pauses or repeats keys every so often on windows while mining? A: The USB implementation on windows can be very flaky on some hardware and -every time cgminer looks for new hardware to hotplug it it can cause these +every time sgminer looks for new hardware to hotplug it it can cause these sorts of problems. You can disable hotplug with: --hotplug 0 diff --git a/doc/GPU b/doc/GPU index 1541b88b..8bb3e856 100644 --- a/doc/GPU +++ b/doc/GPU @@ -2,31 +2,31 @@ EXECUTIVE SUMMARY ON GPU USAGE (SEE ALSO SCRYPT-README FOR SCRYPT MINING): Single pool, regular desktop: -cgminer -o http://pool:port -u username -p password +sgminer -o http://pool:port -u username -p password -By default if you have configured your system properly, cgminer will mine on +By default if you have configured your system properly, sgminer will mine on ALL GPUs, but in "dynamic" mode which is designed to keep your system usable and sacrifice some mining performance. Single pool, dedicated miner: -cgminer -o http://pool:port -u username -p password -I 9 +sgminer -o http://pool:port -u username -p password -I 9 Single pool, first card regular desktop, 3 other dedicated cards: -cgminer -o http://pool:port -u username -p password -I d,9,9,9 +sgminer -o http://pool:port -u username -p password -I d,9,9,9 Multiple pool, dedicated miner: -cgminer -o http://pool1:port -u pool1username -p pool1password -o http://pool2:port -u pool2usernmae -p pool2password -I 9 +sgminer -o http://pool1:port -u pool1username -p pool1password -o http://pool2:port -u pool2usernmae -p pool2password -I 9 Add overclocking settings, GPU and fan control for all cards: -cgminer -o http://pool:port -u username -p password -I 9 --auto-fan --auto-gpu --gpu-engine 750-950 --gpu-memclock 300 +sgminer -o http://pool:port -u username -p password -I 9 --auto-fan --auto-gpu --gpu-engine 750-950 --gpu-memclock 300 Add overclocking settings, GPU and fan control with different engine settings for 4 cards: -cgminer -o http://pool:port -u username -p password -I 9 --auto-fan --auto-gpu --gpu-engine 750-950,945,700-930,960 --gpu-memclock 300 +sgminer -o http://pool:port -u username -p password -I 9 --auto-fan --auto-gpu --gpu-engine 750-950,945,700-930,960 --gpu-memclock 300 READ WARNINGS AND DOCUMENTATION BELOW ABOUT OVERCLOCKING @@ -51,7 +51,7 @@ BUILDING FOR GPU SUPPORT: To build with GPU monitoring & clocking support: Extract the AMD ADL SDK, latest version - there is also no official place for these files. Copy all the *.h files in the "include" - directory into cgminer's ADL_SDK directory. + directory into sgminer's ADL_SDK directory. The easiest way to install the ATI AMD SPP sdk on linux is to actually put it into a system location. Then building will be simpler. Download the correct @@ -115,14 +115,14 @@ MAY CAUSE TO YOUR HARDWARE. OVERCLOCKING CAN INVALIDATE WARRANTIES, DAMAGE HARDWARE AND EVEN CAUSE FIRES. THE AUTHOR ASSUMES NO RESPONSIBILITY FOR ANY DAMAGE YOU MAY CAUSE OR UNPLANNED CHILDREN THAT MAY OCCUR AS A RESULT. -The GPU monitoring, clocking and fanspeed control incorporated into cgminer +The GPU monitoring, clocking and fanspeed control incorporated into sgminer comes through use of the ATI Display Library. As such, it only supports ATI -GPUs. Even if ADL support is successfully built into cgminer, unless the card +GPUs. Even if ADL support is successfully built into sgminer, unless the card and driver supports it, no GPU monitoring/settings will be available. -Cgminer supports initial setting of GPU engine clock speed, memory clock +sgminer supports initial setting of GPU engine clock speed, memory clock speed, voltage, fanspeed, and the undocumented powertune feature of 69x0+ GPUs. -The setting passed to cgminer is used by all GPUs unless separate values are +The setting passed to sgminer is used by all GPUs unless separate values are specified. All settings can all be changed within the menu on the fly on a per-GPU basis. @@ -137,7 +137,7 @@ will try to set the engine clock of card 0 to 950, 1 to 945, 2 to 930, 3 to 960 and all memory clocks to 300. AUTO MODES: -There are two "auto" modes in cgminer, --auto-fan and --auto-gpu. These can +There are two "auto" modes in sgminer, --auto-fan and --auto-gpu. These can be used independently of each other and are complementary. Both auto modes are designed to safely change settings while trying to maintain a target temperature. By default this is set to 75 degrees C but can be changed with: @@ -186,11 +186,11 @@ the target temperature by the hysteresis amount, which is set to 3 by default and can be changed with: --temp-hysteresis If the temperature drops below the target temperature, and engine clock speed -is not at the highest level set at startup, cgminer will raise the clock speed. +is not at the highest level set at startup, sgminer will raise the clock speed. If at any time you manually set an even higher clock speed successfully in -cgminer, it will record this value and use it as its new upper limit (and the +sgminer, it will record this value and use it as its new upper limit (and the same for low clock speeds and lower limits). If the temperature goes over the -cutoff limit (95 degrees by default), cgminer will completely disable the GPU +cutoff limit (95 degrees by default), sgminer will completely disable the GPU from mining and it will not be re-enabled unless manually done so. The cutoff temperature can be changed with: @@ -213,31 +213,31 @@ may report the value was changed successfully, and the new card power profile information contains the values you set it to, that the card itself may refuse to use those settings. As the performance profile changes dynamically, querying the "current" value on the card can be wrong as well. So when changing -values in cgminer, after a pause of 1 second, it will report to you the current +values in sgminer, after a pause of 1 second, it will report to you the current values where you should check that your change has taken. An example is that 6970 reference cards will accept low memory values but refuse to actually run those lower memory values unless they're within 125 of the engine clock speed. In that scenario, they usually set their real speed back to their default. -Cgminer reports the so-called "safe" range of whatever it is you are modifying +sgminer reports the so-called "safe" range of whatever it is you are modifying when you ask to modify it on the fly. However, you can change settings to values outside this range. Despite this, the card can easily refuse to accept your changes, or worse, to accept your changes and then silently ignore them. So there is absolutely to know how far to/from where/to it can set things safely or otherwise, and there is nothing stopping you from at least trying to set them outside this range. Being very conscious of these possible failures is why -cgminer will report back the current values for you to examine how exactly the +sgminer will report back the current values for you to examine how exactly the card has responded. Even within the reported range of accepted values by the card, it is very easy to crash just about any card, so it cannot use those values to determine what range to set. You have to provide something meaningful -manually for cgminer to work with through experimentation. +manually for sgminer to work with through experimentation. STARTUP / SHUTDOWN: -When cgminer starts up, it tries to read off the current profile information -for clock and fan speeds and stores these values. When quitting cgminer, it +When sgminer starts up, it tries to read off the current profile information +for clock and fan speeds and stores these values. When quitting sgminer, it will then try to restore the original values. Changing settings outside of -cgminer while it's running may be reset to the startup cgminer values when -cgminer shuts down because of this. +sgminer while it's running may be reset to the startup sgminer values when +sgminer shuts down because of this. --- @@ -246,10 +246,10 @@ GPU DEVICE ISSUES and use of --gpu-map GPUs mine with OpenCL software via the GPU device driver. This means you need to have both an OpenCL SDK installed, and the GPU device driver RUNNING (i.e. Xorg up and running configured for all devices that will mine on linux etc.) -Meanwhile, the hardware monitoring that cgminer offers for AMD devices relies +Meanwhile, the hardware monitoring that sgminer offers for AMD devices relies on the ATI Display Library (ADL) software to work. OpenCL DOES NOT TALK TO THE ADL. There is no 100% reliable way to know that OpenCL devices are identical -to the ADL devices, as neither give off the same information. cgminer does its +to the ADL devices, as neither give off the same information. sgminer does its best to correlate these devices based on the order that OpenCL and ADL numbers them. It is possible that this will fail for the following reasons: @@ -260,11 +260,11 @@ devices if you have two monitors connected to the one GPU. 3. There are more ADL devices than OpenCL. ADL devices include any ATI GPUs, including ones that can't mine, like some older R4xxx cards. -To cope with this, the ADVANCED option for --gpu-map is provided with cgminer. +To cope with this, the ADVANCED option for --gpu-map is provided with sgminer. DO NOT USE THIS UNLESS YOU KNOW WHAT YOU ARE DOING. The default will work the vast majority of the time unless you know you have a problem already. -To get useful information, start cgminer with just the -n option. You will get +To get useful information, start sgminer with just the -n option. You will get output that looks like this: [2012-04-25 13:17:34] CL Platform 0 vendor: Advanced Micro Devices, Inc. @@ -280,7 +280,7 @@ output that looks like this: [2012-04-25 13:17:34] 3 GPU devices max detected Note the number of devices here match, and the order is the same. If devices 1 -and 2 were different between Tahiti and Cayman, you could run cgminer with: +and 2 were different between Tahiti and Cayman, you could run sgminer with: --gpu-map 2:1,1:2 And it would swap the monitoring it received from ADL device 1 and put it to opencl device 2 and vice versa. @@ -322,22 +322,22 @@ A: Yes, pass a list separated by commas such as -I d,4,9,9 Q: The CPU usage is high. A: The ATI drivers after 11.6 have a bug that makes them consume 100% of one -CPU core unnecessarily so downgrade to 11.6. Binding cgminer to one CPU core on +CPU core unnecessarily so downgrade to 11.6. Binding sgminer to one CPU core on windows can minimise it to 100% (instead of more than one core). Driver version 11.11 on linux and 11.12 on windows appear to have fixed this issue. Note that later drivers may have an apparent return of high CPU usage. Try -'export GPU_USE_SYNC_OBJECTS=1' on Linux before starting cgminer. You can also +'export GPU_USE_SYNC_OBJECTS=1' on Linux before starting sgminer. You can also set this variable in windows via a batch file or on the command line before -starting cgminer with 'setx GPU_USE_SYNC_OBJECTS 1' +starting sgminer with 'setx GPU_USE_SYNC_OBJECTS 1' Q: My GPU hangs and I have to reboot it to get it going again? A: The more aggressively the mining software uses your GPU, the less overclock -you will be able to run. You are more likely to hit your limits with cgminer +you will be able to run. You are more likely to hit your limits with sgminer and you will find you may need to overclock your GPU less aggressively. The software cannot be responsible and make your GPU hang directly. If you simply cannot get it to ever stop hanging, try decreasing the intensity, and if even that fails, try changing to the poclbm kernel with -k poclbm, though you will -sacrifice performance. cgminer is designed to try and safely restart GPUs as +sacrifice performance. sgminer is designed to try and safely restart GPUs as much as possible, but NOT if that restart might actually crash the rest of the GPUs mining, or even the machine. It tries to restart them with a separate thread and if that separate thread dies, it gives up trying to restart any more @@ -348,21 +348,21 @@ A: The defaults are sane and safe. I'm not interested in changing them further. The starting fan speed is set to 50% in auto-fan mode as a safety precaution. -Q: I upgraded cgminer version and my hashrate suddenly dropped! -A: No, you upgraded your SDK version unwittingly between upgrades of cgminer +Q: I upgraded sgminer version and my hashrate suddenly dropped! +A: No, you upgraded your SDK version unwittingly between upgrades of sgminer and that caused your hashrate to drop. See the next question. -Q: I upgraded my ATI driver/SDK/cgminer and my hashrate suddenly dropped! -A: The hashrate performance in cgminer is tied to the version of the ATI SDK -that is installed only for the very first time cgminer is run. This generates +Q: I upgraded my ATI driver/SDK/sgminer and my hashrate suddenly dropped! +A: The hashrate performance in sgminer is tied to the version of the ATI SDK +that is installed only for the very first time sgminer is run. This generates binaries that are used by the GPU every time after that. Any upgrades to the SDK after that time will have no effect on the binaries. However, if you -install a fresh version of cgminer, and have since upgraded your SDK, new +install a fresh version of sgminer, and have since upgraded your SDK, new binaries will be built. It is known that the 2.6 ATI SDK has a huge hashrate penalty on generating new binaries. It is recommended to not use this SDK at this time unless you are using an ATI 7xxx card that needs it. -Q: Which AMD SDK is the best for cgminer? +Q: Which AMD SDK is the best for sgminer? A: At the moment, versions 2.4 and 2.5 work the best for R5xxx and R6xxx GPUS. SDK 2.6 or 2.7 works best for R7xxx. SDK 2.8 is known to have many problems. If you are need to use the 2.6+ SDK or R7xxx or later, the phatk kernel will @@ -377,33 +377,33 @@ some good releases were 11.6, 11.12, 12.4 and 12.8. Note that older cards may not work with the newer drivers. Q: I have multiple SDKs installed, can I choose which one it uses? -A: Run cgminer with the -n option and it will list all the platforms currently -installed. Then you can tell cgminer which platform to use with --gpu-platform. +A: Run sgminer with the -n option and it will list all the platforms currently +installed. Then you can tell sgminer which platform to use with --gpu-platform. -Q: cgminer reports no devices or only one device on startup on Linux although +Q: sgminer reports no devices or only one device on startup on Linux although I have multiple devices and drivers+SDK installed properly? -A: Try "export DISPLAY=:0" before running cgminer. +A: Try "export DISPLAY=:0" before running sgminer. -Q: cgminer crashes immediately on startup. +Q: sgminer crashes immediately on startup. A: One of the common reasons for this is that you have mixed files on your machine for the driver or SDK. Windows has a nasty history of not cleanly uninstalling files so you may have to use third party tools like driversweeper to remove old versions. The other common reason for this is windows -antivirus software is disabling one of the DLLs from working. If cgminer +antivirus software is disabling one of the DLLs from working. If sgminer starts with the -T option but never starts without it, this is a sure fire sign you have this problem and will have to disable your antivirus or make exceptions. -Q: Cgminer cannot see any of my GPUs even though I have configured them all +Q: sgminer cannot see any of my GPUs even though I have configured them all to be enabled and installed OpenCL (+/- Xorg is running and the DISPLAY variable is exported on linux)? -A: Check the output of 'cgminer -n', it will list what OpenCL devices your +A: Check the output of 'sgminer -n', it will list what OpenCL devices your installed SDK recognises. If it lists none, you have a problem with your version or installation of the SDK. -Q: Cgminer is mining on the wrong GPU, I want it on the AMD but it's mining +Q: sgminer is mining on the wrong GPU, I want it on the AMD but it's mining on my on board GPU? -A: Make sure the AMD OpenCL SDK is installed, check the output of 'cgminer -n' +A: Make sure the AMD OpenCL SDK is installed, check the output of 'sgminer -n' and use the appropriate parameter with --gpu-platform. Q: I'm getting much lower hashrates than I should be for my GPU? @@ -420,7 +420,7 @@ A: Yes but their hashrate is very poor and likely you'll be using much more energy than you'll be earning in coins. Q: Can I mine on both Nvidia and AMD GPUs at the same time? -A: No, you must run one instance of cgminer with the --gpu-platform option for +A: No, you must run one instance of sgminer with the --gpu-platform option for each. Q: Can I mine on Linux without running Xorg? @@ -438,7 +438,7 @@ should be getting about .9WU per kHash. If not, then try decreasing your intensity, do not increase the number of gpu-threads, and consider adding system RAM to match your GPU ram. You may also be using a bad combination of driver and/or SDK. If you are getting a lot more HW errors with the -current version of cgminer but were not on an older version, chances are that +current version of sgminer but were not on an older version, chances are that the older version simply wasn't reporting them so going back to and older version is not a real solution. @@ -447,29 +447,29 @@ A: Your parameters are too high. Don't add GPU threads, don't set intensity too high, decrease thread concurrency. See the SCRYPT-README for a lot more help. -Q: Cgminer stops mining (or my GPUs go DEAD) and I can't close it? -A: Once the driver has crashed, there is no way for cgminer to close cleanly. +Q: sgminer stops mining (or my GPUs go DEAD) and I can't close it? +A: Once the driver has crashed, there is no way for sgminer to close cleanly. You will have to kill it, and depending on how corrupted your driver state has gotten, you may even need to reboot. Windows is known to reset drivers -when they fail and cgminer will be stuck trying to use the old driver instance. +when they fail and sgminer will be stuck trying to use the old driver instance. GPUs going SICK or DEAD is a sign of overclocking too much, overheating, driver or hardware instability. -Q: I can't get any monitoring of temperatures or fanspeed with cgminer when +Q: I can't get any monitoring of temperatures or fanspeed with sgminer when I start it remotely? A: With linux, make sure to export the DISPLAY variable. On windows, you cannot access these monitoring values via RDP. This should work with tightVNC or teamviewer though. -Q: I change my GPU engine/memory/voltage and cgminer reports back no change? -A: Cgminer asks the GPU using the ATI Display Library to change settings, but +Q: I change my GPU engine/memory/voltage and sgminer reports back no change? +A: sgminer asks the GPU using the ATI Display Library to change settings, but the driver and hardware are free to do what it wants with that query, including ignoring it. Some GPUs are locked with one or more of those properties as well. The most common of these is that many GPUs only allow a fixed difference between the engine clock speed and the memory clock speed (such as the memory being no lower than the engine - 150). Other 3rd party tools have unofficial data on these devices on windows and can get the memory clock speed down -further but cgminer does not have access to these means. +further but sgminer does not have access to these means. Q: I have multiple GPUs and although many devices show up, it appears to be working only on one GPU splitting it up. @@ -491,11 +491,11 @@ A: No. The software is unchanged regardless of which driver/SDK/ADL_SDK version you are running. However if you change SDKs you should delete any generated .bin files for them to be recreated with the new SDK. -Q: I do not want cgminer to modify my engine/clock/fanspeed? -A: Cgminer only modifies values if you tell it to via some parameters. +Q: I do not want sgminer to modify my engine/clock/fanspeed? +A: sgminer only modifies values if you tell it to via some parameters. Otherwise it will just monitor the values. -Q: Cgminer does not disable my GPU even though it hit the overheat temperature? +Q: sgminer does not disable my GPU even though it hit the overheat temperature? A: It only disables GPUs if you enable the --auto-gpu option. If you don't give it parameters for engine clock it will not adjust engine clocks with this option. diff --git a/doc/SCRYPT b/doc/SCRYPT index 42dcc9c2..3154b883 100644 --- a/doc/SCRYPT +++ b/doc/SCRYPT @@ -18,7 +18,7 @@ GPU ram. If you have less system ram than your GPU has, it may not be possible to mine at any reasonable rate. There are 5 main parameters to tuning scrypt, all of which are optional for -further fine tuning. When you start mining, cgminer may fail IN RANDOM WAYS. +further fine tuning. When you start mining, sgminer may fail IN RANDOM WAYS. They are all due to parameters being outside what the GPU can cope with. NOTE that if it does not fail at startup, the presence of hardware errors (HW) @@ -41,7 +41,7 @@ export GPU_USE_SYNC_OBJECTS=1 may help CPU usage a little as well. On windows the same commands can be passed via a batch file if the following -lines are in the .bat before starting cgminer: +lines are in the .bat before starting sgminer: setx GPU_MAX_ALLOC_PERCENT 100 setx GPU_USE_SYNC_OBJECTS 1 @@ -53,20 +53,20 @@ run out of ram. High intensities start writing over the same ram and it is highly dependent on the GPU, but they can start actually DECREASING your hashrate, or even worse, start producing garbage with HW errors skyrocketing, or locking up the system altogether. Note that if you do -NOT specify an intensity, cgminer uses dynamic mode which is designed +NOT specify an intensity, sgminer uses dynamic mode which is designed to minimise the harm to a running desktop and performance WILL be poor. -The lower limit to intensity with scrypt is usually 8 and cgminer will +The lower limit to intensity with scrypt is usually 8 and sgminer will prevent it going too low. SUMMARY: Setting this for reasonable hashrates is mandatory. --shaders XXX -is an option where you tell cgminer how many shaders your GPU has. This -helps cgminer try to choose some meaningful baseline parameters. Use +is an option where you tell sgminer how many shaders your GPU has. This +helps sgminer try to choose some meaningful baseline parameters. Use this table below to determine how many shaders your GPU has, and note that there are some variants of these cards, and nvidia shaders are much much lower and virtually pointless trying to mine on. If this is not -set, cgminer will query the device for how much memory it supports and +set, sgminer will query the device for how much memory it supports and will try to set a value based on that. SUMMARY: This will get you started but fine tuning for optimal performance is required. Using --thread-concurrency is recommended instead. @@ -99,7 +99,7 @@ GPU Shaders 5870 1600 5970 (5870x2) -These are only used as a rough guide for cgminer, and it is rare that this is +These are only used as a rough guide for sgminer, and it is rare that this is all you will need to set. @@ -108,7 +108,7 @@ Optional parameters to tune: --thread-concurrency: This tunes the optimal size of work that scrypt can do. It is internally tuned -by cgminer to be the highest reasonable multiple of shaders that it can +by sgminer to be the highest reasonable multiple of shaders that it can allocate on your GPU. Ideally it should be a multiple of your shader count. vliw5 architecture (R5XXX) would be best at 5x shaders, while VLIW4 (R6xxx and R7xxx) are best at 4x. Setting thread concurrency overrides anything you put @@ -118,7 +118,7 @@ and increases hashrate. -g: Once you have found the optimal shaders and intensity, you can start increasing -the -g value till cgminer fails to start. This is really only of value if you +the -g value till sgminer fails to start. This is really only of value if you want to run low intensities as you will be unable to run more than 1. SUMMARY: Don't touch this. @@ -126,7 +126,7 @@ SUMMARY: Don't touch this. This tunes a compromise between ram usage and performance. Performance peaks at a gap of 2, but increasing the gap can save you some GPU ram, but almost always at the cost of significant loss of hashrate. Setting lookup gap -overrides the default of 2, but cgminer will use the --shaders value to choose +overrides the default of 2, but sgminer will use the --shaders value to choose a thread-concurrency if you haven't chosen one. SUMMARY: Don't touch this. @@ -173,7 +173,7 @@ export GPU_MAX_ALLOC_PERCENT=100 or on windows this: setx GPU_MAX_ALLOC_PERCENT 100 in the same console/bash/dos prompt/bat file/whatever you want to call it, -before running cgminer. +before running sgminer. First, find the highest thread concurrency that you can start it at. They should all start at 8192 but some will go up to 3 times that. Don't go too high on the @@ -183,9 +183,9 @@ intensity while testing and don't change gpu threads. If you cannot go above Delete any .bin files so you're starting from scratch and see what bins get generated. -First try without any thread concurrency or even shaders, as cgminer will try to +First try without any thread concurrency or even shaders, as sgminer will try to find an optimal value -cgminer -I 13 +sgminer -I 13 If that starts mining, see what bin was generated, it is likely the largest meaningful TC you can set. diff --git a/doc/windows-build.txt b/doc/windows-build.txt index 2da205de..6e98912b 100644 --- a/doc/windows-build.txt +++ b/doc/windows-build.txt @@ -59,9 +59,9 @@ Ctrl-D or typing "logout" and pressing the enter key should get you out of the window. ************************************************************************************** -* Copy CGMiner source to your MSYS working directory * +* Copy sgminer source to your MSYS working directory * ************************************************************************************** -Copy CGMiner source code directory into: +Copy sgminer source code directory into: \MinGW\msys\1.0\home\(folder with your user name) ************************************************************************************** @@ -87,7 +87,7 @@ Go to this url ==> http://developer.amd.com/tools/graphics-development/display-l Download and unzip the file you downloaded. Pull adl_defines.h, adl_sdk.h, and adl_structures.h out of the include folder Put those files into the ADL_SDK folder in your source tree as shown below. -\MinGW\msys\1.0\home\(folder with your user name)\cgminer-x.x.x\ADL_SDK +\MinGW\msys\1.0\home\(folder with your user name)\sgminer-x.x.x\ADL_SDK ************************************************************************************** * Install GTK-WIN, required for Pkg-config in the next step * @@ -125,12 +125,12 @@ Edit the file \MinGW\lib\pkgconfig\libcurl.pc and change "-lcurl" to Ref. http://old.nabble.com/gcc-working-with-libcurl-td20506927.html ************************************************************************************** -* Build cgminer.exe * +* Build sgminer.exe * ************************************************************************************** Run the MinGW MSYS shell (Start Icon/keyboard key ==> All Programs ==> MinGW ==> MinGW Shell). -Change the working directory to your CGMiner project folder. -Example: cd cgminer-2.1.2 [Enter Key] if you are unsure then type "ls -la" +Change the working directory to your sgminer project folder. +Example: cd sgminer-2.1.2 [Enter Key] if you are unsure then type "ls -la" Another way is to type "cd cg" and then press the tab key; It will auto fill. Type the lines below one at a time. Look for problems after each one before going on to the next. @@ -139,18 +139,18 @@ to the next. autoreconf -fvi CFLAGS="-O2 -msse2" ./configure (additional config options, see below) make - strip cgminer.exe <== only do this if you are not compiling for debugging + strip sgminer.exe <== only do this if you are not compiling for debugging ************************************************************************************** * Copy files to a build directory/folder * ************************************************************************************** -Make a directory and copy the following files into it. This will be your CGMiner +Make a directory and copy the following files into it. This will be your sgminer Folder that you use for mining. Remember the .cl filenames could change on later releases. If you installed a different version of libcurl then some of those dll's may be different as well. - cgminer.exe from \MinGW\msys\1.0\home\(username)\cgminer-x.x.x - *.cl from \MinGW\msys\1.0\home\(username)\cgminer-x.x.x - README from \MinGW\msys\1.0\home\(username)\cgminer-x.x.x + sgminer.exe from \MinGW\msys\1.0\home\(username)\sgminer-x.x.x + *.cl from \MinGW\msys\1.0\home\(username)\sgminer-x.x.x + README from \MinGW\msys\1.0\home\(username)\sgminer-x.x.x libcurl.dll from \MinGW\bin libidn-11.dll from \MinGW\bin libeay32.dll from \MinGW\bin @@ -169,7 +169,7 @@ Extract the share\git-core folder and place it into \MinGW\share. After the previous step you should have a folder called \MinGW\share\git-core. To test if it is working, open a MinGW shell and type the following: git config -–global core.autocrlf false (note: one time run only) - git clone git://github.com/ckolivas/cgminer.git + git clone git://github.com/ckolivas/sgminer.git If you simply just want to update the source after you have already cloned, type: git pull @@ -187,7 +187,7 @@ Copy the ADL .h files into that folder/directory. Open your favorite text editor and type the following into it. cp -av ../ADL_SDK/*.h ADL_SDK Save the file as "adl.sh" and then place the file into "\MinGW\msys\1.0\bin". -From now on when your current working directory is the cgminer source directory +From now on when your current working directory is the sgminer source directory You can simply type "adl.sh" and it will place the ADL header files into place For you. Make sure you never remove the ADL_SDK folder from your home folder. @@ -217,7 +217,7 @@ You may now exit the MSYS shell. Ctrl-D or typing "logout" and pressing the enter key should get you out of the window. -You will have to copy "libusb-1.0.dll" to your working cgminer binary directory. +You will have to copy "libusb-1.0.dll" to your working sgminer binary directory. You will find "libusb-1.0.dll" in the \MinGW\bin directory/folder. Use this method if libusb does not work for you on Ztex. Once someone lets us know @@ -235,7 +235,7 @@ Extract the the following from the file and place in where directed. Copy libusb.h from include\libusbx-1.0 to \MinGW\include\libusb-1.0\libusb.h Copy contents of MinGW32\static \MinGW\lib Copy contents of MinGW32\dll to \MinGW\lib -You will have to copy "libusb-1.0.dll" to your working cgminer binary directory. +You will have to copy "libusb-1.0.dll" to your working sgminer binary directory. ************************************************************************************** * Some ./configure options * diff --git a/cgminer.c b/sgminer.c similarity index 100% rename from cgminer.c rename to sgminer.c