[EDIT 7-19-2011]
SmartCoin originated from the acronym
Simple
Miner
Administration through
Remote
Terminals.
As the name implies, smartcoin is designed specifically with administrating your mining machines remotely over SSH. As such, smartcoin doesn't have fancy gadgets or a fancy UI. This makes it very easy to administer your mining machines remotely over SSH on standard Linux/Windows terminal emulators, smartphones with terminal emulator software (ConnectBot for Android, for example), and even web-based SSH terminal emulator services (
www.gotossh.com, for example).
Although I'm the author of Smartcoin, I'm also an avid user of the software myself, and I am dedicated to making this the most stable and trusted mining solution running on Linux. Looking back, I simply can't imagine running my personal (but small) mining operation without it!
Smartcoin also has some unique features that you won't find anywhere else:
-A profile system that lets you specify how many instance of a miner runs on each GPU, and which workers to run against. Your profiles are stored, so that you can recall any profile you want to run at any time.
-An Automatic profile, which will get you started by simply entering your worker information into the system
-A built-in donation system that will allow you to help fund development of smartcoin, by simply donating some hashes each day to special donation pools. Of course, this is optional, and all done in the clear.
-A simple installer that will attempt to auto-detect system parameters for you. This includes GPU devices, paths to popular miners, paths the needed software, etc.
-A unified status display that allows you to watch all of your miner instances across all GPUs. This also includes "totalizers" that will add up the hash rate, acceptions, rejections etc. so that you have a full overview of your operation.
-An update system that makes keeping your local copy of smartcoin up to date. You can even choose to pull in "stable" or "experimental" changes, depending on whether you want the latest and greatest features, or if you would rather play it safe with tested and stable changes.
-A full failover system. You can set a preferred order of your profiles. If a pool in your profile goes down (from a ddos for example), then the next one in line is automatically loaded. When a higher priority profile comes back online, all the lower priority profiles below it go back offline. This all happens automatically!
- Security. SSH is the standard when it comes to remote administration over secure connection. While a lof of users have expressed that they would like a web based front end, it simply lacks the security that I feel is needed.
- Smartcoin is database driven. This allows for a lot of flexibility in adding features, as the SQL language its self can be leveraged to perform very complex operations quite easily.
- GPU lockup detection. With everyone wanting to squeeze every last hash out of their hardware via overclocking, it is common for GPUs that have been overclocked just a bit too much to "lock up". These types of conditions are now detected automatically, you can be alerted and even have your machine automatically reboot when this happens!
- Custom script execution - you can define your own initialization script that will be run automatically when smartcoin starts (to set your GPU fan speeds to 100%, for example). You can also define your own lockup script, which will automatically run when a lockup condition is detected.
Smartcoin is in continuous development. As such, there are a lot of features that are planned, just not implemented yet. Here is a brief list of planned features:
- Multi-machine support. This will allow smartcoin to control many mining devices securely over SSH connections. This simply means, you will be able to manage all of your miners, from one place easily
- Email support for daily/hourly/etc reports. Since smartcoin is text-based, a "screenshot" of the current status can also be sent with the report. Email support can also be used in the future to alert you if your GPU's are getting too hot, etc.
- A weighting system. This will allow you to dedicate hashing power to certain workers by specifying a percentage. Perhaps you want to dedicate 5% of your hashing power to Solo mining, for example.
INSTALLATIONInstallation is easy, but assumes that your machine is already set up for mining. Smartcoin its self is not a miner, and does not install any other software normally associated with a miner. It is made to sit on top of an already working miner. There are plenty of guides and threads regarding this, so I won't touch on it here. Right now, smartcoin is known to work on Ubuntu, LinuxCoin and Fedora. It may work on more setups, but many simply haven't been tested yet.
Requirements: findutils, sqlite3, bc, sysstat, openssh-server (these should install automatically in debian based distros such as LinuxCoin and Ubuntu, but pre-installing them beforehand is recommended. Fedora users should install these packages via yum before installing smartcoin)
installation:cd ~/
mkdir smartcoin
cd smartcoin
svn checkout http://smartcoin.googlecode.com/svn/branches/beta1/smartcoin ./
./smartcoin_install.sh
NOTE: smartcoin can be installed anywhere on the system, just replace the mkdir and cd statements above to reflect where you want to install smartcoin.
HOW TO UNINSTALLsudo rm -r ~/.smartcoin
sudo rm /usr/bin/smartcoin
sudo rm -r
HOW TO USETo use, simply type 'smartcoin' at the terminal. If smartcoin isn't already loaded and running in the background, it will start up the smartcoin system. If its found that smartcoin is already running in the background, you will be reattached to the smartcoin session automatically.
Upon starting or reattaching, you will initially be brought to the control tab. Here, you are able to configure smartcoin and administer the system. You can switch to the status tab by pressing ctrl+a, followed by the number 1 (ctral+a, release, 1). The status screen gives you an overview of your mining operation.
To return to the control screen, press ctrl+a, followed by the number 0.
To detach from smartcoin, either use the detach option on the control screen, or use the keys ctrl+a d. (A detached session continues to run in the background, so don't worry, your miners will keep hashing away)
To reattach to smartcoin, simply either type 'smartcoin' at the terminal, or screen -r smartcoin.
HOW TO KEEP UP TO DATESmartcoin has its own integrated update system. On the control screen, use option 11) Update to bring your local copy of smartcoin up-to-date.
DO NOT simply run an svn update on the smartcoin folder! Smartcoins update system has an advanced database patching system designed to keep your database schema in sync with recent changes, and is very important in keeping your system up to date
TROUBLESHOOTINGThough I have made every effort to make using and setting up smartcoin easy, it is still a very complex bit of software, and as such some users may experience problems getting it set up initially.
Smartcoin uses a linux utility called GNU Screen. GNU Screen is a complicated piece of software in its own right, but you have to at least know the basics to get full use of Smartcoin.
Below are the keystrokes used to perform certain actions. They are part of GNU screen, and I can't make them easier, sorry!
(ctrl+a 1 means, hit the control key and 'a' at the same time, then release them. Then press 1)
ctrl+a 0 -> Control screen
ctrl+a 1 -> 1st host machine (localhost normally)
ctrl+a 2 -> 2nd host machine (and so on.... Not supported yet)
ctrl+c -> Kill the script. Press o to reload it after killing it
ctrl+a d -> Detach (can also be done from control screen)
A log file is kept for the current session at ~/.smartcoin/smartcoin.log. This can often give clues as to what the problem is. Common problems include:
- Miners don't appear to be launching.
This is fairly easy to check. Disconnect from smartcoin, and run
screen -ls
You should see a screen instance with the name "miner" in it. If you don't, it likely means that your phoenix path, or the AMD/ATI sdk path is set incorrectly. Both of these can be edited from the control screen, option 4) Settings.
- Miners appear to have launched, but the status screen doesn't look right. Most workers are listed as "Down" and the hash rates don't add up
Right now, only phoenix is 100% supported. Poclbm will work, but the status screen will not work as it should. This will be fixed soon.
KNOWN ISSUES- Installer seems to work ok, though sometimes it may improperly identify things like GPUs, and paths to the phoenix miner and AMD/ATI sdk. These can be double-checked, and edited from the control screen.
- Entering a colon for the donation time in the settings menu setting crashes smartcoin_control.sh (enter times as 0100 for 1:00am, 1400 for 2:00pm etc... until I start filtering the input.)
- Deleting miners isn't "safe" yet(you may delete the miner flagged as default). If you delete a miner, you may have to go to edit miners, and set a new one as default.
HOW TO REPORT BUGSSince smartcoin is rapidly evolving, it is
very important to know what revision you are running, what distro you are running etc. Current revision is shown at the top of each screen as r### (r300 for example). For each bug report you make here, please include the current revision you are running, whether you are running the stable or experimental branch, what distro you are running, as well as a paste of the ~/smartcoin/smartcoin.log
NOTE: smartcoin.log
will contain login information for your workers, so if you don't wish to share them, please edit them out first!
***** The Text Below Is From The Original Post, And Kept Here For Posterity *****
[edit 6-25-2011]
Beta is now released to public
http://forum.bitcoin.org/index.php?topic=16548.msg282643#msg282643Hello
With all of the ddos attacks and pools going down all the time, I was getting a lot of downtime on my miners. I'm a very experienced Linux programmer, so I decided to take on a project to end all of the madness. I have been using it (in early alpha stages) for the last several days with great success - I haven't missed a hash even with deepbit and slush's pools having bouts of downtime.
SmartCoin -
Simple
Miner
Administration for
Remote
Terminals
As the name implies, this is a full-blown administration system for miners that is specifically designed with terminals in mind (remote ssh shell access, etc.). It is also so much more - its a full
load-balanced system that tracks all of the miner instances on a machine, and reports everything on one easy to view screen. The idea is to spread many miner instances across several GPUs for multiple pools (and even solo!) on one machine (i'm mining to 4 concurrent pools as we speak. If any one of them goes down, the system re-balances its self with any remaining good pools, and my hashing power remains the same). SmartCoin also makes automated deployments a breeze - it can start everything up (according to "mapping rules") at boot up, and makes it simple to restart an entire array of miners. You can even change settings on the fly and watch as the system magically adjusts itsself. SmartCoin is fully backed by a MySql database, and written in 100% linux CLI tools (bash, sed, awk). Another neat perk to this, is that you can put a small percentage of your hashing power into solo mining if you like, while you're mining to several pools at once! This is NOT a proxy - its a load balancing system that does not interfere with Long Polling or suffer from any other problems experienced with proxies.
Here is what is finished and working:
- The database engine is working and the database structure is finished
- Status monitoring is nearly 100% complete. View everything from one page!
- Load balancing works amazingly well, and has been absolutely 100% reliable
- The system is fully usable, just missing planned features
- virtually any miner/pool/worker is supported - you need only define it once in the database
- Nearly any combination of pools/miners/workers can be load spread among any combinations of GPUs
- Namecoin compatibility.. Put a small percentage of your hashing power into solo or pooled namecoin mining while you also mine for bitcoins!
Here is what is planned, but not yet implemented (or in various stages of implementation)
- A "monitor" function. This will monitor all mining processes going on, and can alert you on various conditions, automatically reset the SmartCoin system, reboot the computer and even attempt known pool "failover" server addresses. This will also have a dedicated output screen where it reports what its doing and where it is at in the monitoring process.
- A "control" function. This will be the simple interface where you can do things like reboot the server, manually restart SmartCoin, and add entries to the database/set up mappings. (currently I do this with raw SQL which is fine for me, but I'm sure others would appreciate this feature)
- ATI only, for the moment (I don't plan on changing this)
- Only tested on Ubuntu (will open to some early testers when I hit a beta milestone)
- Possibly an http gateway for monitoring and control over the web
- Remove hard coding. This started as a private system to run my own miners. After I realized the incredible reliability and value it adds to a mining operation, I decided to make it generalized (so that anyone could use it).. There is still some hard-coded parts that I am cleaning up!
What can you do to help?Feature suggestions would be great.
Donations would be great (please see my signature, any small bit helps)
Pledges to donate upon full completion would be great
Testing and feedback (when I release to beta)
And now, some "Screenshots" (dumps of screen sessions) that shows the status monitor, and shows off the awesome load balancing. (Please ignore any inconsistencies in the screenshots, as they changed from time to time as I was testing layout ideas)
S.M.A.R.T MINING SYSTEM Mon Jun 13 09:32:16 EDT 2011
--------------------------------------------------------------------------------
EOF encountered in a comment.
(standard_in) 1: syntax error
GPU 0: Temp: 79.50 load: GPU load : 99%
GPU 1: Temp: 76.00 load: GPU load : 99%
GPU 2: Temp: 60.50 load: GPU load : 99%
CPU Load : 1.68%
Local Bitcoin balance : 61.89000000
deepbit-0: <<>>
deepbit-1: <<>>
deepbit-2: <<>>
deepbit-T: [0 Mhash/sec] [0 Accepted] [0 Rejected]
bitcoincz-0: <<>>
bitcoincz-1: <<>>
bitcoincz-2: <<>>
bitcoincz-T: [0 Mhash/sec] [0 Accepted] [0 Rejected]
btcguild-0: [331.28 Mhash/sec] [307 Accepted] [33 Rejected] [RPC (+LP)]
btcguild-1: [331.12 Mhash/sec] [332 Accepted] [31 Rejected] [RPC (+LP)]
btcguild-2: [331.51 Mhash/sec] [329 Accepted] [22 Rejected] [RPC (+LP)]
btcguild-T: [993.91 Mhash/sec] [968 Accepted] [86 Rejected]
Grand Total: [993.91 Mhash/sec] [968 Accepted] [86 Rejected] [% Stales]
Note in this one that bitcoincz and deepbit were down, so all of the load went to btcguild
S.M.A.R.T MINING SYSTEM Mon Jun 13 14:28:32 EDT 2011
--------------------------------------------------------------------------------
error: couldn't connect to server
GPU 0: Temp: 79.50 load: GPU load : 99%
GPU 1: Temp: 76.50 load: GPU load : 99%
GPU 2: Temp: 64.50 load: GPU load : 99%
CPU Load : 1.88%
Local Bitcoin balance :
--------deepbit--------
card0: <<>>
card2: [166.33 Mhash/sec] [141 Accepted] [7 Rejected] [RPC (+LP)]
card1: <<>>
Total: 166.33 MHasg/sec
--------slush--------
card0: <<>>
card2: <<>>
card1: <<>>
Total: 0 MHasg/sec
--------btcguild--------
card1: [331.40 Mhash/sec] [138 Accepted] [11 Rejected] [RPC (+LP)]
card0: <<>>
card2: [166.33 Mhash/sec] [141 Accepted] [9 Rejected] [RPC (+LP)]
Total: 497.73 MHasg/sec
Grand Total: [664.06 Mhash/sec] [0 Accepted] [0 Rejected] [% Stales]
Here you can see deepbit coming back up... And btc guild had a hiccup on one of the cards..
S.M.A.R.T MINING SYSTEM Mon Jun 13 15:09:45 EDT 2011
--------------------------------------------------------------------------------
GPU 0: Temp: 76.50 load: 99%
GPU 1: Temp: 76.50 load: 0%
GPU 2: Temp: 76.50 load: 99%
CPU Load : 1.92%
Local Bitcoin balance : 61.89000000
--------deepbit--------
card0: <<>>
card1: [334.03 Mhash/sec] [40 Accepted] [3 Rejected] [RPC (+LP)]
card2: [166.33 Mhash/sec] [0 Accepted] [3 Rejected] [RPC (+LP)]
Total: 500.36 MHash/sec
--------slush--------
card0: <<>>
card1: <<>>
card2: <<>>
Total: 0 MHash/sec
--------btcguild--------
card0: [110.88 Mhash/sec] [2 Accepted] [0 Rejected] [RPC (+LP)]
card1: <<>>
card2: [166.32 Mhash/sec] [4 Accepted] [0 Rejected] [RPC (+LP)]
Total: 277.20 MHash/sec
--------btcmine--------
card0: [116.43 Mhash/sec] [3 Accepted] [0 Rejected] [RPC (+LP)]
Total: [116.43 MHash/sec]
Grand Total: [893.99 Mhash/sec] [0 Accepted] [0 Rejected] [% Stales]
Added btcmine to the mapping, but only to card0! This allows you to fraction your total hashing power into smaller bits!
S.M.A.R.T MINING SYSTEM Mon Jun 13 15:34:49 EDT 2011
--------------------------------------------------------------------------------
GPU 0: Temp: 79.50 load: 99%
GPU 1: Temp: 80.00 load: 99%
GPU 2: Temp: 79.50 load: 99%
CPU Load : 1.95%
Local Bitcoin balance : 61.89000000
--------deepbit--------
card0: [121.97 Mhash/sec] [4 Accepted] [0 Rejected] [RPC (+LP)]
card1: [85.94 Mhash/sec] [5 Accepted] [0 Rejected] [RPC (+LP)]
card2: [116.41 Mhash/sec] [4 Accepted] [0 Rejected] [RPC (+LP)]
Total: 324.32 MHash/sec
--------slush--------
card0: <<>>
card1: <<>>
card2: <<>>
Total: 0 MHash/sec
--------btcguild--------
card0: [108.10 Mhash/sec] [8 Accepted] [0 Rejected] [RPC (+LP)]
card1: [83.16 Mhash/sec] [4 Accepted] [0 Rejected] [RPC (+LP)]
card2: [113.60 Mhash/sec] [6 Accepted] [0 Rejected] [RPC (+LP)]
Total: 304.86 MHash/sec
--------btcmine--------
card0: [105.33 Mhash/sec] [6 Accepted] [0 Rejected] [RPC (+LP)]
card1: [85.94 Mhash/sec] [8 Accepted] [0 Rejected] [RPC (+LP)]
card2: [110.83 Mhash/sec] [5 Accepted] [0 Rejected] [RPC (+LP)]
Total: 302.10 MHash/sec
--------solo--------
card1: [80.39 Mhash/sec] [0 Accepted] [0 Rejected] [RPC]
Total: [80.39 MHash/sec]
Grand Total: [1011.67 Mhash/sec] [0 Accepted] [0 Rejected] [% Stales]
Did another mapping that put btcmine on all 3 GPUs, and fractioned a bit of hashing off of card1 for solo mining!
S.M.A.R.T MINING SYSTEM Mon Jun 13 15:45:46 EDT 2011
--------------------------------------------------------------------------------
GPU 0: Temp: 80.00 load: 99%
GPU 1: Temp: 79.50 load: 99%
GPU 2: Temp: 79.50 load: 99%
CPU Load : 1.96%
Local Bitcoin balance :
--------deepbit--------
card0: [97.08 Mhash/sec] [2 Accepted] [2 Rejected] [RPC]
card1: <<>>
card2: [110.87 Mhash/sec] [1 Accepted] [2 Rejected] [RPC (+LP)]
Total: 207.95 MHash/sec
--------slush--------
card0: <<>>
card1: <<>>
card2: <<>>
Total: 0 MHash/sec
--------btcguild--------
card0: [116.42 Mhash/sec] [10 Accepted] [0 Rejected] [RPC (+LP)]
card1: [166.32 Mhash/sec] [5 Accepted] [0 Rejected] [RPC (+LP)]
card2: [110.87 Mhash/sec] [9 Accepted] [0 Rejected] [RPC (+LP)]
Total: 393.61 MHash/sec
--------btcmine--------
card0: [110.87 Mhash/sec] [11 Accepted] [0 Rejected] [RPC (+LP)]
card1: [166.32 Mhash/sec] [10 Accepted] [0 Rejected] [RPC (+LP)]
card2: [110.88 Mhash/sec] [6 Accepted] [0 Rejected] [RPC (+LP)]
Total: [388.07 MHash/sec]
Grand Total: [989.63 Mhash/sec] [0 Accepted] [0 Rejected] [% Stales]
Showing deepbit coming back up, and the system finding a new balance as it happens.
And here is an actual screengrab of an ssh session checking on one of my mining rigs
(ignore the silly error at the bottom, I stopped bitcoind to test something)
Thats about it for now. It really is amazing to see in action - I no longer fear pools going down, and restarting all my miners on different GPUs is no longer a chore, its as simple as can be! (one command, ~/smart.sh does it all)
Any pledges/donations can be made to 1AnDpiSvcUKejhENUFuigRCZC97cir4uwn to help keep me motivated and get this thing kicked out as early as I possibly can! It will also help offset the down time I incur as I shut my miners down often to test things during development!