I have a web server (Linux debian 2.4.18-bf2.4 i686) with no graphics, only a bash CLI that I ssh into. Since it is not heavily used, I thought I'd try einstein@home on it.
However, I wasn't able to locate an elementary tutorial with the minimal commands to just run it and forget it, hopefully without having to spend too much time becoming a boinc CLI expert.
I have found some CLI discussions, but they seem to presuppose some knowledge I don't have (e.g. that a password must placed in gui_rpc_auth.cfg - but that file doesn't exist, no mention was made of what directory it should go in, and I have no gui anyway).
Here is where I'm at. I downloaded boinc_5.10.21_i686-pc-linux-gnu.sh into my home directory, chmod'ed it to +x, and ran it. So far, this works:
norm@debian:~$ /home/norm/BOINC/boinc_cmd --help
What next? :)
Thanks!
Norm
Copyright © 2024 Einstein@Home. All rights reserved.
Newbie command line (CLI) tutorial
)
http://boinc.berkeley.edu/trac/wiki/BoincCmd
http://boinc.berkeley.edu/trac/wiki/UnixClient
Those two links have all the command line information necessary.
You did attach that machine to Einstein already? Or is it now only running BOINC and nothing else?
RE: http://boinc.berkeley.e
)
Thanks for responding. I found those links before, but they are not helpful because they are just lists of commands that don't explain what I have to do.
For example, when I type (dumbly guessing at some parameters, which the provided examples don't explain) "./boinc_cmd --project_attach http://einstein.phys.uwm.edu " I get "connect: Connection refused can't connect to local host".
Unfortunately, you are already way above my level of expertise, and I'm sorry if my question seems too elementary. I just want the minimal commands I have to type to get this running. As I mentioned, the only thing that I have done is run the downloaded .sh file, run it, and verified I can type "./boinc_cmd --help." I don't think I am "running BOINC" (with what command?) or have "attached to Einstein" (with --project_attach? with what URL/parameters?), so the answer to both of your questions is "no".
Norm
OK. :-) We'll start slow
)
OK. :-)
We'll start slow then. My knowledge of Linux is somewhere between "mwoah" and "um" though, so I could have a thing or two wrong.
First the question about the account key; Do you have the account key for Einstein@Home? It's a 32 character hexadecimal key that you got in an email. If you didn't get the email, go here, fill in the email address you used to register this account with and hit the key there, then wait for the email to come in.
You can also get it by opening up the account_einstein.phys.uwm.edu.xml file in your Windows XP BOINC directory and copying it from between the tags. We'll directly go into an "um" moment, as I don't know how you can easily transport the key then from the one computer to the next. You'll probably figure something out. A textfile and a floppy, or an email to yourself.
To start BOINC up do the following:
./run_client -daemon
Then to attach it to Einstein@Home:
./boinc_cmd --host localhost --project_attach http://einstein.phys.uwm.edu YourAccountKey
And that should be it. Or so I gleaned from the unofficial Wiki.
RE: .... For example, when
)
Norm, you are almost there. The bit you are missing is that boinc_cmd is a program designed to connect to and interact with an already running boinc. In other words you have to launch boinc first and then boinc_cmd will be able to find it and connect to it. That's what the error message is supposed to mean.
There are a number of flags you can use when you launch boinc. The ones you choose will depend on your circumstances. If you would like boinc to run in the background without needing to be started and stopped all the time, then launch it with the --daemon flag. I would think this would be appropriate for your server. Whilst you many not have a gui on the server, can you access the server from another machine which does have a gui? If you can you will find your life much easier if you don't use boinc_cmd over a ssh CLI. You can install and run Boinc Manager on the other machine which has a gui and set up the permission for Boinc Manager to connect to the boinc on the server.
To allow this to happen you would simply launch boinc on the server first by issuing the command (at a bash prompt, from the boinc directory):-
./boinc --daemon --allow_remote_gui_rpc
It is the launching of boinc with that second flag that sets up the remote procedure call mechanism (RPC) a part of which is the creation of the password file gui_rpc_auth.cfg in the boinc directory. You can forestall the creation of that file, which would otherwise contain a 32 char unintelligible password, by creating your own version first with your own password in it. You would do this before launching boinc with the second flag. The file should contain just a single line of text - your desired password.
Once you have launched boinc in this fashion, boinc will notice and use your customised gui_rpc_auth.cfg file. You can then launch Boinc Manager on your other gui machine and use the advanced menu to select the "Select Computer ..." option. You need to supply the hostname or IP address of the target machine and the agreed password. Completing these details will allow the remote Boinc Manager to attach to the running boinc on the server and then you can do all the good stuff like attaching to projects, etc, over a nice gui screen.
Hope this helps!
Cheers,
Gary.
Hi! A few more things to
)
Hi!
A few more things to consider in general when running boinc on (web)server.
1) Please don't run it as root. It's best o create a separate user for it.
2) Once yopu are familiar with the CLI client (boinc_cmd), consider starting boinc without the --allow_remote_gui_rpc option. Anyway, for security reasons, you don't want to have too many open ports allowed to be reached from the outside (Internet)
on your webserver.
CU
H-B
RE: ...And that should be
)
Thanks, Ageless, this is the link I needed. Unfortunately that didn't show up in a search for "boinc CLI newbie tutorial", and "controlling the daemon" in the page's title is already enough to scare away most newbies. :)
So, in case someone else's search for those terms ends up at this thread, I'll repeat exactly what I did. This can be done from a home directory; no root permissions are required. For step 1, check for the latest release at http://boinc.berkeley.edu/download_all.php. The last 3 steps should eventually be put into a startup script that runs after a reboot, of course, but that's for another tutorial, and anyway hopefully the Linux server won't need to be rebooted for many years. :)
1. wget http://boincdl.ssl.berkeley.edu/dl/boinc_5.10.21_i686-pc-linux-gnu.sh
2. chmod +x boinc_5.10.21_i686-pc-linux-gnu.sh
3. ./boinc_5.10.21_i686-pc-linux-gnu.sh
4. cd BOINC
5. ./boinc --daemon
6. ./boinc_cmd --project_attach http://einstein.phys.uwm.edu/ xxx...xxx
where xxx...xxx is the 32-character Account Key from the initial Einstein@Home email.
Done.
As for a GUI suggestion, perhaps I'll try that eventually, but right now I just wanted to get this going with the least amount of setup.
Norm
Just for completeness
)
Just for completeness (usefull things in a CLI-only BOINC installation on a server):
./boinc_cmd --get_state
Will tell you most things you can see from the GUI and more. Experienced users might find it useful to trigger this command periodically (e.g. onece per hour) via crontab entry and redirect the output to some private space on a (web)server from where you can download it (maybe password protected via a .htaccess file). So no need to connect remotely just to check state.
./boinc_cmd --project http://einstein.phys.uwm.edu update
The equivalent of pushing the Update button in the GUI.
CU
Bikeman
You may also find this
)
You may also find this useful: Installing and Running the BOINC client on Unix
- Eric Myers
RE: RE: ...And that
)
I did search for it and land in this thread, thanks for taking the tme to write that up and making very clear to follow and understand
Macks personal injury solicitors
RE: I did search for it
)
Glad it was helpful. Two other simple things you may find useful:
1. Add to the installation procedure these two commands to initialize your stats on the server as described here:
$ ./boinc_cmd --run_benchmarks
$ ./boinc_cmd --project http://einstein.phys.uwm.edu update
2. Install the /etc/init.d/boinc start and stop script as described here, particularly noting the edits to change the assignments to BOINCUSER, BOINCDIR, and BOINCEXE in the script to your home directory (if that's where you installed boinc). This lets you start and stop boinc when doing computer maintenance, stop it cleanly before rebooting (so you don't end up aborting boinc and losing or corrupting the work unit in progress), and restart it after rebooting. With this script you just type:
$ /etc/init.d/boinc start
$ /etc/init.d/boinc stop
You need to be in the BOINC directory when running these, otherwise you may get a permissions error.
--Norm