Create GUI Remote Folders authored by Robert Schöne's avatar Robert Schöne
## How to create a remote-folder
- Select "Setup"->"Create remote-folder"
- Choose your settings:
- username: your login at the other machine <user>
- ip or dns: the dns-name (e.g. merkur.hrsk.tu-dresden.de) or it's IP (e.g.127.0.0.1 for localhost) <host>
- directory: the directory on the other machine where everythig is saved. If It doesn't start with a '/' slash, it will be placed into the home-directory. <dir>
- use SCP: you shouldn't use it I'd say, but there where problems with an old tar-version.
!What happens now:
- A temporary directory will be created: <benchit-root>/gui/temp
- A directory with the name <dir> will be created within the temporary directory
- Different files will be copied into this directory (tools-folder, jbi-folder, root-files like benchit.c)
- If you have selected SCP: A process will be started, which executes "scp -r <dir> <user>@<host>[:dir]. This needs input from the console, which started the GUI. The password must be typed there!!!
- If you have NOT selected SCP (default): A ssh-connection will be opened, a tar-stream is created, where the temporary-directory is added. This will be used as input-stream for this ssh-session, while the command "tar xBf -" is started.
(see sec. internal operations)
## How to start a kernel remote
Select the kernel(s), you want to start, as you would do for a local measurement. Then do a right-click: "Execute remote" or start the
## How to get the results
You can get the results by Selecting "Evaluate" in the Menu and then "get output from remote". The Resulttree will be rebuild, when the files where copied.
removing a remote-folder
Select "Setup"->"Remove remote folder" The folder on the other system will be removed, also the entry on the local system.
IMPORTANT problems with LOCALDEFS
LOCALDEFS are created automatically when starting a kernel (compile or run). When you wish to use predifined LOCALDEFS, Save them when in LOCALDEF-Mode with the hostname of the system!
IMPORTANT problems with FILE RIGHTS
files loose their executable bit when copied to remote-host. When starting a kernel all files in <remote-folder>/bin <remote-folder>/tools and the files <remote-folder>/*.SH will be set to +rwx.
## Internal operations
### Opening an ssh-connection
- An ssh-connection is opened in the following steps:
- try to connect with public-key:
- If the file ~/.ssh/id_dsa is available, it is tried to connect with the public-key. If you haven't set a passphrase for DSA, just press enter, when asked for it. If you have set the right flag (See printing at the console), it won't be asked
- the same procedure with RSA
- try to connect with keyboard-authentication
- try to connect with password. Insert your normal password when asked.
! Sorry, this is still a little buggy. It should work with "normal" settings, but has some errors when trying more then once in quick succession.
Copying s.th. to an other system (when starting a kernel)
- Depending whether you've selected SCP or not:
- Create dir: gui/temp
- Create dir: gui/temp/<dir>
- Copy files to dir gui/temp/<dir>
- if (<scp>)
- call external process: cd gui/temp/
- if <dir> starts with '/' call external process: scp -r <dir> <user>@<host>:/
- else call external process: scp -r <dir> <user>@<host>:
- else (not used scp)
- internal action is started: open new ssh-session (see above)
- a new TarStream is opened with <dir> as input and ssh-stdin as output
- in the ssh session a new process is started.
- If <dir> starts with '/' tar xBf - /
- Else tar xBf -
(tar xBf - means tar extract from stdin, B is set because under Origin3800, tar thought xf - would mean extract from a block-device)
- the streams are closed
- the session is closed
### Copying s.th. from an other system (when getting results)
When getting something from an other system
- The remote computer will start an tar cBf - and the GUI will read the stdout of the shell, which starts this command.
- The Output will be written in the file "temp.tar" (still located under benchit/gui/bin, but will be moved to $TEMP_DIR).
- This file will be read and searched for the starting sequence of the TAR-Archive. Everything before this sequence will be cut.
- Then, the file will be decompressed to benchit/gui/temp (will also move to $TEMP_DIR).
- Then, the folder "output" from benchit/gui/temp will be copied to benchit/.
- At last temporary files are deleted.
If you have problems with getting output-files, see in gui/BIGRemoteMenu.java (public getOutputFromRemote(...)) or contact the developer. Often these failures come with strange tar-versions, which can't handle the flags properly or instable ssh-connections.
Executing a command (when starting a kernel)
When starting a kernel with selected compile ("compile only" or "compile and run")
- The GUI will copy to the folder benchit/gui/temp/<remote-folder-name>:
- the selected kernels
- the LOCALDEFS
- a new created file called remoteProc.sh, which contains all the starting information (compile and run commands)
- the GUI will open a ssh-connection to the remote computer
- the GUI opens an tar-stream over the temporary directory
- the GUI will start the command tar xBf -
- the GUI will write the tar-stream to the std-in of the console, tar xBf - is started on
- the GUI will start a new ssh-connection and run the remoteProc.sh
When starting a kernel without selected compile ("run only")
- The GUI will open a ssh-connection to the remote system
- on this ssh-connection, a command is started, which checks for all available files in the remote systems bin-folder
- They will be displayed and the user can select, which he wants to run.
- a new file will be created called remoteProc.sh, which contains all the starting information (run commands)
- a new connection is opened and this file is copied via tar
- a new connection is opened and this file is started
\ No newline at end of file