back to index
M4 Project Client Install
M4 Project

Unix: How to run enigma-client automatically in the background:

This page contains step by step install instructions for the Unix distributed computing client for the M4 Project. Two alternative mechanisms of starting the client in the background are offered, /etc/inittab or your system's cron facility. You can also start the client manually in the foreground using the fgstart script.


Download:

Dependencies:


Install enigma-client:

Compile (try gmake if you get errors with make):


tar xvzf enigma-suite-0.76.tar.gz &&
cd enigma-suite-0.76 &&
make

Run the installer. The installer will try to detect if you should use the default version or the XML-RPC version. Also, you can create multiple run directories if you have more than one CPU/core:


cd enigma-client &&
./install.py

If you want verbose output written to a file, edit the run files (in each run directory):


# Insert after enigma-client.py (or eclient-rpc.py):

-r

This will cause enigma to dump results to the file results in the run directory. Note that the best result in a work unit is already written in shorthand to the logfile.


Dial up connections:

If you have a dial up internet connection, make sure that dial-on-demand is disabled.


1) Start the client using /etc/inittab:

Become root. Add the EC line(s) that the installer suggested to /etc/inittab.

Tell init to reinspect /etc/inittab:


telinit Q

These actions cause init to run the ecboot script under your user name in the runlevels 2,3,4,5. If the runlevels are not appropriate for your system, change them. They should be acceptable for most Linux distributions.

Check if the client is running:


pstree

You should see approximately this in the output:


init(1)-+
        |
      [cut ...]
        |
        |-ecboot(156)---python(158)---enigma(530)

If you are not connected to the Internet, only ecboot and python will be running, since there is no workunit for enigma to work on. If enigma-client needs a workunit, it will check every 10min if it can connect to the server.


Receive important announcements:

Check out the mailing lists.

You're done now. If you don't want to take part anymore, follow the uninstall instructions.


2) Start the client using your system's cron facility:

Vixie cron:

Edit your crontab:


crontab -e

Add the @reboot line(s) that the installer suggested.

For now, start ecrun manually (in each run directory that you created):


cd ~/.enigma-client &&
./ecrun

If you use another cron (e.g. fcron), you obviously will need another entry in the crontab.

Check if the client is running:


pstree

You should see approximately this in the output:


init(1)-+
        |
      [cut ...]
        |
        |--python(158)---enigma(530)

If you are not connected to the Internet, only python will be running, since there is no workunit for enigma to work on. If enigma-client needs a workunit, it will check every 10min if it can connect to the server.


Receive important announcements:

Check out the mailing lists.

You're done now. If you don't want to take part anymore, follow the uninstall instructions.


3) Run the client manually in the foreground:


cd ~/.enigma-client &&
./fgstart

All log output goes to the terminal.



Contact:

Stefan Krah <website @ bytereef.org>