SkillAgentSearch skills...

Sgminer

Scrypt GPU miner

Install / Use

/learn @sgminer-dev/Sgminer
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

sgminer

Introduction

This is a multi-threaded multi-pool GPU miner with ATI GPU monitoring, (over)clocking and fanspeed support for scrypt-based cryptocurrency. It is based on cgminer by Con Kolivas (ckolivas), which is in turn based on cpuminer by Jeff Garzik (jgarzik).

releases: https://github.com/sgminer-dev/sgminer/releases

git tree: https://github.com/sgminer-dev/sgminer

bugtracker: https://github.com/sgminer-dev/sgminer/issues

irc: #sgminer and #sgminer-dev on freenode

mailing lists: https://sourceforge.net/p/sgminer/mailman/

License: GPLv3. See COPYING for details.

Documentation

Documentation is available in directory doc. It is organised by topics:

  • API for the RPC API specification;
  • configuration.md for (largely incomplete) detailed information on all configuration options;
  • FAQ.md for frequently asked questions;
  • GPU for semi-obsolete information on GPU configuration options and mining SHA256d-based coins;
  • kernel.md for OpenCL kernel-related information, including development procedure;
  • MINING.md for how to find the right balance in GPU configuration to mine Scrypt-based coins efficiently;
  • windows-build.txt for information on how to build on Windows.

Note that most of the documentation is outdated or incomplete. If you want to contribute, fork this repository, update as needed, and submit a pull request.

Building

Dependencies

Mandatory:

Optional:

  • curses dev library - libncurses5-dev on Debian or libpdcurses on WIN32, for text user interface
  • AMD ADL SDK - version 6, required for ATI GPU monitoring & clocking

If building from git:

  • autoconf
  • automake

sgminer-specific configuration options:

--disable-adl           Override detection and disable building with adl
--disable-adl-checks
--without-curses        Do not compile support for curses TUI

Debian Example

apt-get install libcurl4-openssl-dev pkg-config libtool libncurses5-dev

AMD APP SDK and AMD ADL SDK must be downloaded from the amd websites.

*nix build instructions

If needed, place include headers (*.h files) from ADL_SDK_*<VERSION>*.zip in sgminer/ADL_SDK.

Then:

git submodule init
git submodule update
autoreconf -i
CFLAGS="-O2 -Wall -march=native -std=gnu99" ./configure <options>
make

To compile a version that can be used accross machines, remove -march=native.

To compile a debug version, replace -O2 with -ggdb.

Depending on your environment, replace -std=gnu99 with -std=c99.

Systemwide installation is optional. You may run sgminer from the build directory directly, or make install if you wish to install sgminer to a system location or a location you specified with --prefix.

Windows build instructions

See doc/windows-build.txt for MinGW compilation and cross-compiation, doc/cygwin-build.txt for building using Cygwin, or use the provided winbuild Microsoft Visual Studio project (tested on MSVS2010), with instructions in winbuild/README.txt.

Basic Usage

WARNING: documentation below this point has not been updated since the fork.

After saving configuration from the menu, you do not need to give sgminer any arguments and it will load your configuration.

Any configuration file may also contain a single

"include" : "filename"

to recursively include another configuration file.

Writing the configuration will save all settings from all files in the output.

Single pool:

sgminer -o http://pool:port -u username -p password

Multiple pools:

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:

sgminer -o "http:proxy:port|http://pool:port" -u username -p password

Single pool with a socks5 proxy, regular desktop:

sgminer -o "socks5:proxy:port|http://pool:port" -u username -p password

Single pool with stratum protocol support:

sgminer -o stratum+tcp://pool:port -u username -p password

The list of proxy types are: http: standard http 1.1 proxy http0: http 1.0 proxy socks4: socks4 proxy socks5: socks5 proxy socks4a: socks4a proxy socks5h: socks5 proxy using a hostname

If you compile sgminer with a version of CURL before 7.19.4 then some of the above will not be available. All are available since CURL version 7.19.4.

If you specify the --socks-proxy option to sgminer, it will only be applied to all pools that don't specify their own proxy setting like above.

For more advanced usage , run sgminer --help.

See doc/GPU for more information regarding GPU mining and doc/SCRYPT for more information regarding Scrypt mining.

Runtime usage

The following options are available while running with a single keypress:

[P]ool management [G]PU management [S]ettings [D]isplay options [Q]uit

P gives you:

Current pool management strategy: Failover [F]ailover only disabled [A]dd pool [R]emove pool [D]isable pool [E]nable pool [C]hange management strategy [S]witch pool [I]nformation

S gives you:

[Q]ueue: 1 [S]cantime: 60 [E]xpiry: 120 [W]rite config file [C]gminer restart

D gives you:

[N]ormal [C]lear [S]ilent mode (disable all output) [D]ebug:off [P]er-device:off [Q]uiet:off [V]erbose:off [R]PC debug:off [W]orkTime details:off co[M]pact: off [L]og interval:5

Q quits the application.

G gives you something like:

GPU 0: [124.2 / 191.3 Mh/s] [A:77 R:33 HW:0 U:1.73/m WU 1.73/m] Temp: 67.0 C Fan Speed: 35% (2500 RPM) Engine Clock: 960 MHz Memory Clock: 480 Mhz Vddc: 1.200 V Activity: 93% Powertune: 0% Last initialised: [2011-09-06 12:03:56] Thread 0: 62.4 Mh/s Enabled ALIVE Thread 1: 60.2 Mh/s Enabled ALIVE

[E]nable [D]isable [R]estart GPU [C]hange settings Or press any other key to continue

The running log shows output like this:

[2012-10-12 18:02:20] Accepted f0c05469 Diff 1/1 GPU 0 pool 1 [2012-10-12 18:02:22] Accepted 218ac982 Diff 7/1 GPU 1 pool 1 [2012-10-12 18:02:23] Accepted d8300795 Diff 1/1 GPU 3 pool 1 [2012-10-12 18:02:24] Accepted 122c1ff1 Diff 14/1 GPU 1 pool 1

The 8 byte hex value are the 2nd 8 bytes of the share being submitted to the pool. The 2 diff values are the actual difficulty target that share reached followed by the difficulty target the pool is currently asking for.

The output line shows the following: (5s):1713.6 (avg):1707.8 Mh/s | A:729 R:8 HW:0 WU:22.53/m

Each column is as follows: 5s: A 5 second exponentially decaying average hash rate avg: An all time average hash rate A: The total difficulty of Accepted shares R: The total difficulty of Rejected shares HW: The number of HardWare errors WU: The Work Utility defined as the number of diff1 shares work / minute (accepted or rejected).

GPU 1: 73.5C 2551RPM | 427.3/443.0Mh/s | A:8 R:0 HW:0 WU:4.39/m

Each column is as follows: Temperature (if supported) Fanspeed (if supported) A 5 second exponentially decaying average hash rate An all time average hash rate The total difficulty of accepted shares The total difficulty of rejected shares The number of hardware erorrs The work utility defined as the number of diff1 shares work / minute

The sgminer status line shows: ST: 1 SS: 0 NB: 1 LW: 8 GF: 1 RF: 1

ST is STaged work items (ready to use). SS is Stale Shares discarded (detected and not submitted so don't count as rejects) NB is New Blocks detected on the network LW is Locally generated Work items GF is Getwork Fail Occasions (server slow to provide work) RF is Remote Fail occasions (server slow to accept work)

The block display shows: Block: 0074c5e482e34a506d2a051a... Started: [17:17:22] Best share: 2.71K

This shows a short stretch of the current block, when the new block started, and the all time best difficulty share you've found since starting sgminer this time.

Multipool

Failover strategies

A number of different strategies for dealing with multipool setups are available. Each has their advantages and disadvantages so multiple strategies are available by user choice, as per the following list:

Failover

The default strategy is failover. This means that if you input a number of pools, it will try to use them as a priority list, moving away from the 1st to the 2nd, 2nd to 3rd and so on. If any of the earlier pools recover, it will move back to the higher priority ones.

Round robin

This strategy only moves from one pool to the next when the current one falls idle and makes no attempt to move otherwise.

Rotate

This strategy moves at user-defined intervals from one active pool to the next, skipping pools that are idle.

Load balance

This strategy sends work to all the pools on a quota basis. By default, all pools are allocated equal quotas unless specified with --quota. This apportioning of work is based on work handed out, not shares returned so is independent of difficulty targets or rejected shares. While a pool is disabled or dead, its quota is dropped until it is re-enabled. Quotas are forward looking, so if the quota is changed on the fly, it only affects future work. If all pools are set to zero quota or all pools with quota are dead, it will fall back to a failover mode. See quota below for more information.

The failover-only flag has special meaning in combination with load-balance mode and it will distribute quota back to priority pool 0 from any pools that are unable to provide work for any reason so as to maintain quota ratios between

View on GitHub
GitHub Stars639
CategoryDevelopment
Updated2mo ago
Forks812

Languages

C

Security Score

90/100

Audited on Jan 25, 2026

No findings