Bitcoin Forum
April 19, 2024, 12:00:31 AM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Multiple POCLBM instances from one all black ubuntu console window?  (Read 2820 times)
gigabytecoin (OP)
Sr. Member
****
Offline Offline

Activity: 280
Merit: 252


View Profile
April 22, 2011, 09:04:24 PM
 #1

Is it possible to run 4 seperate miners for my 4 x 5870 setup WITHOUT the ubuntu desktop running?

For example, right now when I run 4 GPUs mining at once on one machine, I open up 4 terminals and enter the appropriate d 1, d 2, d 3, etc commands....

How would I open up multiple terminals or run multiple instances when only running the all black console screen?
1713484831
Hero Member
*
Offline Offline

Posts: 1713484831

View Profile Personal Message (Offline)

Ignore
1713484831
Reply with quote  #2

1713484831
Report to moderator
Be very wary of relying on JavaScript for security on crypto sites. The site can change the JavaScript at any time unless you take unusual precautions, and browsers are not generally known for their airtight security.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1713484831
Hero Member
*
Offline Offline

Posts: 1713484831

View Profile Personal Message (Offline)

Ignore
1713484831
Reply with quote  #2

1713484831
Report to moderator
1713484831
Hero Member
*
Offline Offline

Posts: 1713484831

View Profile Personal Message (Offline)

Ignore
1713484831
Reply with quote  #2

1713484831
Report to moderator
1713484831
Hero Member
*
Offline Offline

Posts: 1713484831

View Profile Personal Message (Offline)

Ignore
1713484831
Reply with quote  #2

1713484831
Report to moderator
TurdHurdur
Full Member
***
Offline Offline

Activity: 216
Merit: 100


View Profile
April 22, 2011, 09:15:53 PM
 #2

A shell script, screen?
tgate
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
April 22, 2011, 09:19:08 PM
 #3

install screen. type "screen", run the miner, then control+d detaches the screen. then type "screen" again to run another miner. typing "screen -ls" will list all the open screens. their is a number at the beginning of each screen in the list, type "screen -r <number>" to reattach to the screen.
Grinder
Legendary
*
Offline Offline

Activity: 1284
Merit: 1001


View Profile
April 22, 2011, 10:36:23 PM
 #4

It's easier to manage if you don't start a separate screen session for each miner. If you just type screen once, you will start a screen session. You can then start as many terminals as you like inside that session by pressing ctrl-a c to create, and ctrl-a n to switch between the terminals. Start one miner in each terminal. You can also start the miner directly to save some RAM by typing 'screen <miner command>' in a screen terminal.
marcus_of_augustus
Legendary
*
Offline Offline

Activity: 3920
Merit: 2348


Eadem mutata resurgo


View Profile
April 22, 2011, 11:04:34 PM
 #5

install screen. type "screen", run the miner, then control+d detaches the screen. then type "screen" again to run another miner. typing "screen -ls" will list all the open screens. their is a number at the beginning of each screen in the list, type "screen -r <number>" to reattach to the screen.

Hmmm, does this get the Xorg process running to install the fglrx drivers?

Grinder
Legendary
*
Offline Offline

Activity: 1284
Merit: 1001


View Profile
April 22, 2011, 11:15:05 PM
 #6

No, you need X to get all the necessary drivers. I use fluxbox which is very light weight and just run startx from screen.
eleuthria
Legendary
*
Offline Offline

Activity: 1750
Merit: 1007



View Profile
April 25, 2011, 12:02:26 AM
 #7

I've got my boxes set with a GUI auto log-in install to make sure all the displays are initialized at the start, but they're all headless.  I log into them via SSH and use the following commands to get one SSH window to show multiple miners:

screen -S GPU1
./poclbm.py -d1  (I've modified the python script to auto fill in log in/worksize/vector arguments based on device #)
Ctrl a+d
screen -S GPU2
./poclbm.py -d2
Ctrl a+d

screen -S Multimon
screen -x GPU1
Ctrl+a, Shift+S
Ctrl+a, Ctrl+tab
Ctrl+a, Ctrl+c
screen -x GPU2


The results can be seen here: https://i.imgur.com/b1zg4.gif

RIP BTC Guild, April 2011 - June 2015
mintymark
Sr. Member
****
Offline Offline

Activity: 286
Merit: 251


View Profile
April 25, 2011, 12:20:07 AM
Last edit: April 25, 2011, 10:17:27 AM by mintymark
 #8

Can I offer the following script? I use with momchils poclbm miner.  The script is written in perl and you use from your name space as follows:
./mine.pl start  
./mine.pl stop

You need to set your user and password, and also the directory containing the miner, (whichever version) and logs. Other than that usage should be simple.
It will seek out as many GPU's as you have, and fire them all up. It can also be used to switch on an off at idle although I havnt used this functionality recently. Chang options for the miner as you need.

Script is intended to be run as user not as root.

#!/usr/bin/perl
# usage:
# mine.pl  start
#    start mining now
# mine.pl stop
#    stop mining now
# mine.pl idle start
#    start mining when screen saver activates, stop it when it deactivates.
#    this means if you started by hand it will stop when screen saver deactivates.
# mine.pl idle stop
#    do not do anything on screen saver activate/ deactivate.
#
# Note that for this functionality you must be using xscreensaver, it will not work
# otherwise.
#
# mine.pl logsort
#      sort log files into 1 per day files. Must be done only while miner is stopped.
#

$dir="/home/mark/poclbm20110311";
# $dir='/home/mark/poclbm20110311/poclbm-mod.03.24.2011';
#$dir='/home/mark/poc/m0mchil-poclbm-b981138';
$logdir="/home/mark/poclbm20110311";
use POSIX qw(strftime);

if ($ARGV[0] eq 'logsort')
{
  logsort();
  exit;
}


# idle stop means uncouple. Next time computer becomes idle
# nothing will happen.
if ($ARGV[0] eq 'idle'  and $ARGV[1] eq 'stop')
{
   chdir($dir);
   my $f="$0.idle.pid";
   if ( -e $f)
   {
     $pid=`cat $f`;
     print "kill $pid\n";
      system("kill $pid");
     sleep 1;
     -e $f and  unlink $f;
   }
   exit 0;
}
# idle start means next time computer becomes idle
# start mining.
if ($ARGV[0] eq 'idle'  and $ARGV[1] eq 'start')
{
#  BLANK Wed Mar 16 17:06:30 2011
#  RUN 176
#  UNBLANK Wed Mar 16 17:06:43 2011

   chdir($dir);
      $chi=fork;
      if ($chi==0)
      { open (IN, "xscreensaver-command -watch |");
      while (<IN>) {
       if (m/^(BLANK|LOCK)/) {
        if (!$blanked) {
            system("$0 start");
            $blanked = 1;
        }
       } elsif (m/^UNBLANK/) {
        system("$0 stop");
        $blanked = 0;
       }
      }
      }
      else
      {
#         print "child is $chi\n";
        open(P,">$0.idle.pid") or die "Y";
       $chi=$chi+1;
        print  P "$chi";
       close P;
      }

exit 0;
}

if ( $ARGV[0] eq 'stop' or $ARGV[0] eq 'start' )
{
   system("killall poclbm.py > /dev/null 2&>1 ");
}
$sdk="/home/mark/src/bitcoin/ati/ati-stream-sdk-v2.3-lnx32/lib/x86";
$sdk="/home/mark/src/bitcoin/ati/ati-stream-sdk-v2.3-lnx32/lib/gpu";
# $sdk="/home/mark/src/bitcoin/ati/ati-stream-sdk-v2.1-lnx32/lib/x86";
$poclbm="cd $dir ; export GPU_USE_SYNC_OBJECTS=1 ; export LD_LIBRARY_PATH=$sdk ; export DISPLAY=:0 ; ./poclbm.py";
if ($ARGV[0] eq 'start')
{
  open(X, "$poclbm |") or die "Cannot open miner to determine GPUs";
  # example output expected:
  #
  •    Cypress
 # [1]   Cypress
  # [2]   Intel(R) Core(TM) i7 CPU         950  @ 3.07GHz

  while (<X>)
  {
    chomp;
     m/Cypress/ and m/^.([0-9]+)/ and push(@d,$1);
  }
  close X;
  for my $d (@d)
  {
    start($d);
  }  
  exit 0;
}

sub start
{
  my ($d)=@_;
  my $chi;
  open(F,">>$logdir/poclbm$d.log") or die("X");
  $chi=fork();
  if (!$chi)
  {
    $v=`cd $dir ; export GPU_USE_SYNC_OBJECTS=1 ; export LD_LIBRARY_PATH=$sdk ; export DISPLAY=:0 ; ./poclbm.py --version 2>&1 `;
    $v=~s/\n//;
    print F strftime("%d/%m/%Y %H:%M:%S, ",localtime());
    print F "*** $v started $d \n";
    close F;
     system("cd $dir ; export GPU_USE_SYNC_OBJECTS=1 ; export LD_LIBRARY_PATH=$sdk ; export DISPLAY=:0 ; ./poclbm.py -f 20 --verbose -w 128 -r 60 -v -d$d --user ... --pass ...  >> $logdir/poclbm$d.log 2>&1");
     open(F,">>$logdir/poclbm$d.log") or die("X");
    print F strftime("%d/%m/%Y %H:%M:%S, ",localtime());
    print F "*** stopped $d \n";
    close F;
    exit;
  }
}
sub logsort
{
  my $d=0;
  my %devices;  
  my $l="$logdir/poclbm$d.log";
  $devices{$l}=$d;
  # 1) List all the log files in existence.
  while ( -e $l)
  {
    push(@loglist,$l);
   $d++;
    $l="$logdir/poclbm$d.log";
    $devices{$l}=$d;
  }

  # 2) Make an exhaustive list of days, by an initial pass of all files.

  my %days;  
  for $l (@loglist)
  {
     print "Opening $l\n";
     open(L,$l) or next;
    while (<L>)
    {
      chomp;
      my @a=split(/[ ,]+/,$_);
      $a[0]=~m:^[0-9/]{10}: or next;
      my @b=split('/',$a[0]);
       my $b=join('-',@b);
      $days{$b}=1;
    }
     close L;
  }

  # 3) now open all the log files, read into memory a day at a time, sort and output as a single stream.
  #    read just one days worth of data from each file.
  #
  my $matching=0;
  for my $date (keys %days)
  {
  my $dateo=$date;
  $date=~s:-:/:g;
  my @data;
  for $l (@loglist)
  {
    $d=$devices{$l};
    print "Opening $l device $d\n";
     open(L,$l) or next;
    while (<L>)
     {
       chomp;
      m:^[0-9/]{10}: and !m/$date/ and $matching=0;
       if (m/$date/)
      {
         s/,/ $d,/;
        push(@data,$_);
        $matching=1;
        next;
      }
      if ($matching)
      {
       $data[-1].=" ".$_ if $data[-1] =~ m:^[0-9/]{10}:
      }
    }
    $matching=0;  
     close L;
  }
  print "Sorting for $date\n";  
  @data=sort { $a cmp $b } @data;
  $"="\n";
  $dateo=join('-',reverse split('-',$dateo));
  $outfile="$logdir/$dateo.log";
  open(LL, ">>$outfile") or die "Cannot open $outfile";
  print LL "@data\n";
  close LL;
  print "Output done for date $date to file $outfile\n";
  }
  unlink @loglist;
}


If you find this useful, please bitcoin me! 187PquUCdXRHvQgNc5e7GUnkX8ZeNxMx62
Even 0.001 bitcoins would let me know you found it intresting!!
But even if you do not to bitcoin me, would like to hear that you found it useful anyway!

[[ All Tips gratefully received!!  ]]
15ta5d1N8mKkgC47SRWmnZABEFyP55RrqD
foxmulder
Newbie
*
Offline Offline

Activity: 37
Merit: 0


View Profile
April 25, 2011, 06:06:19 AM
 #9

use 'terminator', yup it's a software name  Grin, you can split & divide per console  horizontally or vertically as many as you want.

Site : http://www.tenshu.net/terminator/

Screenshot : http://www.tenshu.net/wp-content/uploads/2008/08/2008-08-17-terminator.png
                  http://www.tenshu.net/wp-content/uploads/2008/02/terminator-mad.png
DiabloD3
Legendary
*
Offline Offline

Activity: 1162
Merit: 1000


DiabloMiner author


View Profile WWW
April 25, 2011, 10:17:16 AM
 #10

Is it possible to run 4 seperate miners for my 4 x 5870 setup WITHOUT the ubuntu desktop running?

For example, right now when I run 4 GPUs mining at once on one machine, I open up 4 terminals and enter the appropriate d 1, d 2, d 3, etc commands....

How would I open up multiple terminals or run multiple instances when only running the all black console screen?

Why not just use DiabloMiner then? DiabloMiner already uses all GPUs available by default.

Pages: [1]
  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!