Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

If you want to end your remote session, click the "SSH connection status" box in the lower left corner. Then, in the input box that opens, select the "Close Remote Connection" option. If you simply close your VS Code window, some server-side components of VS Code will continue to run remotely.

Column
width900px

Figure 2. Example of Visual Studio Code screen feature that allows clean disconnection from SSH session.

Column
width900px
Note
titleAlways close the remote session

Always follow the exit process described above. If you don't and simply close your VS Code window, then some server-side components of VS Code will continue to run remotely.

 

Kill the leftover orphan processes in the login nodes

...

To identify Visual Studio Code leftovers, exit completely from any session of VS code running on your computer. Then, users should connect to Setonix by other means (like the use of a terminal recommended in Connecting to a Supercomputer using SSH). If the user knows exactly the login node where the orphan processes reside, they can connect directly to that login node. So, if orphan processes are in "setonix-03", then users can connect directly to that login node with: 

ssh <userName>@setonix-03.pawsey.org.au

If users are performing a regular check for orphan processes, then they will need to traverse along all the login nodes and check for orphan processes on each of them. Currently there are 4 login nodes available to users going from -01 to -04.

Column
width900px
Note
titleOnly connect to specific login nodes to perform killing of orphan processes

Only use direct connection to specific login nodes when performing cleaning of orphan processes. For the rest of your connections users should be using the generic name setonix.pawsey.org.au, which provides access to different login nodes in a round robin fashion providing load balancing among all our users. Furthermore, the use of the generic name provides a more reliable access as it can provide service to users on active login nodes while some specific login nodes may be taken down by pawsey staff for technical reasons.


Once the user has logged into Setonix, execute the desired login node, execute the ps command together with "filtering" with the the grep command acting repeatedly on the output to narrow it down to only those processes owned by the user and related to "vscode":

...

Once users can visually confirm that those are indeed only the orphan processes of interest, they can proceed to kill them by extending the command to extract a list of the process IDs and pass it to the passing that list to the kill command:

Column
width900px


Code Block
languagebash
themeDJango
titleTerminal 3. Killing unexpected/orphan VS Code processes
$ ps -fea | grep ${USER} | grep -i "vscode" | grep -v "grep" | awk '{print $2}' | xargs kill -9

#Confirm that after killing, no vscode process exist:
$ ps -fea | grep ${USER} | grep -i "vscode" | grep -v "grep"
$


Once users are taking some time to relief the login nodes from orphan processes then, as recommended above, it is a good idea to go through all the active login nodes and perform a check (and kill if needed).

If you find that after killing orphan processes in all the login nodes is still giving you problems to login using VS code. Then, you may need to purge the Visual Studio Code directory on Setonix using the following:

...