Browse Source

misc: Replace many (but not all) instances of 'cgminer' with 'sgminer'.

Just ran a `sed -i 's/cgminer/sgminer/'` on several files.
nfactor-troky
Noel Maersk 11 years ago
parent
commit
5b977125fa
  1. 4
      AUTHORS.md
  2. 38
      Makefile.am
  3. 50
      README.md
  4. 4
      api.c
  5. 32
      configure.ac
  6. 194
      doc/API
  7. 44
      doc/FAQ
  8. 126
      doc/GPU
  9. 28
      doc/SCRYPT
  10. 30
      doc/windows-build.txt
  11. 0
      sgminer.c

4
AUTHORS.md

@ -5,17 +5,17 @@
* Scrypt-only refactor and maintenance: Noel Maersk <veox at wemakethings dot net> LfxRFgXzA13TSTxgFGUFEtumv5ShGzAmLw * Scrypt-only refactor and maintenance: Noel Maersk <veox at wemakethings dot net> LfxRFgXzA13TSTxgFGUFEtumv5ShGzAmLw
* Core code: Con Kolivas <kernel@kolivas.org> 15qSxP1SQcUX3o4nhkfdbgyoWEFMomJ4rZ * Core code: Con Kolivas <kernel@kolivas.org> 15qSxP1SQcUX3o4nhkfdbgyoWEFMomJ4rZ
* Improvements to core: Martin Danielsen <kalroth@gmail.com> * Improvements to core: Martin Danielsen <kalroth@gmail.com>
* API: Andrew Smith <kan0i {at} kano-kun [dot] net> 1Jjk2LmktEQKnv8r2cZ9MvLiZwZ9gxabKm
## Bug fixes ## Bug fixes
Too many to list. See: 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) * [ckolivas/cgminer](https://github.com/ckolivas/cgminer/graphs/contributors)
## Legacy ## Legacy
* API: Andrew Smith <kan0i {at} kano-kun [dot] net> 1Jjk2LmktEQKnv8r2cZ9MvLiZwZ9gxabKm
* Original CPU mining software: Jeff Garzik <jgarzik@pobox.com> * Original CPU mining software: Jeff Garzik <jgarzik@pobox.com>

38
Makefile.am

@ -12,33 +12,33 @@ SUBDIRS = lib compat ccan
INCLUDES = $(PTHREAD_FLAGS) -fno-strict-aliasing $(JANSSON_CPPFLAGS) INCLUDES = $(PTHREAD_FLAGS) -fno-strict-aliasing $(JANSSON_CPPFLAGS)
bin_PROGRAMS = cgminer bin_PROGRAMS = sgminer
cgminer_LDFLAGS = $(PTHREAD_FLAGS) sgminer_LDFLAGS = $(PTHREAD_FLAGS)
cgminer_LDADD = $(DLOPEN_FLAGS) @LIBCURL_LIBS@ @JANSSON_LIBS@ @PTHREAD_LIBS@ \ sgminer_LDADD = $(DLOPEN_FLAGS) @LIBCURL_LIBS@ @JANSSON_LIBS@ @PTHREAD_LIBS@ \
@OPENCL_LIBS@ @NCURSES_LIBS@ @PDCURSES_LIBS@ @WS2_LIBS@ \ @OPENCL_LIBS@ @NCURSES_LIBS@ @PDCURSES_LIBS@ @WS2_LIBS@ \
@MM_LIBS@ @RT_LIBS@ @MATH_LIBS@ lib/libgnu.a ccan/libccan.a @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 if !HAVE_WINDOWS
cgminer_CPPFLAGS += @LIBCURL_CFLAGS@ sgminer_CPPFLAGS += @LIBCURL_CFLAGS@
endif endif
cgminer_CPPFLAGS += $(ADL_CPPFLAGS) sgminer_CPPFLAGS += $(ADL_CPPFLAGS)
cgminer_SOURCES := cgminer.c sgminer_SOURCES := sgminer.c
cgminer_SOURCES += api.c sgminer_SOURCES += api.c
cgminer_SOURCES += elist.h miner.h compat.h bench_block.h sgminer_SOURCES += elist.h miner.h compat.h bench_block.h
cgminer_SOURCES += util.c util.h uthash.h sgminer_SOURCES += util.c util.h uthash.h
cgminer_SOURCES += sha2.c sha2.h sgminer_SOURCES += sha2.c sha2.h
cgminer_SOURCES += logging.c logging.h sgminer_SOURCES += logging.c logging.h
cgminer_SOURCES += driver-opencl.c driver-opencl.h sgminer_SOURCES += driver-opencl.c driver-opencl.h
cgminer_SOURCES += ocl.c ocl.h sgminer_SOURCES += ocl.c ocl.h
cgminer_SOURCES += findnonce.c findnonce.h sgminer_SOURCES += findnonce.c findnonce.h
cgminer_SOURCES += adl.c adl.h adl_functions.h sgminer_SOURCES += adl.c adl.h adl_functions.h
cgminer_SOURCES += scrypt.c scrypt.h sgminer_SOURCES += scrypt.c scrypt.h
cgminer_SOURCES += *.cl sgminer_SOURCES += *.cl
bin_SCRIPTS = $(top_srcdir)/*.cl bin_SCRIPTS = $(top_srcdir)/*.cl

50
README.md

@ -1,8 +1,4 @@
# cgminer # sgminer
**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.
## Introduction ## 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 cgminer by Con Kolivas (ckolivas), which is in turn based on cpuminer by
Jeff Garzik (jgarzik). Jeff Garzik (jgarzik).
GIT TREE: https://github.com/veox/cgminer GIT TREE: https://github.com/veox/sgminer
License: GPLv3. See `COPYING` for details. License: GPLv3. See `COPYING` for details.
@ -57,27 +53,27 @@ If building from git:
autoconf autoconf
automake automake
CGMiner specific configuration options: sgminer-specific configuration options:
--disable-adl Override detection and disable building with adl --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 ### *nix build instructions
If needed, place include headers (`*.h` files) from `ADL_SDK_*<VERSION>*.zip` in `cgminer/ADL_SDK`. If needed, place include headers (`*.h` files) from `ADL_SDK_*<VERSION>*.zip` in `sgminer/ADL_SDK`.
Then: Then:
autoreconf -i autoreconf -i
CFLAGS="-O2 -Wall -march=native" ./configure <options> CFLAGS="-O2 -Wall -march=native" ./configure <options>
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 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 ### Windows build instructions
See `windows-build.txt` (might be outdated). See `doc/windows-build.txt` (might be outdated).
## Basic Usage ## Basic Usage
@ -85,7 +81,7 @@ See `windows-build.txt` (might be outdated).
**WARNING**: documentation below this point has not been updated since the **WARNING**: documentation below this point has not been updated since the
fork. 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 arguments and it will load your configuration.
Any configuration file may also contain a single Any configuration file may also contain a single
@ -99,23 +95,23 @@ output.
Single pool: Single pool:
cgminer -o http://pool:port -u username -p password sgminer -o http://pool:port -u username -p password
Multiple pools: 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: 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: 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: 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: The list of proxy types are:
http: standard http 1.1 proxy http: standard http 1.1 proxy
@ -125,15 +121,15 @@ The list of proxy types are:
socks4a: socks4a proxy socks4a: socks4a proxy
socks5h: socks5 proxy using a hostname 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 the above will not be available. All are available since CURL version
7.19.4. 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 applied to all pools that don't specify their own proxy setting like
above. 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 See `doc/GPU` for more information regarding GPU mining and
`doc/SCRYPT` for more information regarding Scrypt mining. `doc/SCRYPT` for more information regarding Scrypt mining.
@ -231,7 +227,7 @@ The total difficulty of rejected shares
The number of hardware erorrs The number of hardware erorrs
The work utility defined as the number of diff1 shares work / minute 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: 1 SS: 0 NB: 1 LW: 8 GF: 1 RF: 1
ST is STaged work items (ready to use). 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 Block: 0074c5e482e34a506d2a051a... Started: [17:17:22] Best share: 2.71K
This shows a short stretch of the current block, when the new block started, 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. this time.
@ -337,7 +333,7 @@ the above quotas in a configuration file they would be specified thus:
## Logging ## 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 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 and `logfile.txt` will contain the logged output at the log level you
specify (normal, verbose, debug etc.) 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, 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 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 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 standard output (not advisable with the ncurses UI), any valid positive number
for that file descriptor, or a filename. for that file descriptor, or a filename.
To log share data to a file named "share.log", you can use either: 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 ./sgminer --sharelog 50 -o xxx -u yyy -p zzz 50>share.log
./cgminer --sharelog share.log -o xxx -u yyy -p zzz ./sgminer --sharelog share.log -o xxx -u yyy -p zzz
For every share found, data will be logged in a CSV (Comma Separated Value) For every share found, data will be logged in a CSV (Comma Separated Value)
format: format:

4
api.c

@ -368,7 +368,7 @@ struct CODES {
{ SEVERITY_ERR, MSG_MISID, PARAM_NONE, "Missing device id parameter" }, { SEVERITY_ERR, MSG_MISID, PARAM_NONE, "Missing device id parameter" },
{ SEVERITY_SUCC, MSG_GPUDEV, PARAM_GPU, "GPU%d" }, { SEVERITY_SUCC, MSG_GPUDEV, PARAM_GPU, "GPU%d" },
{ SEVERITY_SUCC, MSG_NUMGPU, PARAM_NONE, "GPU count" }, { 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_INVJSON, PARAM_NONE, "Invalid JSON" },
{ SEVERITY_ERR, MSG_MISCMD, PARAM_CMD, "Missing JSON '%s'" }, { SEVERITY_ERR, MSG_MISCMD, PARAM_CMD, "Missing JSON '%s'" },
{ SEVERITY_ERR, MSG_MISPID, PARAM_NONE, "Missing pool id parameter" }, { 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); message(io_data, MSG_VERSION, 0, NULL, isjson);
io_open = io_add(io_data, isjson ? COMSTR JSON_VERSION : _VERSION COMSTR); 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 = api_add_const(root, "API", APIVERSION, false);
root = print_data(root, buf, isjson, false); root = print_data(root, buf, isjson, false);

32
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_PREREQ(2.59)
AC_CANONICAL_SYSTEM AC_CANONICAL_SYSTEM
AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR([cgminer.c]) AC_CONFIG_SRCDIR([sgminer.c])
AC_CONFIG_HEADERS([config.h]) AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE([foreign subdir-objects]) 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_rev], , [m4_define([v_rev], [0])])
m4_ifdef([v_rel], , [m4_define([v_rel], [])]) m4_ifdef([v_rel], , [m4_define([v_rel], [])])
AC_DEFINE_UNQUOTED(CGMINER_MAJOR_VERSION, [v_maj], [Major version]) AC_DEFINE_UNQUOTED(SGMINER_MAJOR_VERSION, [v_maj], [Major version])
AC_DEFINE_UNQUOTED(CGMINER_MINOR_VERSION, [v_min], [Minor version]) AC_DEFINE_UNQUOTED(SGMINER_MINOR_VERSION, [v_min], [Minor version])
AC_DEFINE_UNQUOTED(CGMINER_MINOR_SUBVERSION, [v_mic], [Micro version]) AC_DEFINE_UNQUOTED(SGMINER_MINOR_SUBVERSION, [v_mic], [Micro version])
version_info="lt_rev:lt_cur:lt_age" version_info="lt_rev:lt_cur:lt_age"
release_info="v_rel" release_info="v_rel"
AC_SUBST(version_info) AC_SUBST(version_info)
@ -128,11 +128,11 @@ if test "x$have_win32" != xtrue; then
fi fi
fi fi
have_cgminer_sdk=false have_sgminer_sdk=false
if test -n "$CGMINER_SDK"; then if test -n "$SGMINER_SDK"; then
have_cgminer_sdk=true have_sgminer_sdk=true
CPPFLAGS="-I$CGMINER_SDK/include $CPPFLAGS" CPPFLAGS="-I$SGMINER_SDK/include $CPPFLAGS"
LDFLAGS="-L$CGMINER_SDK/lib/$target $LDFLAGS" LDFLAGS="-L$SGMINER_SDK/lib/$target $LDFLAGS"
fi fi
opencl="yes" opencl="yes"
@ -194,8 +194,8 @@ if test "$found_opencl" = 1; then
if test "x$adl" != xno; then if test "x$adl" != xno; then
ADL_CPPFLAGS= ADL_CPPFLAGS=
AC_CHECK_FILE([$srcdir/ADL_SDK/adl_sdk.h], [have_adl=true; ADL_CPPFLAGS=-I$srcdir], have_adl=false,) 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 if test x$have_adl+$have_sgminer_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,) AC_CHECK_FILE([$SGMINER_SDK/include/ADL_SDK/adl_sdk.h], [have_adl=true; ADL_CPPFLAGS=-I$SGMINER_SDK/include], have_adl=false,)
fi fi
if test x$have_adl = xtrue if test x$have_adl = xtrue
then then
@ -241,14 +241,14 @@ JANSSON_LIBS="compat/jansson-2.5/src/.libs/libjansson.a"
PKG_PROG_PKG_CONFIG() 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 if test "x$have_x86_64" = xtrue; then
ARCH_DIR=x86_64 ARCH_DIR=x86_64
else else
ARCH_DIR=x86 ARCH_DIR=x86
fi fi
PKG_CONFIG="${PKG_CONFIG:-pkg-config} --define-variable=arch=$ARCH_DIR --define-variable=target=$target --define-variable=cgminersdkdir=$CGMINER_SDK" PKG_CONFIG="${PKG_CONFIG:-pkg-config} --define-variable=arch=$ARCH_DIR --define-variable=target=$target --define-variable=sgminersdkdir=$SGMINER_SDK"
PKG_CONFIG_PATH="$CGMINER_SDK/lib/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}" PKG_CONFIG_PATH="$SGMINER_SDK/lib/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}"
fi fi
AC_ARG_ENABLE([libcurl], AC_ARG_ENABLE([libcurl],
@ -315,7 +315,7 @@ if test "x$prefix" = xNONE; then
prefix=/usr/local prefix=/usr/local
fi 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]) AC_DEFINE_UNQUOTED([SCRYPT_KERNNAME], ["scrypt130511"], [Filename for scrypt kernel])

194
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, It also includes some detailed information at the end,
about using miner.php 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 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 If you add the "--api-network" option, it will accept API requests from any
network attached computer. 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 Without a /prefix is the same as specifying /32
0/0 means all IP addresses. 0/0 means all IP addresses.
The 'W:' on the front gives that address/subnet privileged access to commands 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. Without it those commands return an access denied status.
See --api-groups below to define other groups like W: See --api-groups below to define other groups like W:
Privileged access is checked in the order the IP addresses were supplied to 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 are both specified
With "--api-allow", 127.0.0.1 is not by default given access unless 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 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 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 Message matching the Code value N
Description=string 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. if it was specified at runtime.
For API version 1.10 and later: 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 Request Reply Section Details
------- ------------- ------- ------- ------------- -------
version VERSION CGMiner=cgminer, version version VERSION SGMiner=sgminer, version
API=API| version API=API| version
config CONFIG Some miner configuration information: config CONFIG Some miner configuration information:
@ -241,13 +241,13 @@ The list of requests - a (*) means it requires privileged access - and replies:
save|filename (*) save|filename (*)
none There is no reply section just the STATUS section 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 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 default if not specified
quit (*) none There is no status section but just a single "BYE" 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 notify NOTIFY The last status and history count of each devices
problem 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 stating an error if you do not have privileged
access to the API and success if you do have access to the API and success if you do have
privilege privilege
The command doesn't change anything in cgminer The command doesn't change anything in sgminer
pgaenable|N (*) pgaenable|N (*)
none There is no reply section just the STATUS section 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,...| e.g. DEVDETAILS=0,Name=GPU,ID=0,Driver=opencl,...|
restart (*) none There is no status section but just a single 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 stats STATS Each device or pool that has 1 or more getworks
with a list of stats regarding getwork times 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 none There is no reply section just the STATUS section
stating that the zero, and optional summary, was stating that the zero, and optional summary, was
done 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 statistics will be zeroed other than the numbers
displayed by the usbstats and stats commands displayed by the usbstats and stats commands
If Which='bestshare', only the 'Best Share' values If Which='bestshare', only the 'Best Share' values
are zeroed for each pool and the global are zeroed for each pool and the global
'Best Share' 'Best Share'
The true/false option determines if a full summary 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. displayed on exit.
hotplug|N (*) none There is no reply section just the STATUS section 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 lockstats (*) none There is no reply section just the STATUS section
stating the results of the request stating the results of the request
A warning reply means lock stats are not compiled A warning reply means lock stats are not compiled
into cgminer into sgminer
The API writes all the lock stats to stderr The API writes all the lock stats to stderr
When you enable, disable or restart a GPU, PGA or ASC, you will also get 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 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 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 immediately
When you switch to a different pool to the current one (including by priority 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 windows
Obviously, the JSON format is simply just the names as given before the '=' Obviously, the JSON format is simply just the names as given before the '='
with the values after 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 turn on debug with the API command 'debug|debug' you will also get messages
showing some details of the requests received and the replies 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 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 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 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 API.java/API.class
a java program to access the API (with source code) 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: 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: Modified API commands:
'devs' 'gpu' 'pga' and 'asc' - add 'Device Elapsed' '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: Added API command:
'lockstats' - display cgminer dev lock stats if compiled in 'lockstats' - display sgminer dev lock stats if compiled in
Modified API command: Modified API command:
'summary' - add 'MHS %ds' (where %d is the log interval) '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: Added API command:
'poolquota' - Set pool quota for load-balance strategy. '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 Muticast identification added to the API
---------- ----------
API V1.28 (cgminer v3.3.4) API V1.28 (sgminer v3.3.4)
Modified API commands: Modified API commands:
'devs', 'pga', 'asc', 'gpu' - add 'Device Hardware%' and 'Device Rejected%' '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: Added API commands:
'ascset' - with: BTB opt=millivolts val=1000 to 1310 - core voltage '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: Added API commands:
'asc' '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: Added API commands:
'zero' '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: Added API commands:
'pgaset' - with: MMQ opt=clock val=160 to 230 (and a multiple of 2) '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: Enforced output limitation:
all extra records beyond the output limit of the API (~64k) are ignored 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: Added API commands:
'usbstats' 'usbstats'
@ -621,14 +621,14 @@ Modified output:
---------- ----------
API V1.20 (cgminer v2.8.5) API V1.20 (sgminer v2.8.5)
Modified API commands: Modified API commands:
'pools' - add 'Has Stratum', 'Stratum Active', 'Stratum URL' '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: Added API commands:
'debug' '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: Modified API commands:
'stats' - add 'Work Had Roll Time', 'Work Can Roll', 'Work Had Expire', '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: Added API commands:
'coin' '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: Added API commands:
'failover-only' '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: Added API commands:
'poolpriority' 'poolpriority'
---------- ----------
API V1.14 (cgminer v2.5.0) API V1.14 (sgminer v2.5.0)
Modified API commands: Modified API commands:
'stats' - more icarus timing stats added '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: Added API commands:
'check' '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 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: Modified API commands:
'stats' - more pool stats added '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: Modified API commands:
'save' no longer requires a filename (use default if not specified) '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: Added API commands:
'stats' 'stats'
@ -737,14 +737,14 @@ Added API commands:
N.B. the 'stats' command can change at any time so any specific content N.B. the 'stats' command can change at any time so any specific content
present should not be relied upon. present should not be relied upon.
The data content is mainly used for debugging purposes or hidden options 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: Modified API commands:
'pools' added "Last Share Time" 'pools' added "Last Share Time"
---------- ----------
API V1.9 (cgminer v2.4.0) API V1.9 (sgminer v2.4.0)
Added API commands: Added API commands:
'restart' '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: Added API commands:
'devdetails' '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: Added API commands:
'removepool' '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: Added API commands:
'pga' '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: Added API commands:
'notify' '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: Added API commands:
'addpool' '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: Added API commands:
'enablepool' '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, There were no changes to the API commands in sgminer v2.2.4,
however support was added to cgminer for IP address restrictions however support was added to sgminer for IP address restrictions
with the --api-allow option 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 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 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: Commands:
'version' 'version'
@ -896,18 +896,18 @@ Commands:
miner.php 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) (referred to simply as the API below)
It can show rig details, summaries and input fields to allow you to change 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 You can also create custom summary pages with it
It has two levels to the security: 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 security for miner.php
2) miner.php can be configured to allow or disallow privileged cgminer 2) miner.php can be configured to allow or disallow privileged sgminer
access, if cgminer is configured to allow privileged access for miner.php 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 --api-listen
or in your cgminer.conf or in your sgminer.conf
"api-listen" : true, "api-listen" : true,
(without the ',' on the end if it is the last item) (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 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, If the web server runs on a different computer to sgminer,
you will also need to tell cgminer to allow the web server you will also need to tell sgminer to allow the web server
to access cgminer's API and tell miner.php where cgminer is 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 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 --api-listen --api-allow a.b.c.d
or in your cgminer.conf or in your sgminer.conf
"api-listen" : true, "api-listen" : true,
"api-allow" : "a.b.c.d", "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. You also need to tell miner.php where sgminer is.
Assuming cgminer is at IP address e.f.g.h, then you would Assuming sgminer is at IP address e.f.g.h, then you would
edit miner.php and change the line edit miner.php and change the line
$rigs = array('127.0.0.1:4028'); $rigs = array('127.0.0.1:4028');
@ -976,14 +976,14 @@ to
See --api-network or --api-allow for more access details See --api-network or --api-allow for more access details
and how to give write access 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 on the local subnet
Add the following to each cgminer: Add the following to each sgminer:
--api-mcast --api-mcast
or in your cgminer.conf or in your sgminer.conf
"api-mcast" : true, "api-mcast" : true,
@ -1020,7 +1020,7 @@ Done :)
The rest of this documentation deals with the more complex The rest of this documentation deals with the more complex
functions of miner.php, using myminer.php, creaing custom 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; $readonly = false;
Set $readonly to true to force miner.php to be readonly 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 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 and will show input fields and buttons on the single rig page
allowing you to change devices, pools and even quit or restart 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 However, if the 'privileged' test fails, the code will set $readonly to
true true
@ -1178,7 +1178,7 @@ table of data
Set $notify to true to attempt to display the notify command on Set $notify to true to attempt to display the notify command on
the single rig page 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 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: Default:
$rigs = array('127.0.0.1:4028'); $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' 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 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 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: Default:
$mcastaddr = '224.0.0.75'; $mcastaddr = '224.0.0.75';
API Multicast address all cgminers are listening on API Multicast address all sgminers are listening on
--------- ---------
Default: Default:
$mcastport = 4028; $mcastport = 4028;
API Multicast UDP port all cgminers are listening on API Multicast UDP port all sgminers are listening on
--------- ---------
Default: Default:
$mcastcode = 'FTW'; $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" The message sent is "cgm-code-listport"
Don't use the '-' character if you change it Don't use the '-' character if you change it
@ -1271,7 +1271,7 @@ Default:
$mcastlistport = 4027; $mcastlistport = 4027;
UDP port number that is added to the broadcast message sent 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 If $mcastexpect is 0, this is simply the number of extra times
that it will send the multicast request 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 each one it hears
If $mcastexpect is > 0, it will stop looking for replies once it 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 The defaults should be OK for most cases
However, the longer SND is, the longer you have to wait while 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 API thread is still running, RCV would normally be >= SND
Feel free to increase SND if your network is very slow 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 custom pages that allows you to apply SQL style commands to
the data: where, group, and having 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' As an example, miner.php includes a more complex custom page called 'Pools'
this includes the extension: 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 THERE IS A SECURITY RISK WITH HOW GEN WORKS
It simply replaces all the variables with their values and then requests PHP 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 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 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 cgminer to return a returns the data in the API calls, someone could modify sgminer to return a
PHP string in a field you use in 'gen' PHP string in a field you use in 'gen'
Thus use 'gen' at your own risk Thus use 'gen' at your own risk
If someone feels the urge to write a mathematical interpreter in PHP to get If someone feels the urge to write a mathematical interpreter in PHP to get

44
doc/FAQ

@ -2,11 +2,11 @@ FAQ
Q: Can I mine on servers from different networks (eg smartcoin and bitcoin) at Q: Can I mine on servers from different networks (eg smartcoin and bitcoin) at
the same time? 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 not work on stale blocks, and having different blocks from two networks would
make it invalidate the work from each other. 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? for each separate device?
A: No. 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 Q: Work keeps going to my backup pool even though my primary pool hasn't
failed? 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 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 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 useful and not risk idle periods. You can disable this behaviour with the
option --failover-only. option --failover-only.
Q: Is this a virus? Q: Is this a virus?
A: Cgminer is being packaged with other trojan scripts and some antivirus A: sgminer is being packaged with other trojan scripts and some antivirus
software is falsely accusing cgminer.exe as being the actual virus, rather software is falsely accusing sgminer.exe as being the actual virus, rather
than whatever it is being packaged with. If you installed cgminer yourself, 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 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. 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 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 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 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 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 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 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. 1000x more in electricity costs than you are earning in bitcoin.
Q: GUI version? Q: GUI version?
@ -66,7 +66,7 @@ A: No. The RPC interface makes it possible for someone else to write one
though. though.
Q: I'm having an issue. What debugging information should I provide? 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 the full startup output and a summary of your hardware, operating system, ATI
driver version and ATI stream version. 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 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 their various features. Linux offers much better long term stability and
remote monitoring and security, while windows offers you overclocking tools 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? Q: Can I mine with sgminer on a MAC?
A: cgminer will compile on OSX, but the performance of GPU mining is 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 compromised due to the opencl implementation on OSX, there is no temperature
or fanspeed monitoring, and the cooling design of most MACs, despite having 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 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 risk of thermal damage. It is highly recommended not to mine on a MAC unless
it is to a USB device. 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? submits no shares?
A: Add the --scrypt parameter. 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 effectively like a different block chain. If mining with a minirig, it is worth
adding the --bfl-range option. 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 A: No, the APIs are slightly different between the different software and they
will not work. will not work.
@ -117,13 +117,13 @@ working in the logs?
A: http://us.php.net/manual/en/sockets.installation.php A: http://us.php.net/manual/en/sockets.installation.php
Q: What is a PGA? 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 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 mining. Since the acronym needs to be only 3 characters, the "Field-" part has
been skipped. been skipped.
Q: What is an ASIC? 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 are Application Specify Integrated Circuit devices and provide the highest
performance per unit power due to being dedicated to only one purpose. 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? 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 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 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. 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 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 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, 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 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. is detected, add the --fix-protocol option.
Q: Why don't the statistics add up: Accepted, Rejected, Stale, Hardware Errors, 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 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 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 "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? Q: Can I make a donation in litecoin?
A: Yes, see SCRYPT-README for the address, but the author prefers bitcoin if 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 Q: My keyboard input momentarily pauses or repeats keys every so often on
windows while mining? windows while mining?
A: The USB implementation on windows can be very flaky on some hardware and 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: sorts of problems. You can disable hotplug with:
--hotplug 0 --hotplug 0

126
doc/GPU

@ -2,31 +2,31 @@ EXECUTIVE SUMMARY ON GPU USAGE (SEE ALSO SCRYPT-README FOR SCRYPT MINING):
Single pool, regular desktop: 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 ALL GPUs, but in "dynamic" mode which is designed to keep your system usable
and sacrifice some mining performance. and sacrifice some mining performance.
Single pool, dedicated miner: 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: 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: 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: 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: 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 READ WARNINGS AND DOCUMENTATION BELOW ABOUT OVERCLOCKING
@ -51,7 +51,7 @@ BUILDING FOR GPU SUPPORT:
To build with GPU monitoring & clocking support: To build with GPU monitoring & clocking support:
Extract the AMD ADL SDK, latest version - there is also no official Extract the AMD ADL SDK, latest version - there is also no official
place for these files. Copy all the *.h files in the "include" 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 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 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 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. 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 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. 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. 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 specified. All settings can all be changed within the menu on the fly on a
per-GPU basis. 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. 960 and all memory clocks to 300.
AUTO MODES: 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 be used independently of each other and are complementary. Both auto modes
are designed to safely change settings while trying to maintain a target 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: 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: and can be changed with:
--temp-hysteresis --temp-hysteresis
If the temperature drops below the target temperature, and engine clock speed 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 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 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 from mining and it will not be re-enabled unless manually done so. The cutoff
temperature can be changed with: 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 information contains the values you set it to, that the card itself may
refuse to use those settings. As the performance profile changes dynamically, 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 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 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 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. 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. 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 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 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 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 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 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 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 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 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 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: STARTUP / SHUTDOWN:
When cgminer starts up, it tries to read off the current profile information When sgminer starts up, it tries to read off the current profile information
for clock and fan speeds and stores these values. When quitting cgminer, it 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 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 sgminer while it's running may be reset to the startup sgminer values when
cgminer shuts down because of this. 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 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. 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.) 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 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 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 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: 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, 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. 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 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. 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: output that looks like this:
[2012-04-25 13:17:34] CL Platform 0 vendor: Advanced Micro Devices, Inc. [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 [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 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 --gpu-map 2:1,1:2
And it would swap the monitoring it received from ADL device 1 and put it to And it would swap the monitoring it received from ADL device 1 and put it to
opencl device 2 and vice versa. 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. Q: The CPU usage is high.
A: The ATI drivers after 11.6 have a bug that makes them consume 100% of one 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 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 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 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 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? 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 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 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 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 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 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 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 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 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 further. The starting fan speed is set to 50% in auto-fan mode as a safety
precaution. precaution.
Q: I upgraded cgminer version and my hashrate suddenly dropped! Q: I upgraded sgminer version and my hashrate suddenly dropped!
A: No, you upgraded your SDK version unwittingly between upgrades of cgminer A: No, you upgraded your SDK version unwittingly between upgrades of sgminer
and that caused your hashrate to drop. See the next question. and that caused your hashrate to drop. See the next question.
Q: I upgraded my ATI driver/SDK/cgminer and my hashrate suddenly dropped! Q: I upgraded my ATI driver/SDK/sgminer and my hashrate suddenly dropped!
A: The hashrate performance in cgminer is tied to the version of the ATI SDK A: The hashrate performance in sgminer is tied to the version of the ATI SDK
that is installed only for the very first time cgminer is run. This generates 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 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 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 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 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. 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. 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. 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 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. not work with the newer drivers.
Q: I have multiple SDKs installed, can I choose which one it uses? 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 A: Run sgminer 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. 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? 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 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 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 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 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 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 sign you have this problem and will have to disable your antivirus or make
exceptions. 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 to be enabled and installed OpenCL (+/- Xorg is running and the DISPLAY
variable is exported on linux)? 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 installed SDK recognises. If it lists none, you have a problem with your
version or installation of the SDK. 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? 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. and use the appropriate parameter with --gpu-platform.
Q: I'm getting much lower hashrates than I should be for my GPU? 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. energy than you'll be earning in coins.
Q: Can I mine on both Nvidia and AMD GPUs at the same time? 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. each.
Q: Can I mine on Linux without running Xorg? 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 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 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 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 the older version simply wasn't reporting them so going back to and older
version is not a real solution. 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 too high, decrease thread concurrency. See the SCRYPT-README for a lot more
help. help.
Q: Cgminer stops mining (or my GPUs go DEAD) and I can't close it? 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 cgminer to close cleanly. 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 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 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, GPUs going SICK or DEAD is a sign of overclocking too much, overheating,
driver or hardware instability. 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? I start it remotely?
A: With linux, make sure to export the DISPLAY variable. On windows, you 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 cannot access these monitoring values via RDP. This should work with tightVNC
or teamviewer though. or teamviewer though.
Q: I change my GPU engine/memory/voltage and cgminer reports back no change? Q: I change my GPU engine/memory/voltage and sgminer reports back no change?
A: Cgminer asks the GPU using the ATI Display Library to change settings, but 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 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. 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 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 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 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 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 Q: I have multiple GPUs and although many devices show up, it appears to be
working only on one GPU splitting it up. 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 you are running. However if you change SDKs you should delete any generated
.bin files for them to be recreated with the new SDK. .bin files for them to be recreated with the new SDK.
Q: I do not want cgminer to modify my engine/clock/fanspeed? Q: I do not want sgminer to modify my engine/clock/fanspeed?
A: Cgminer only modifies values if you tell it to via some parameters. A: sgminer only modifies values if you tell it to via some parameters.
Otherwise it will just monitor the values. 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 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 it parameters for engine clock it will not adjust engine clocks with this
option. option.

28
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. to mine at any reasonable rate.
There are 5 main parameters to tuning scrypt, all of which are optional for 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. 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) 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. may help CPU usage a little as well.
On windows the same commands can be passed via a batch file if the following 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_MAX_ALLOC_PERCENT 100
setx GPU_USE_SYNC_OBJECTS 1 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 is highly dependent on the GPU, but they can start actually DECREASING
your hashrate, or even worse, start producing garbage with HW errors your hashrate, or even worse, start producing garbage with HW errors
skyrocketing, or locking up the system altogether. Note that if you do 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. 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. prevent it going too low.
SUMMARY: Setting this for reasonable hashrates is mandatory. SUMMARY: Setting this for reasonable hashrates is mandatory.
--shaders XXX --shaders XXX
is an option where you tell cgminer how many shaders your GPU has. This is an option where you tell sgminer how many shaders your GPU has. This
helps cgminer try to choose some meaningful baseline parameters. Use helps sgminer try to choose some meaningful baseline parameters. Use
this table below to determine how many shaders your GPU has, and note 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 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 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. will try to set a value based on that.
SUMMARY: This will get you started but fine tuning for optimal performance is SUMMARY: This will get you started but fine tuning for optimal performance is
required. Using --thread-concurrency is recommended instead. required. Using --thread-concurrency is recommended instead.
@ -99,7 +99,7 @@ GPU Shaders
5870 1600 5870 1600
5970 (5870x2) 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. all you will need to set.
@ -108,7 +108,7 @@ Optional parameters to tune:
--thread-concurrency: --thread-concurrency:
This tunes the optimal size of work that scrypt can do. It is internally tuned 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. 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 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 R7xxx) are best at 4x. Setting thread concurrency overrides anything you put
@ -118,7 +118,7 @@ and increases hashrate.
-g: -g:
Once you have found the optimal shaders and intensity, you can start increasing 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. want to run low intensities as you will be unable to run more than 1.
SUMMARY: Don't touch this. 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 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 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 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. a thread-concurrency if you haven't chosen one.
SUMMARY: Don't touch this. SUMMARY: Don't touch this.
@ -173,7 +173,7 @@ export GPU_MAX_ALLOC_PERCENT=100
or on windows this: or on windows this:
setx GPU_MAX_ALLOC_PERCENT 100 setx GPU_MAX_ALLOC_PERCENT 100
in the same console/bash/dos prompt/bat file/whatever you want to call it, 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 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 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 Delete any .bin files so you're starting from scratch and see what bins get
generated. 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 find an optimal value
cgminer -I 13 sgminer -I 13
If that starts mining, see what bin was generated, it is likely the largest If that starts mining, see what bin was generated, it is likely the largest
meaningful TC you can set. meaningful TC you can set.

30
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. 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) \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. Download and unzip the file you downloaded.
Pull adl_defines.h, adl_sdk.h, and adl_structures.h out of the include folder 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. 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 * * 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 Ref. http://old.nabble.com/gcc-working-with-libcurl-td20506927.html
************************************************************************************** **************************************************************************************
* Build cgminer.exe * * Build sgminer.exe *
************************************************************************************** **************************************************************************************
Run the MinGW MSYS shell Run the MinGW MSYS shell
(Start Icon/keyboard key ==> All Programs ==> MinGW ==> MinGW Shell). (Start Icon/keyboard key ==> All Programs ==> MinGW ==> MinGW Shell).
Change the working directory to your CGMiner project folder. Change the working directory to your sgminer project folder.
Example: cd cgminer-2.1.2 [Enter Key] if you are unsure then type "ls -la" 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. 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 Type the lines below one at a time. Look for problems after each one before going on
to the next. to the next.
@ -139,18 +139,18 @@ to the next.
autoreconf -fvi autoreconf -fvi
CFLAGS="-O2 -msse2" ./configure (additional config options, see below) CFLAGS="-O2 -msse2" ./configure (additional config options, see below)
make 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 * * 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 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 releases. If you installed a different version of libcurl then some of those dll's
may be different as well. may be different as well.
cgminer.exe 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)\cgminer-x.x.x *.cl from \MinGW\msys\1.0\home\(username)\sgminer-x.x.x
README from \MinGW\msys\1.0\home\(username)\cgminer-x.x.x README from \MinGW\msys\1.0\home\(username)\sgminer-x.x.x
libcurl.dll from \MinGW\bin libcurl.dll from \MinGW\bin
libidn-11.dll from \MinGW\bin libidn-11.dll from \MinGW\bin
libeay32.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. 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: 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 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: If you simply just want to update the source after you have already cloned, type:
git pull 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. Open your favorite text editor and type the following into it.
cp -av ../ADL_SDK/*.h ADL_SDK cp -av ../ADL_SDK/*.h ADL_SDK
Save the file as "adl.sh" and then place the file into "\MinGW\msys\1.0\bin". 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 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. 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 Ctrl-D or typing "logout" and pressing the enter key should get you out of the
window. 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. 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 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 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\static \MinGW\lib
Copy contents of MinGW32\dll to \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 * * Some ./configure options *

0
cgminer.c → sgminer.c

Loading…
Cancel
Save