diff --git a/docs.it4i/salomon/accessing-the-cluster/accessing-the-cluster.md b/docs.it4i/salomon/accessing-the-cluster/accessing-the-cluster.md index 9b1d60d7a4dff42a1c97be96de11a7fd49c03400..2ed906c7294b2dda9b02cd82f557e9b60f83d85e 100644 --- a/docs.it4i/salomon/accessing-the-cluster/accessing-the-cluster.md +++ b/docs.it4i/salomon/accessing-the-cluster/accessing-the-cluster.md @@ -58,6 +58,7 @@ Last login: Tue Jul 9 15:57:38 2013 from your-host.example.com [username@login2.salomon ~]$ ``` +Example to login on Salomon <tty-player controls src=/src/login.ttyrec></tty-player> !!! Note "Note" @@ -107,6 +108,9 @@ local $ sshfs -o IdentityFile=/path/to/id_rsa username@salomon.it4i.cz:. mountpo Using sshfs, the users Salomon home directory will be mounted on your local computer, just like an external disk. +Example to transfer data +<tty-player controls src=/src/transfer.ttyrec></tty-player> + Learn more on ssh, scp and sshfs by reading the manpages ```bash diff --git a/docs.it4i/salomon/environment-and-modules.md b/docs.it4i/salomon/environment-and-modules.md index 854c2e20e9ec4c01fb49308ab9bb31758c754e48..018913c575c4ae39cfa8c6283ed0e0bac6fcfe04 100644 --- a/docs.it4i/salomon/environment-and-modules.md +++ b/docs.it4i/salomon/environment-and-modules.md @@ -23,6 +23,8 @@ then module list # Display loaded modules fi ``` +Example display informations to standard output +<tty-player controls src=/src/modules.ttyrec></tty-player> !!! Note "Note" Do not run commands outputing to standard output (echo, module list, etc) in .bashrc for non-interactive SSH sessions. It breaks fundamental functionality (scp, PBS) of your account! Take care for SSH session interactivity for such commands as stated in the previous example. diff --git a/docs.it4i/src/login.screen b/docs.it4i/src/login.screen new file mode 100644 index 0000000000000000000000000000000000000000..3bc948dee22b2789dabb522427f180d132579d19 --- /dev/null +++ b/docs.it4i/src/login.screen @@ -0,0 +1,14 @@ +# login to Salomon cluster from local linux machine + +ssh -i /home/local/.ssh/id_rsa dd-16-12-13@salomon.it4i.cz + +# successfull login to cluster + +# run htop command + +htop + +# logout from cluster + +logout + diff --git a/docs.it4i/src/modules.screen b/docs.it4i/src/modules.screen new file mode 100644 index 0000000000000000000000000000000000000000..eb7bbefae680c86a8295317c127f039d2d449a2f --- /dev/null +++ b/docs.it4i/src/modules.screen @@ -0,0 +1,33 @@ +ssh -i /home/local/.ssh/id_rsa dd-16-12-13@salomon.it4i.cz + +# working with modules + +# get the current version of Python +$ python --version + +# run Python +python + +# right now is version 2.6.6 + +# search all available Python's modules +module avail |& grep Python/ + +# for example let's choose a new module Python 3.5.1 +$ module load Python/3.5.1-intel-2016.01 + +# and now get the current version of Python +$ python --version + +# run Python +python + +# that's correct, version 3.5.1 + +# now turn back to old version you have to unload module +$ module unload Python/3.5.1-intel-2016.01 + +$ python -- version + +# Python version 2.6.6 is ready to use now + diff --git a/docs.it4i/src/modules.ttyrec b/docs.it4i/src/modules.ttyrec new file mode 100644 index 0000000000000000000000000000000000000000..544afa6c4a89d8c834dd83b97a980e030c2bf684 Binary files /dev/null and b/docs.it4i/src/modules.ttyrec differ diff --git a/docs.it4i/src/transfer.screen b/docs.it4i/src/transfer.screen new file mode 100644 index 0000000000000000000000000000000000000000..b0962a229ff3ae9f29a4f2edeccf028fc15f870c --- /dev/null +++ b/docs.it4i/src/transfer.screen @@ -0,0 +1,70 @@ +# file transfer from local machine to the remote cluster +# toto i v CZ + +# create local directory with files +$ mkdir folder +$ cd folder + +# using scp command to transfer a file +$ touch test_file.scp +$ scp test_file.scp dd-16-12-13@salomon.it4i.cz:/home/training/dd-16-12-13/test_file.scp + +# using scp command to transfer a directory +$ mkdir local_dir +$ touch local_dir/file +$ scp -r local_dir dd-16-12-13@salomon.it4i.cz:/home/training/dd-16-12-13/local_dir + +# using sftp command +$ touch test_file.sftp +$ sftp -o IdentityFile=/home/local/.ssh/id_rsa dd-16-12-13@salomon.it4i.cz +# ukazat i interaktivni rezim +# commands: https://www.digitalocean.com/community/tutorials/how-to-use-sftp-to-securely-transfer-files-with-a-remote-server +# list of all commands - help or ? +sftp> help + +# display remote working directory on Salomon +sftp> pwd +# display remote directory listing on Salomon +sftp> ls -la +# display statistics for remote directory +sftp> df -h + +# display local working directory on linux machine +sftp> lpwd +# display local directory listing on linux machine +sftp> lls -la + +# now we can upload a file from linux machine to Salomon +sftp> put test_file.sftp + +# and then check if successfull uploaded +sftp> ls -l + +# of course we can download a file from remote machine +sftp> get tutorial.tgz + +# and check in local directory +sftp> lls -l + +# delete local file from sftp +sftp>!rm tutorial.tgz + +# quit sftp +sftp> exit + + +##################### +# using sshfs command +# zatim nedelat +$ touch test_file.sshfs +## zjistit mountpoint! +$ sshfs -o IdentityFile=/home/local/.ssh/id_rsa dd-16-12-13@salomon.it4i.cz:. /home/training/dd-16-12-13 +##################### + +# login to the Salomon cluster and check all transfered files +ssh -i /home/local/.ssh/id_rsa dd-16-12-13@salomon.it4i.cz + +$ls -l + +# yes, all files are stored to home directory on the cluster + diff --git a/docs.it4i/src/transfer.ttyrec b/docs.it4i/src/transfer.ttyrec new file mode 100644 index 0000000000000000000000000000000000000000..5c926a7b55d3e66c57f26fa5bb96fd970f1287c5 Binary files /dev/null and b/docs.it4i/src/transfer.ttyrec differ