Using Remote UI Connections with TotalView
The ability to run the TotalView user interface from your Linux or MacOS machine and connect to a remote debugging session was added to TotalView in the 2020.3 release. This feature is a major advancement in making remote debugging much easier.
In this blog post, we will look at how to configure a remote connection, and then look at two examples:
- A direct connection using a username and password.
- A connection requiring an intermediate remote host using public / private key access.
About Remote Debugger Connections
The remote debugger connection feature is available from the TotalView start page. By default TotalView will debug on the system it is run on.
To configure a new connection, click on the Configure icon on the right.
Once configured, the remote connection will be stored and available to select from the Launch Remote Debugger drop-down menu.
Note: To use remote connections, the versions of TotalView on the local and remote machines must be the same.
Configuring a Remote Connection
When you click on the Configure icon you will be prompted to enter the following details to create a new Remote Connection:
A descriptive name for this connection.
The user and remote host to connect to, either a network path or an IP address. If your network has a gateway machine, use a comma-delineated string to include intermediate hosts.
For example: user@myServer.myNetwork.com, user@anotherServer.myNetwork.com
Private Key File
Provide an optional Private Key File used as part of the SSH connection to connect to your remote system
TotalView Remote Installation Directory
The directory on the remote host where TotalView is installed. This is the installation’s executable directory.
For example: /usr/toolworks/totalview.2021.4.1/bin. If the totalview executable is in your path, or commands added to the next option, Remote Commands, add it to your path then you can leave this field blank.
Optional shell commands to execute before TotalView is run on the remote server. Shell commands must follow the syntax of your SSH login shell. Convenient commands could set your PATH environment variable to include the path to where the TotalView executable is installed.
For example: module load totalview ; module load openmpi.
Remote Connection Example Using Username and Password
In this example we are using a username and password to establish a remote connection. The remote command ‘module load mpi’ will be run before starting TotalView on the remote server.
You must launch TotalView from a shell if you are required to enter a password or some other form of two-factor authentication code when logging into your remote system. The shell where you started TotalView from will show the prompt for you to enter your password.
Remote Connection Example Using Multiple Hops With Private Key
In this example we first connect to the microway1 server as a gateway to the microway2 server. Microway2 is a remote host alias and uses a non-standard SSH daemon port 60022.
The connection to the microway1 server uses the private key stored in the id_rsa file in the .ssh directory.
Additionally we need to add the host details for the mcroway2 server to the config file in the .ssh directory. To match the custom setting for the remote host, we can add the config information to the SSH config file:
Incase you do not want to use the multi-hop approach, you can extend the config file to include the ProxyCommand:
ProxyCommand ssh -q -W %h:%p dstewart@microway1
To learn more about using SSH config files check out the following: Using the SSH Config File | Linuxize
The Remote Connection will then look like the following:
Next Steps and Additional Resources
Looking for additional support on using TotalView remote debugging or remote development for you or your team, or have questions about TotalView?
- Watch the Remote Debugging Video Tutorials for useful short video segments that demonstrate each feature.
- Attend a demo.
- Contact us with any other questions!