Installing and using Strace Print

  • 9628

Strace is a Linux command that allows you to follow what a process on your server is doing. Let's say process 351711 has been running for an extended period, and you're wondering if it's doing anything, or it's hung/stuck - strace is perfect for such situations! First of all, we need to install it.

CentOS: 
yum install strace

Debian and Ubuntu:
apt-get install strace

Once it's installed, it's as simple as running strace -p PID (where PID is the process ID).

If there's no process running, you'll see something like this:

# strace -p 351711
strace: attach: ptrace(PTRACE_ATTACH, ...): No such process


Was this answer helpful?

« Back


Ethernet Servers Ltd
124 City Road
London
EC1V 2NX
United Kingdom


Registered Limited Company: #09114946

Telephone:
+44 330 043 1258

Email:
hello@ethernetservers.com

Copyright © 2014 - 2024 - Ethernet Servers Ltd - All Rights Reserved.

Proudly serving customers in 143 countries since July 2014!