How to perform an strace

Follow

What is an strace?

Strace is an abbreviation for "system trace", and is a useful Linux tool that logs data about processes that exist on the server & how they interact with the Linux kernel.

 

How do I perform an strace?

  1. Open an SSH session into your server in one window.
  2. Open your Posit GUI in another window.
  3. In the Posit window, open an R session for the affected user and type Sys.getpid() to get the process ID of the R session. 
  4. Get the Posit GUI window ready to perform the action that is causing the initial issue.
  5. In the SSH session, run the following command, where $PID is the Process ID from the second step:
    strace -fttT -p $PID -o /tmp/posit-trace-$PID.log
  6. Immediately click back to the Posit window and perform the action which causes the issue.
  7. After it has been completed, click back to the SSH window and press Ctrl+C to end the trace.
  8. Zip & Send us the /tmp/posit-trace-$PID.log file.

Comments