Bitcoin Forum
December 03, 2016, 05:55:16 PM *
News: Latest stable version of Bitcoin Core: 0.13.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 [22] 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 »
  Print  
Author Topic: Smartcoin Linux mining administration. [MULTI-MACHINE SUPPORT NOW IN!]  (Read 99591 times)
elrock
Jr. Member
*
Offline Offline

Activity: 41


View Profile
July 11, 2011, 01:15:38 PM
 #421

I just discovered what appears to be a bug: I added a new worker and then edited its pool (but didn't actually change any data; just wanted to make sure it was configured properly).  That new worker/pool was automatically ranked first in the list of Failover profiles even though I hadn't changed anything about the Failover order.  I had to manually edit the Failover order back to what it was before the addition of the new worker.

On an unrelated note, I would also like to know how to launch smartcoin automatically at system startup.  What lines need to be added to which files to accomplish this?  Can I stick something in /etc/init.d/rc.local (which is how I started miners before smartcoin)?
1480787716
Hero Member
*
Offline Offline

Posts: 1480787716

View Profile Personal Message (Offline)

Ignore
1480787716
Reply with quote  #2

1480787716
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
Fletch
Full Member
***
Offline Offline

Activity: 168


I'll have a steak sandwich and a... steak sandwich


View Profile
July 11, 2011, 01:58:19 PM
 #422

I'm still up in the air about the best lockfile method to use for now.  One reason is, that I am strongly reconsidering the move to sqlite3.  I'm starting to hit the point where speed limitations are going to become very apparent.  I'm afraid that once multi-machine support is in, someone with 4+ machines will choke things up at the sqlite bottleneck. So the lockfile may become irrelevant if the move back to MySQL happens
Why do you need to use an external locking mechanism at all? SQLite has built-in locking in the event that more than one thread has the SQLite databas open. The locking only comes into effect for writes of course. Multiple threads can read from the same database concurrently.

HashPeak - GPU mining hashrate peak detector
BTC: 1FLETCHvcUKosefrcZCLUQTtvx4WvgnYMC
dishwara
Legendary
*
Offline Offline

Activity: 1372


Truth may get delay, but NEVER fails


View Profile
July 11, 2011, 04:08:16 PM
 #423

Can this problem solved?




Smartcoin believes the GPU is mining even though it submitted shares a long time ago & temperature is in 60C(idle or less) range than other cards.
The total hash rate displaying is 2580+, which i get usually.
jondecker76
Full Member
***
Offline Offline

Activity: 238


View Profile
July 11, 2011, 06:06:26 PM
 #424

I just discovered what appears to be a bug: I added a new worker and then edited its pool (but didn't actually change any data; just wanted to make sure it was configured properly).  That new worker/pool was automatically ranked first in the list of Failover profiles even though I hadn't changed anything about the Failover order.  I had to manually edit the Failover order back to what it was before the addition of the new worker.

On an unrelated note, I would also like to know how to launch smartcoin automatically at system startup.  What lines need to be added to which files to accomplish this?  Can I stick something in /etc/init.d/rc.local (which is how I started miners before smartcoin)?

Thanks for the report.  I'll be committing a fix after I catch up on posts for the day which will fix the problem of newly created profiles being bumped to the top of the failover list.

regarding auto-launching, there was just a conversation on this: http://forum.bitcoin.org/index.php?topic=16548.msg350532#msg350532

RollerBot Advanced Trading Platform
https://bitcointalk.org/index.php?topic=447727.0
BTC Donations for development: 1H36oTJsi3adFh68wwzz95tPP2xoAoTmhC
jondecker76
Full Member
***
Offline Offline

Activity: 238


View Profile
July 11, 2011, 06:17:40 PM
 #425

I'm still up in the air about the best lockfile method to use for now.  One reason is, that I am strongly reconsidering the move to sqlite3.  I'm starting to hit the point where speed limitations are going to become very apparent.  I'm afraid that once multi-machine support is in, someone with 4+ machines will choke things up at the sqlite bottleneck. So the lockfile may become irrelevant if the move back to MySQL happens
Why do you need to use an external locking mechanism at all? SQLite has built-in locking in the event that more than one thread has the SQLite databas open. The locking only comes into effect for writes of course. Multiple threads can read from the same database concurrently.



This isn't completely accurate for a couple of reasons, sqlite, and sqlite 3 aren't the same project exactly. Sqlite3 is a commandline utility that uses sqlite, and makes for an easy way to use sqlite from things such as bash scipts.  And while its true that sqlite3 does have some "locking" support, its not a true lock. It only means that the database is marked as locked while being modified - and as such any other queries will fail that try to execute at the same time so as to not break the database or fetch information that is the middle of an update.  You can test this yourself while smartcoin is running by:
Code:
sqlite3 ~/.smartcoin/smartcoin.db "SELECT * FROM device;"
continually by pressing the up arrow then enter repeatedly.  You will see it won't take long before you get the "Error: database is locked" error.

However, I'm going to try something new this week - reading the output of the query and resubmitting it if a failed error is returned (in a loop). This will likely work, but there will be no real queueing and so order of query execution in the case of simultaneous  access will not be able to be preserved, though it may not be that big of a deal (that is, until multi-machine support is in and someone is managing 20 machines at a time!)
In the end, after Beta, I will most definitely be switching back to mysql, as it solved all these problems, and has the performance necessary for good multimachine support in the future.


RollerBot Advanced Trading Platform
https://bitcointalk.org/index.php?topic=447727.0
BTC Donations for development: 1H36oTJsi3adFh68wwzz95tPP2xoAoTmhC
jondecker76
Full Member
***
Offline Offline

Activity: 238


View Profile
July 11, 2011, 06:22:21 PM
 #426

Dishwara:

Perhaps your card is locked up (instability from overclocking, which is a very common thing, as aticonfig will continue to report high gpu usage on locked-up cards)

For comparison, you can run
Code:
aticonfig --odgt --adapter=all
aticonfig --odgc --adapter=all
as it is aticonfig that returns values displayed in smartcoin.

Do all the launch strings in the log look correct?
You can also do:
Code:
screen -r miner
and directly view the phoenix output of each miner. That will probably give the best clue as to any problems

RollerBot Advanced Trading Platform
https://bitcointalk.org/index.php?topic=447727.0
BTC Donations for development: 1H36oTJsi3adFh68wwzz95tPP2xoAoTmhC
jondecker76
Full Member
***
Offline Offline

Activity: 238


View Profile
July 11, 2011, 06:26:25 PM
 #427

Update r394(experimental) is now available.
- Fixes issue where newly created profiles were being pushed to the top of the failover list

RollerBot Advanced Trading Platform
https://bitcointalk.org/index.php?topic=447727.0
BTC Donations for development: 1H36oTJsi3adFh68wwzz95tPP2xoAoTmhC
dishwara
Legendary
*
Offline Offline

Activity: 1372


Truth may get delay, but NEVER fails


View Profile
July 11, 2011, 06:42:24 PM
 #428

Dishwara:

Perhaps your card is locked up (instability from overclocking, which is a very common thing, as aticonfig will continue to report high gpu usage on locked-up cards)

For comparison, you can run
Code:
aticonfig --odgt --adapter=all
aticonfig --odgc --adapter=all
as it is aticonfig that returns values displayed in smartcoin.

Do all the launch strings in the log look correct?
You can also do:
Code:
screen -r miner
and directly view the phoenix output of each miner. That will probably give the best clue as to any problems
I thought you can do anything about it in smartcoin, like restarting smartcoin itself if card locks.
jondecker76
Full Member
***
Offline Offline

Activity: 238


View Profile
July 11, 2011, 08:45:12 PM
 #429

Dishwara:
If a card locks, in my experience usually a full reboot is needed, not just a restart of smartcoin (the problem is overclocking to the point of instability, which smartcoin has no control of)

I think you will have the best luck by backing off 1-2 mhz on your overclocking and see if that solves the problem - most likely it will.


RollerBot Advanced Trading Platform
https://bitcointalk.org/index.php?topic=447727.0
BTC Donations for development: 1H36oTJsi3adFh68wwzz95tPP2xoAoTmhC
Rob P.
Member
**
Offline Offline

Activity: 84



View Profile WWW
July 11, 2011, 09:09:34 PM
 #430

I tired to run smartcoin from start up & so far can't
I created new entry in start up applications, but don't know what i give in command line to start smartcoin in a terminal window.
I just gave /home/myusername/smartcoin/smartcoin.sh , but it didn't run.
Can you tell how to run smartcoin from start up automatically in a terminal window.
Thanks.

I think the problem may be that by default smartcoin joins you to the screen session after initialization.

Jon, is there (or could there be) a command link switch to have smartcoin initialize, but detach from the session?

That way I could run:  smartcoin -silent
And it would just return the prompt.  But, I could then run "smartcoin" again and get the display?

I think that may be the problem with it in a start up script.

--

If you like what I've written here, consider tipping the messenger:
1GZu4CtHa6ai8iWoWiVFxV5VVoNte4SkoG

If you don't like what I've written, send me a Tip and I'll stop talking.
jaebird
Member
**
Offline Offline

Activity: 79


View Profile
July 11, 2011, 09:34:51 PM
 #431

EDIT: Modified smartcoin launch to use --silent option Smiley

@Rob P

I use LinuxCoin as the base OS. One of the things about init.d that has to be considered is that X has to be running before LinuxCoin can start the GPU miners. Because LinuxCoin uses LXDE, I solved this by adding the following line to the global desktop environment application autostart file: /etc/xdg/lxsession/LXDE/autostart

@/home/user/setup_stuff.sh

The setup_stuff.sh script is:

#!/bin/bash
sudo chmod 777 /var/run/screen
/home/user/overdrive.sh
smartcoin --silent

The overdrive.sh script is:

export DISPLAY=:0.0
aticonfig --od-enable
AMDOverdriveCtrl -b -i 0 overdrive_mining_0.ovdr
AMDOverdriveCtrl -b -i 3 overdrive_mining_1.ovdr
AMDOverdriveCtrl -b -i 6 overdrive_mining_2.ovdr
AMDOverdriveCtrl -b -i 9 overdrive_mining_3.ovdr

I use slightly different (*.ovdr) settings for each card since some cards run hotter or faster than others.

This works well in my setup.

Cheers,
jaebird
jondecker76
Full Member
***
Offline Offline

Activity: 238


View Profile
July 11, 2011, 09:35:15 PM
 #432

Rob P.

appending an '&' to the end of the line launching smartcoin may be needed, as it will start it in the background and be non-blocking to a startup script (without needing a --silent feature). I'll test it out myself this week, and come up with a standard way people can get it to run on startup. [edit: went ahead and implemented the --silent feature anyways Smiley ]

Either way, for anyone relying on a root script running at bootup, to start smartcoin, you need to su to the correct user first, so the script knows where to find ~/.smartcoin for the database (unless you install it under root, where then there will be a /root/.smartcoin)


something like:
Code:
su yourname -c "smartcoin --silent"
(though I haven't tested it)

(--silent option now in latest version)

RollerBot Advanced Trading Platform
https://bitcointalk.org/index.php?topic=447727.0
BTC Donations for development: 1H36oTJsi3adFh68wwzz95tPP2xoAoTmhC
jondecker76
Full Member
***
Offline Offline

Activity: 238


View Profile
July 11, 2011, 09:37:19 PM
 #433

Update r399(experimental) now available
- you can now start smartcoin with the --silent option to not have the screen session automatically connect.

RollerBot Advanced Trading Platform
https://bitcointalk.org/index.php?topic=447727.0
BTC Donations for development: 1H36oTJsi3adFh68wwzz95tPP2xoAoTmhC
Fletch
Full Member
***
Offline Offline

Activity: 168


I'll have a steak sandwich and a... steak sandwich


View Profile
July 11, 2011, 09:46:59 PM
 #434

As far as getting Smartcoin to startup automatically after a reboot in Ubuntu, I figured it out. Create /etc/init/smartcoin.conf with the following contents:

Code:
description "Start SmartCoin"
start on runlevel [2345]
stop on runlevel [!2345]
kill timeout 30
script
        sleep 30
        exec su -c '/usr/bin/smartcoin' miner
end script

"miner" is the user that runs smartcoin. Not sure if the "exec" is required or not, but this works for me. As I'm writing this, I see that a --silent option has been added. Not sure if that affects the above script in any way. It appears to work without it.

This isn't completely accurate for a couple of reasons, sqlite, and sqlite 3 aren't the same project exactly. Sqlite3 is a commandline utility that uses sqlite, and makes for an easy way to use sqlite from things such as bash scipts.  And while its true that sqlite3 does have some "locking" support, its not a true lock. It only means that the database is marked as locked while being modified - and as such any other queries will fail that try to execute at the same time so as to not break the database or fetch information that is the middle of an update.
But what is locking the database? Is SmartCoin frequently running INSERTs and UPDATEs? The database should only be locked if a thread is writing to the database. I am unable to force a "database is locked" error by querying the database while SmartCoin is mining away in the background.

However, I'm going to try something new this week - reading the output of the query and resubmitting it if a failed error is returned (in a loop). This will likely work, but there will be no real queueing and so order of query execution in the case of simultaneous  access will not be able to be preserved, though it may not be that big of a deal (that is, until multi-machine support is in and someone is managing 20 machines at a time!)
In the end, after Beta, I will most definitely be switching back to mysql, as it solved all these problems, and has the performance necessary for good multimachine support in the future.
Personally, I think Sqlite and SmartCoin are a perfect match. Having MySQL as a dependency makes SmartCoin a lot less interesting, at least to me.

HashPeak - GPU mining hashrate peak detector
BTC: 1FLETCHvcUKosefrcZCLUQTtvx4WvgnYMC
jaebird
Member
**
Offline Offline

Activity: 79


View Profile
July 11, 2011, 09:48:37 PM
 #435

@jondecker76:

Sometimes the display screen shows weird output:

--------BTCGuild--------
GPU[2]:  self.commandQueue, sel[326.74 Mhash/sec] [0 Accepted] [0 Rejected] [RPC (+LP)]
GPU[3]: [326.55 Mhash/sec] [1 Accepted] [0 Rejected] [RPC (+LP)]

If I go to the miner screen is see something like this...

[11/07/2011 21:42:32] Server gave new work; passing to WorkQueue
[11/07/2011 21:42:45] Server gave new work; passing to WorkQueue
[326.84 Mhash/sec] [0 Accepted] [0 Rejected] [RPC (+LP)]kernels/phatk/__init__.py:405: DeprecationWarning: 'enqueue_write_buffer' has been deprecated in version 2011.1. Please use enqueue_copy() instead.
  self.commandQueue, sel[11/07/2011 21:42:50] Result 00000000a9f08d4a... accepted
[11/07/2011 21:43:00] Result 00000000ad6ef537... accepted

It looks like pyopencl is outputting a deprecation warning that is outputting to the console. Could you ignore this stuff?

Thanks,
jaebird
Fletch
Full Member
***
Offline Offline

Activity: 168


I'll have a steak sandwich and a... steak sandwich


View Profile
July 11, 2011, 09:56:20 PM
 #436

jaebird: The error seems to be coming from Phoenix (kernels/phatk/__ini__.py). Which version of pyopencl do you have?

Edit: You seem to be running pyopencl 2011.1 or later. Try downloading version 0.92 instead. That's the one I see most guides recommending.

HashPeak - GPU mining hashrate peak detector
BTC: 1FLETCHvcUKosefrcZCLUQTtvx4WvgnYMC
jaebird
Member
**
Offline Offline

Activity: 79


View Profile
July 11, 2011, 10:04:07 PM
 #437

jaebird: The error seems to be coming from Phoenix (kernels/phatk/__ini__.py). Which version of pyopencl do you have?

Edit: You seem to be running pyopencl 2011.1 or later. Try downloading version 0.92 instead. That's the one I see most guides recommending.

I'm just running the one that drgr33n put in LinuxCoin by default, I haven't messed with it beyond that.
Fletch
Full Member
***
Offline Offline

Activity: 168


I'll have a steak sandwich and a... steak sandwich


View Profile
July 11, 2011, 10:13:56 PM
 #438

I'm just running the one that drgr33n put in LinuxCoin by default, I haven't messed with it beyond that.
Aha. In that case, I suggest you ask in the Phoenix topic - http://forum.bitcoin.org/index.php?topic=6458.0

HashPeak - GPU mining hashrate peak detector
BTC: 1FLETCHvcUKosefrcZCLUQTtvx4WvgnYMC
Rob P.
Member
**
Offline Offline

Activity: 84



View Profile WWW
July 11, 2011, 10:17:11 PM
 #439

Update r399(experimental) now available
- you can now start smartcoin with the --silent option to not have the screen session automatically connect.

Hey Jon.  Thanks!  You've got to be one of the most responsive developers I've had the pleasure of giving my ideas to.  :-D  2 for 2!

For folks wrestling with startup scripts, X windows, and smartcoin (with the new --silent option), I'd suggest (Under Ubuntu):

1)  Auto login to your local user (this will take care of X windows running as you)
2)  Open System -> Preferences -> Sessions
3)  Click the "Startup Programs" tab
4)  Click "Add"
5)  Enter "smartcoin --silent"

This should, if auto login is enabled, startup smartcoin in the background on your machine at boot.  If using the experimental branch (which you'd have to be in order to get "smartcoin --silent", you can put "init.sh" in your smartcoin installation directory to run your initialization commands (overclocking, setting fans, etc)



--

If you like what I've written here, consider tipping the messenger:
1GZu4CtHa6ai8iWoWiVFxV5VVoNte4SkoG

If you don't like what I've written, send me a Tip and I'll stop talking.
jondecker76
Full Member
***
Offline Offline

Activity: 238


View Profile
July 11, 2011, 10:23:15 PM
 #440

Update r405(experimental) available!
- procmail dependency eliminated!
- Errored sql queries will retry  until they succeed (without locking mechanism)
- An attempt is made to supress error messages coming from the individual miner instances (jaebird - can you confirm if it works?)


RollerBot Advanced Trading Platform
https://bitcointalk.org/index.php?topic=447727.0
BTC Donations for development: 1H36oTJsi3adFh68wwzz95tPP2xoAoTmhC
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 [22] 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 »
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!