mersenneforum.org  

Go Back   mersenneforum.org > Other Stuff > Archived Projects > 3*2^n-1 Search

 
 
Thread Tools
Old 2005-11-22, 20:24   #1
runcer
 
runcer's Avatar
 
May 2005

78 Posts
Default Please help with many LLR's on HedHat

I am running many machines with a Red Hat Enterprise Linux rel 3 (Taron update 4) OS and the way I am currently running is to telent to that machine from the host CD to the right directory then run "./llr -m".

My question is: is there an easier way to run LLR on another machine, other than how I am doing it? I'd love to see a program that will spread the work to the machines you allow and manage the candidate files a bit more gracefully.

Any help is appreciated.
Joe
runcer is offline  
Old 2005-11-22, 20:56   #2
paulunderwood
 
paulunderwood's Avatar
 
Sep 2002
Database er0rr

2×7×281 Posts
Default

Joe,

once you have run "llr -m" to set up the input file, line counter etc, and option 2 to see that it is running, press "^c" to stop the program and then run "nohup llr". This will let you end the telnet session but leave llr running. This is what I do (but using ssh.)

I use a script to run over my samba and nfs shares to check that the servers are running and to list such things as an "ls" on lresults.txts and the "tail -n2" of lresults.txts. Thus with one script I can see what's happening on all my computers.

As ever with linux, you could do things differently. For instance you could have a central file server and let the other computers mount the central file share and then run LLR on the shared space (but I prefer the method I use.)

Also I use "/etc/rc.local" (or equivalent) to automatically start LLR if for some reason a server is rebooted.

Last fiddled with by paulunderwood on 2005-11-22 at 21:02
paulunderwood is offline  
Old 2005-11-22, 21:08   #3
runcer
 
runcer's Avatar
 
May 2005

710 Posts
Default still in need of help

Paul, I am a total rookie with linux commands so can you email me that script so I can possibly bastardize it to run with my system? Is there a way of not telnetting to the other system? What is ssh and what does the command look like?
Joe
runcer is offline  
Old 2005-11-22, 21:19   #4
paulunderwood
 
paulunderwood's Avatar
 
Sep 2002
Database er0rr

2×7×281 Posts
Default

I will pm you the script I use.

The servers share out their llr directories. I then mount these shares on my workstation under "/home/paul/mnt".

ssh is the same as telnet but is encrypted, hence the name "secure sh". Telnet is open to "man in the middle atack". Telnet is fine if you are working in a secure area. to run ssh just type something like "ssh 192.168.0.3" and you will be prompted for a password to that computer. This assume you have a ssh server and a ssh client.

Quote:
Is there a way of not telnetting to the other system?
At some point you will need to log on to the server to set up LLR with a new input file

Perhaps someone with more experience will help out.

Last fiddled with by paulunderwood on 2005-11-22 at 21:41
paulunderwood is offline  
Old 2005-11-22, 22:41   #5
runcer
 
runcer's Avatar
 
May 2005

716 Posts
Default tail

with tail how do you tell if things are still running, b/c it will just tell you the last line or so, and you don't know if this is the last candidate or the first. is there a way tail can list the line count?

Thanks
Joe
runcer is offline  
Old 2005-11-22, 23:01   #6
paulunderwood
 
paulunderwood's Avatar
 
Sep 2002
Database er0rr

2×7×281 Posts
Default

Okay. Use "grep PgenLine /home/paul/llr/llr.ini" or "grep PgenLine ~/llr/llr.ini" if you own the user account.

"wc" is useful for getting the size of a file e.g. "wc ~/llr/321-file.txt"

You could write a really complicated script that (using "cut" and "cmp") will compare the output of "wc" output with the "grep" and then email you that you need to give llr a new input file. But that would be a little more difficult but totally doable.

There maybe some other things in llr.ini that could be "grep"ed to give you info about whether LLR is running or not. Maybe "WorkDone"

Any experts on llr.ini files here?

Last fiddled with by paulunderwood on 2005-11-22 at 23:02
paulunderwood is offline  
Old 2005-11-23, 01:05   #7
paulunderwood
 
paulunderwood's Avatar
 
Sep 2002
Database er0rr

2×7×281 Posts
Default More about ssh

I'll add that you can run graphics over ssh (secure shell). For instance if "Joe" is sat at Machine A and would like to run X-Tetris on machine B as "paul" then:

ssh -X paul@192.168.0.3

should do the trick.

(I use IP addresses, but if you have a DNS running you could use the computer's name instead.)

Last fiddled with by paulunderwood on 2005-11-23 at 01:10
paulunderwood is offline  
Old 2005-11-23, 12:39   #8
Thomas11
 
Thomas11's Avatar
 
Feb 2003

5×383 Posts
Default

I'm using the following perl script to run LLR on a couple of machines. Perhaps it is of some use for you, Joe. If there isn't a ssh running on your machines, it should also work with the "rsh" command instead of "ssh".

Note the "-B" switch for LLR. It runs LLR in the background, e.g. it works the same way as "nohup llr".
Note also that the way I analyse the output of the uptime command assumes the machines are running for at least one day. For uptime < 1 day the $load variable will contain the wrong data...
And finally note, that you will need some additional script which does the preparation of the input files on your machines. I have some scripts for that purpose, but they assume that the machines have a common home directory. So you'll need to find some other way to handle the input files.

Good luck!

Thomas

Code:
#!/usr/bin/perl -w
                                                                                
# Programm: automatic.pl
                                                                                
# you need to change the following into your machine-names or IPs:
@machines = ("comp1", "comp2", "comp3", "comp4");
                                                                                
for ($i=0; $i<=$#machines; $i++)
{
  $machine = $machines[$i];
# get the load on this specific machine:
  $help = `ssh $machine uptime`;
  @data = split(" ", $help);
  chop($data[9]);
  $load = $data[9];
  print "$machine $load\n";
# start LLR if the load is lower than 0.25:
  if ($load < 0.25)
  {
    print "starting LLR at $machine\n";
# you will need to adjust the name of the working directory:
    `ssh $machine "cd ~/llr321/$machine/ && ./llr -B"`;
  }
}

Last fiddled with by Thomas11 on 2005-11-23 at 12:43
Thomas11 is online now  
Old 2005-11-23, 14:02   #9
paulunderwood
 
paulunderwood's Avatar
 
Sep 2002
Database er0rr

2·7·281 Posts
Default

That's just cool, Thomas. I had to do a "man ssh" to get info on how to log on to a remote machine without being prompted for a password
paulunderwood is offline  
Old 2005-11-23, 15:19   #10
runcer
 
runcer's Avatar
 
May 2005

7 Posts
Default show line #'s working

cd /path/LLR/llr01
pwd
tail -n1 lresults.txt
grep PgenLine llr.ini
cd /path/LLR/llr02
pwd
tail -n1 lresults.txt
grep PgenLine llr.ini
cd /path/LLR/llr03
pwd
tail -n1 lresults.txt

when I run the above it tells me what directory and what line # has been completed for the LLR. Do you know how to put a space between the readouts? This also shows my limited command knowlege! Thank you Thomas for the script to show the machine load and the auto starting of LLR, but it wants me to type the password for each machine aand looking at your script I'm not too sure it will work with the way I have the directory structure laid out. I have a main LLR dir and then seperate instances of LLR exec in children directories. Is this a good directory setup, I can't see another way to do it because the .ini file contains specific info for each candidate file.

Thanks again! Joe
runcer is offline  
Old 2005-11-23, 15:39   #11
paulunderwood
 
paulunderwood's Avatar
 
Sep 2002
Database er0rr

2·7·281 Posts
Default

Quote:
Do you know how to put a space between the readouts?
just issue the command

echo

i.e echo nothing -- this will output a blank line.

Also try

grep WorkDone llr.ini

Joe, are you running a central file server?

To get around the logon prompt you will need to read the manual page for ssh:

man ssh

The RSA mechanism can be set up to allow logon without a password prompt. You will need to set up a couple of files:

Quote:
ssh implements the RSA authentication protocol automatically. The user creates his/her RSA key pair by running
ssh-keygen(1). This stores the private key in $HOME/.ssh/identity and stores the public key in
$HOME/.ssh/identity.pub in the user's home directory. The user should then copy the identity.pub to
$HOME/.ssh/authorized_keys in his/her home directory on the remote machine (the authorized_keys file corresponds to
the conventional $HOME/.rhosts file, and has one key per line, though the lines can be very long). After this, the
user can log in without giving the password. RSA authentication is much more secure than rhosts authentication.
but I am not sure this is what you need because I am not sure what your network setup is like...

Last fiddled with by paulunderwood on 2005-11-23 at 15:40
paulunderwood is offline  
 

Thread Tools


All times are UTC. The time now is 16:05.


Fri Dec 3 16:05:09 UTC 2021 up 133 days, 10:34, 2 users, load averages: 1.01, 1.02, 1.07

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.