Bitcoin Forum
March 28, 2024, 04:12:03 PM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 3 4 5 6 7 8 »  All
  Print  
Author Topic: [Linux] Autominer v0.3.2.6 - GPU Monitor, Downtime Swapper, New Interface  (Read 23282 times)
Reikoku (OP)
Full Member
***
Offline Offline

Activity: 140
Merit: 100


firstbits: 1kwc1p


View Profile
June 20, 2011, 04:35:06 AM
Last edit: July 02, 2011, 08:28:07 AM by Reikoku
 #1

Autominer 0.3.2.6 - New Interface Baby!

I decided to redo the thread from scratch to better explain Autominer. I felt that the old thread rambled a bit and didn't explain enough, so this one should be better designed to take care of the users' needs.

About Donate Mode

A few people were saying they'd like to donate but have no BTC up front, so if you want to, just edit common.lib (on v0.3.2.3 or above) and put the following line at the bottom:

donateMode=1

It will automatically give me 1 out of every 200 mining cycles (0.5% of your mining time). I will implement an option later so you can decide how much to donate.

This option is off by default, it's purely optional, and thanks if anyone decides to use it.


Download Autominer v0.3.2.6




What is Autominer?
Autominer is a bash script (technically, a set of bash scripts) written to automate the process of mining on a Linux rig. After a relatively short configuration time, you can just type a single command to start mining on all of your GPUs, in screen sessions for remote monitoring, with a temperature monitor and automatic pool monitoring and swapping in the case of downtime. Interested? Good.

And some history...

v0.3.2.6
- Bug fix of the checkphoenix.sh script (it was connecting to the wrong pool)
- Bug fix in screen settings

v0.3.2.5
- Added a 'countTarget' variable to change the frequency of 'successfully mining' updates
- Added a checkphoenix.sh script for diagnostic purposes
- Added better output to configure.sh when no workers are chosen
- Fixed a bug that was causing configure.sh to ask about donateMode for each GPU

v0.3.2.4
- Fixed a bug in configure.sh where it was writing Worksize variable to queuesize.
- Cleaned up configure.sh

v0.3.2.3
- Fixed a bug with the 'kill process' function.
- Cleaned up some text outputs.
- Added getting the CHANGELOG when using an outdated version.
- Fixed the loop function in the main program.
- Added 'donation mode' (optional, of course). To donate 0.5% of your mining to aid Autominer
development, just add 'donateMode=1' to common.lib. This will cause one in every two hundred cycles
to be donated.

v0.3.2.2
- Added support for PLATFORM in Phoenix.

v0.3.2.1
- Fixed a bug which caused pool switching not to work on machines with both monitoring modes enabled
if the downtime was picked up by GPU load first.

v0.3.2
- Added support for hashrate-based pool downtime detection in addition to GPU-load based, works even
if overdrive won't report GPU load (it's an issue for some people with risers) - needs XML RPC enabled
- Fixed a bug with downloading 'LATEST' file

v0.3.1
- Added experimental support for thejfk's getRate.py hack to display hashrate in miner window
- Rewrote the entire interface to use a single screen window, takes some getting used to

v0.3
- Added defaults files in order to avoid overriding a user's config upon update
- Added warning and disabled pool monitoring if GPU load can't be found (previously caused error spew)
- Added a stopmining.sh script which should look through screens and kill all Autominer screens
- Added detection for obsolete versions
- Added an experimental configuration script
- Removed version numbers from several script headers
- Moved opening the temps window to the main script
- Changed the temps window so that height corresponds to number of GPUs

v0.2
- Added status update to monitor where cards are mining and if cards are mining
- Added timestamps to output in main window

v0.1b
- Added support for phoenix failures, added workers

v0.1
- Got it working


What does Autominer need?
Autominer needs a relatively standard set of Linux tools, plus a mining program, those are:
tar - To extract the archive in the first place
wget - To check for updates to the package
screen - For monitoring sessions
xterm - To load the terminal windows themselves
phoenix-miner - To mine delicious coins!

To get this short list of tools (other than Phoenix, that's here in the forum) in the main distros is easy, fire up a command line and type:

Ubuntu Natty: sudo apt-get install screen tar wget xterm
Debian: sudo apt-get install screen tar wget xterm
Arch Linux: pacman -S screen tar wget xterm
Gentoo: emerge screen tar wget xterm

In addition, you need to be running X11 in order to take advantage of ATI Overdrive & multiple Xterm windows, and you need a few minutes to go through configuration the first time you run it.


So, how do I install it?

Well, download the tar.gz file at the top, then go to your favourite command line and navigate to where you put it. Do:

tar xvfz Autominer-x.x.tar.gz (where x.x is the version number)
cd Autominer
./configure.sh

Follow the instructions in the configuration script, assuming it works it will spit out two files called cards.lib and common.lib, with all the information you put into the script contained in them.


I'm running Autominer, how do I update it?

If your existing version is 0.3 or above, follow these instructions. If you're on 0.1, 0.1b or 0.2, you'll need to remove your existing Autominer & follow the install instructions as above. This is because 0.3 changed the file structure and the variable names, and is fairly incompatible with lte v0.2 config files.

Assuming you're running v0.3 already, simply download the .tar.gz and extract the files into your Autominer directory. This will not overwrite cards.lib or common.lib, as I have modified the file structure to preserve these files which contain your settings.


How do I *RUN* this beast?

First of all kill any miners you have open, then go to the Autominer directory and run ./startmining.sh /path/to/Autominer

Controls for the window:
F1-F6 = Windows 0-5
F7 = Previous window
F8 = Next window
Ctrl-a then a number = That number window
Ctrl-a then d = Detach screen (keeps miner running)


You have MH/S in your 'amm' window... how do I get that?

This technique relies upon a patch to Phoenix developed by thejfk, but it's relatively easy.

1. Open up a command line
2. cd to your phoenix directory
3. wget http://robertlacroix.com/files/phoenix-xmlrpc.diff
4. patch -p0 < phoenix-xmlrpc.diff
5. Send thejfk a tip: 1EhQ1dbeZnxs7wZKngegsHLheAjUK37k7m
6. cd to your Autominer directory
7. Edit common.lib, at the bottom write on a new line:
xmlRPCEnabled=1;
8. Start up your miner, the rest should happen automatically


And how do I monitor it over ssh?

If you want to open over ssh, do DISPLAY=:0 ./startmining.sh /path/to/Autominer

Connect to the screen using screen -x amm -p 0


So, what happened to the file structure?

Previously, whenever you updated Autominer, it came with a new cards.lib and common.lib, this meant you had to re-configure everything every time. Now, I've created files called cards.defaults.lib and common.defaults.lib.

These files allow me to define new variables without overwriting the variables you've saved in your configuration scripts. Obviously, you shouldn't edit the defaults files (they'll be overwritten when you update) but if you want to change something in there, simply copy the variable into cards.lib or common.lib and change it there.

Variables in cards.lib and common.lib OVERRIDE those in cards.defaults.lib and common.defaults.lib. The only time the defaults will be used is if something isn't defined in YOUR config settings.


Can I still manually modify the .lib files?

Sure can. Just copy cards.sample.lib to cards.lib and common.sample.lib to common.lib and modify. Don't edit the defaults, they will be overwritten when you update again.


Common Problems & Troubleshooting

Computer clearly mining but autominer won't connect to the display - Often caused by starting an identifier name with a number. Check your identifier names start with a letter.

Rei | 1Kwc1pqv54jCg8jvnm3Gu1dqFQYhS34Bow
Trades So Far: 7
1711642323
Hero Member
*
Offline Offline

Posts: 1711642323

View Profile Personal Message (Offline)

Ignore
1711642323
Reply with quote  #2

1711642323
Report to moderator
1711642323
Hero Member
*
Offline Offline

Posts: 1711642323

View Profile Personal Message (Offline)

Ignore
1711642323
Reply with quote  #2

1711642323
Report to moderator
Transactions must be included in a block to be properly completed. When you send a transaction, it is broadcast to miners. Miners can then optionally include it in their next blocks. Miners will be more inclined to include your transaction if it has a higher transaction fee.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1711642323
Hero Member
*
Offline Offline

Posts: 1711642323

View Profile Personal Message (Offline)

Ignore
1711642323
Reply with quote  #2

1711642323
Report to moderator
1711642323
Hero Member
*
Offline Offline

Posts: 1711642323

View Profile Personal Message (Offline)

Ignore
1711642323
Reply with quote  #2

1711642323
Report to moderator
wegotpickles
Newbie
*
Offline Offline

Activity: 49
Merit: 0



View Profile
June 20, 2011, 10:54:39 AM
 #2

Nice work, I made some similar scripts myself but never incorporated pool detection/switching.

Start the miners each in their own GNU Screen sessions and set this to run at start up in your DE of choice (and set automatic log in of course) and bam, this script is now ideal for headless mining. The screen sessions will allow users to view the miners though SSH. I like to start an extra session as well just so i can run aticonfig if i need to check my temps/adjust fan speed/what have you.

I've been working on a way to detect locked up miners, I'll let you know if I find anything interesting.
Reikoku (OP)
Full Member
***
Offline Offline

Activity: 140
Merit: 100


firstbits: 1kwc1p


View Profile
June 20, 2011, 12:05:25 PM
 #3

Nice work, I made some similar scripts myself but never incorporated pool detection/switching.

Start the miners each in their own GNU Screen sessions and set this to run at start up in your DE of choice (and set automatic log in of course) and bam, this script is now ideal for headless mining. The screen sessions will allow users to view the miners though SSH. I like to start an extra session as well just so i can run aticonfig if i need to check my temps/adjust fan speed/what have you.

I've been working on a way to detect locked up miners, I'll let you know if I find anything interesting.

I'm just detecting GPU load via aticonfig --adapter=X --odgc and killing GPUs which aren't under load.

Also, yeah this works for headless I guess, screens are named $identifier-MINER so if you set an identifier to 'Radeon5850' the screen would be called 'Radeon5850-MINER'. Temp screen is called 'temps'.

Rei | 1Kwc1pqv54jCg8jvnm3Gu1dqFQYhS34Bow
Trades So Far: 7
wegotpickles
Newbie
*
Offline Offline

Activity: 49
Merit: 0



View Profile
June 20, 2011, 01:38:34 PM
 #4

Oops, I some how missed that you used screen already. Script skimming comprehension fail. Its early (for me at least), ignore my blather.

I'm beating my head against the wall for not thinking about checking for bum miners with gpu load. I was using wget and grep to check deepbit's api for statuses, which is fine i guess, but not good for solo miners or pools without an api like db's.
mf
Newbie
*
Offline Offline

Activity: 24
Merit: 0


View Profile
June 20, 2011, 03:26:11 PM
 #5

Start the miners each in their own GNU Screen sessions [..] will allow users to view the miners though SSH.

I use tmux for my miner(s), as:
- it can be split horizontally/vertically, so I can have a number of miners in one "window"
- its launch can be scripted, so you can have one .sh script launch a number of miners each with their own details *and* detach the whole
- it can be scripted and the buffer saved somewhere, to be later handled via other GNU tools

For example: on screen 0, window 1, pane 0 I have a miner; on pane 1 another.

Code:
echo "Miners' info:"
for pane in 0 1; do
  tmux capture-pane -t 0:1.$pane # captures the contents of the pane for the 1st miner
  tmux save-buffer /tmp/buff-01$pane # saves it to a file
  echo "Miner $pane: $(tail -n 1 /tmp/buff-01$pane)" # gets the latest line, usually the one with MHash/sec
done


I also modify the miners to report found/rejected blocks on STDERR, then munge it with some Perl and display the graph on a site, but having only one graphics card I'm not sure how useful the thing is to you guys Wink
Reikoku (OP)
Full Member
***
Offline Offline

Activity: 140
Merit: 100


firstbits: 1kwc1p


View Profile
June 20, 2011, 03:48:10 PM
 #6

Oops, I some how missed that you used screen already. Script skimming comprehension fail. Its early (for me at least), ignore my blather.

I'm beating my head against the wall for not thinking about checking for bum miners with gpu load. I was using wget and grep to check deepbit's api for statuses, which is fine i guess, but not good for solo miners or pools without an api like db's.

Yeah I'm just doing a check for GPU load below 90%, then sleeping 15 sec to make sure it's not an anomoly, then killing the miner and changing to backup pool if it's not fixed.

Also, version 0.2 should be up soon, with regular status reports to the main window so that you can see everything is mining, removing the annoying 'All seems fine' message every 2 minutes, and timestamps in the main window.

Rei | 1Kwc1pqv54jCg8jvnm3Gu1dqFQYhS34Bow
Trades So Far: 7
klaaster
Full Member
***
Offline Offline

Activity: 126
Merit: 100



View Profile
June 20, 2011, 04:55:57 PM
 #7

Great! Thank you.
I'm also using a much more "simpler" bash script, nice to have a backup server now.
This also helps me to learn more about script writing, so thumbs up for you. Smiley
Reikoku (OP)
Full Member
***
Offline Offline

Activity: 140
Merit: 100


firstbits: 1kwc1p


View Profile
June 20, 2011, 10:59:53 PM
 #8

Glad to be helping people out, I'm uploading v0.2 right now and adding it to first post.

Rei | 1Kwc1pqv54jCg8jvnm3Gu1dqFQYhS34Bow
Trades So Far: 7
inh
Full Member
***
Offline Offline

Activity: 155
Merit: 100


View Profile
June 21, 2011, 04:53:51 AM
 #9

Cool script Smiley

Am I the only one that uses a single screen session for all my miners? :-/
Reikoku (OP)
Full Member
***
Offline Offline

Activity: 140
Merit: 100


firstbits: 1kwc1p


View Profile
June 21, 2011, 03:25:44 PM
Last edit: June 22, 2011, 02:23:17 AM by Reikoku
 #10

Cool script Smiley

Am I the only one that uses a single screen session for all my miners? :-/

I do on ssh, this loads the miners into screen sessions so you can load them up via SSH on $identifier[0]-miner, $identifier[1]-miner etc. You can do the same with temperatures, screen is called temps.

So just ssh in and hit:

screen -x temps

OR

screen -x Radeon5850-1-miner (assuming one of your identifiers is Radeon5850-1).

Rei | 1Kwc1pqv54jCg8jvnm3Gu1dqFQYhS34Bow
Trades So Far: 7
inh
Full Member
***
Offline Offline

Activity: 155
Merit: 100


View Profile
June 22, 2011, 03:56:26 AM
 #11

No like, i have one screen session called miners, and then i have windows in each. Like window 1 is for GPU 1, window 2 for GPU 2, and window 0 is for my monitoring script. I just reattach the screen session and then hit ctrl-a 1 to see the miner for gpu 1, ctrl-a 2 for the second, etc. That way i can quickly check all miners without having to attach and detach sessions all the time.
Reikoku (OP)
Full Member
***
Offline Offline

Activity: 140
Merit: 100


firstbits: 1kwc1p


View Profile
June 22, 2011, 02:12:02 PM
 #12

Oh OK, I do this instead on my laptop to monitor everything:


Rei | 1Kwc1pqv54jCg8jvnm3Gu1dqFQYhS34Bow
Trades So Far: 7
M4v3R
Hero Member
*****
Offline Offline

Activity: 607
Merit: 500


View Profile
June 22, 2011, 03:21:15 PM
 #13

+1 for using E17 for your miner's desktop. I'm doing the same thing Wink.
GimEEE
Member
**
Offline Offline

Activity: 112
Merit: 10

Ride or Die


View Profile WWW
June 22, 2011, 11:13:22 PM
 #14

maybe a dumb question, but is xfce (xubuntu) going to work for this x11, or are they different?

Also, I've been using amdoverdrive for temp/OCing, would I need to change anything to switch to the commandline OCing and temp control?

The only way to make sure people you agree with can speak is to support the rights of people you don't agree with.
Reikoku (OP)
Full Member
***
Offline Offline

Activity: 140
Merit: 100


firstbits: 1kwc1p


View Profile
June 23, 2011, 01:48:15 AM
 #15

XFCE is X11 based, as are (I think) all Linux desktop environments.

If AMDOverdriveCtrl is working, you shouldn't need to change anything.

If you're unsure, go to command line and type 'aticonfig --adapter=all --odgc'.

It might come back telling you to enable Overdrive, in which case type 'aticonfig --adapter=all --od-enable'. Then this will work fine.

Rei | 1Kwc1pqv54jCg8jvnm3Gu1dqFQYhS34Bow
Trades So Far: 7
wegotpickles
Newbie
*
Offline Offline

Activity: 49
Merit: 0



View Profile
June 23, 2011, 04:09:02 AM
 #16

Tested working in Debian Squeeze and Ubuntu Natty.

For anyone having trouble with screen terminating repeatedly, add this to your ~/.screenrc
Quote
setenv DISPLAY ":0"

Plus one of the following:

For 64-bit SDK 2.4:
Quote
setenv LD_LIBRARY_PATH "/opt/AMD-APP-SDK-v2.4-lnx64/lib/x86_64"

For 32-bit SDK 2.4:
Quote
setenv LD_LIBRARY_PATH "/opt/AMD-APP-SDK-v2.4-lnx32/lib/x86"

For 64-bit SDK 2.1:
Quote
setenv LD_LIBRARY_PATH "/opt/ati-stream-sdk-v2.1-lnx64/lib/x86_64/"

For 32-bit SDK 2.1:
Quote
setenv LD_LIBRARY_PATH "//opt/ati-stream-sdk-v2.1-lnx32/lib/x86/"


Reikoku, is 4 GPUs just where you decided to stop or is there some limitation in the script that make more a problem?
Reikoku (OP)
Full Member
***
Offline Offline

Activity: 140
Merit: 100


firstbits: 1kwc1p


View Profile
June 23, 2011, 05:52:00 AM
 #17

You can go past 4 GPUs, I think I removed the checker for >4. I just didn't add more than 4 to cards.lib because 4 is the most I run in one machine.

You will need to set the geometry for the 5th Xterm though in cards.lib otherwise it'll spawn over the 4th one. You'll also need to add 3 rows to temps window in startmining.sh.

Also, thanks for testing.

Rei | 1Kwc1pqv54jCg8jvnm3Gu1dqFQYhS34Bow
Trades So Far: 7
GimEEE
Member
**
Offline Offline

Activity: 112
Merit: 10

Ride or Die


View Profile WWW
June 23, 2011, 12:47:32 PM
 #18

I got it working, but I changed it to start from device 1 (not 0), so, 1,2,3,4 for all the numbers in the card file that were under 0,1,2,3 sections.
also, not sure how screen works, but closing seems to be an issue, only ghosts the programs.
After the necessary edits, this looks like a great program.

The only way to make sure people you agree with can speak is to support the rights of people you don't agree with.
Reikoku (OP)
Full Member
***
Offline Offline

Activity: 140
Merit: 100


firstbits: 1kwc1p


View Profile
June 23, 2011, 02:02:48 PM
 #19

I got it working, but I changed it to start from device 1 (not 0), so, 1,2,3,4 for all the numbers in the card file that were under 0,1,2,3 sections.
also, not sure how screen works, but closing seems to be an issue, only ghosts the programs.
After the necessary edits, this looks like a great program.


You mean closing the main loop? It doesn't kill all the screens, I will have to write a closing script at some point, for now assuming you run no other screens, 'killall screen' will give you a clean close.

Rei | 1Kwc1pqv54jCg8jvnm3Gu1dqFQYhS34Bow
Trades So Far: 7
GimEEE
Member
**
Offline Offline

Activity: 112
Merit: 10

Ride or Die


View Profile WWW
June 25, 2011, 04:58:45 PM
 #20

I had to make some changes to your files like I said before:
This is great for linux, after you get the system set up because for me the pools go down or if a miner stalls, this fixes it. . .

here is my working version of the files (replaced/created the following files with text editor in autominer folder):
cards.lib: http://pastebin.com/AD6ugg4x
common.lib: http://pastebin.com/ZSNb2KzZ
otherwise using the files you have listed, works great!

The only way to make sure people you agree with can speak is to support the rights of people you don't agree with.
Pages: [1] 2 3 4 5 6 7 8 »  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!