back to index
M4 Project Client Install
M4 Project

This page is only for versions prior to 0.76!


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 are offered, /etc/inittab or your system's cron facility.


Download:

Dependencies:

There is a good chance that Python is already on your system. If not, use your system's package manager to install Python or follow the BLFS instructions.


Install enigma-client:

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


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

Create the run directory ~/.enigma-client with the necessary files:


cd enigma-client &&
./eclient-install.sh

If you want extended logging, edit the run files:


cd ~/.enigma-client &&
sed 's/enigma-client.py/enigma-client.py -r/' < ecrun > tmp &&
mv tmp ecrun &&
sed 's/enigma-client.py/enigma-client.py -r/' < ecboot > tmp &&
mv tmp ecboot &&
chmod +x ecrun ecboot

As you see, enigma-client.py now has the -r option, which causes enigma to write verbose output to the file results.


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 following line to /etc/inittab, replacing <user> with your own user name:


EC:2345:respawn:/bin/su - <user> -c /home/<user>/.enigma-client/ecboot

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:

For important announcements about the software, please subscribe to the low volume read-only mailing list m4-announce. Also check out the other 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 following line, replacing <user> with your own user name:


@reboot /home/<user>/.enigma-client/ecrun

For now, start ecrun manually:


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:

For important announcements about the software, please subscribe to the low volume read-only mailing list m4-announce. Also check out the other mailing lists.

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


Run the client on additional cores:

Check out the multicore hint.


Uninstall the client (/etc/inittab version) :

Become root. Remove the line you added to /etc/inittab before.

Inform init about the change:


telinit Q

Switch back to your normal user ID. Remove the client's run directory:


rm ~/.enigma-client/* && 
rmdir ~/.enigma-client

That's it.


Uninstall the client (crontab version) :

Remove the line you added to your crontab before:


crontab -e

Find out the PID of enigma-client (it will show up as python) and/or enigma:


pstree -p
(or)
ps -aux

Kill the relevant PID:


kill <PID of python>
(or)
kill <PID of enigma>

Remove the client's run directory:


rm ~/.enigma-client/* && 
rmdir ~/.enigma-client

That's it.


Contact:

Stefan Krah <website @ bytereef.org>