Inhaltsverzeichnis

Login and compute servers at the Department of Mathematics

Login servers

Compute servers

Computations independent of the ssh connection

For login servers, desktop computers etc. to be rebooted after updates, long running computations should always be done disconnected from the ssh connection to the compute server. This is possible using terminal multiplexors like tmux or GNU Screen. Here is an example for the use of tmux:

Starting a tmux session

From the first ssh session, you should become independent of the kerberos/AFS credentials, which will be destroyed upon closing the ssh session:
kpagsh

You needs to obtain new credentials (Explanation):
kinit -l 2w --renewable -r 3month

Now you have got 2 weeks access to files on AFS and are entitled to renew these credentials for 3 months without reentering your password. With these credentials, you can start a tmux session, in which you will run your computations:
tmux

You can detach from the tmux session, which will continue to run in the background:
<Ctrl>+<B> <D>

After that, you can close the kpagsh and the ssh connection:
exit
exit

Restoring a tmux session

After logging back in via ssh, you can reconnect to your running tmux session:
tmux attach

Renewing credentials

If you have to renew your credentials while a computation is running, you can create a new window in tmux:
<Ctrl>+<B> <C>

From here, you can renew your kerberos/AFS credentials (in this example for 2 weeks):
kinit -R -l 2w

Now you can return to the original window 0 (and possibly later back to the new one with 1 instead of 0):
<Ctrl>+<B> <0>

Alternatively, you can close the window:
exit

Closing the tmux session

Before you close the tmux session, you should destroy the kerberos/AFS credentials, which kpagsh made independent of the login:
kdestroy

You close the tmux session by closing the last window:
exit

(jan henrik, 2012-02-24)