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.

RHEL (i.e. AlmaLinux, Rocky Linux, CentOS, etc): 
yum install strace

Debian and Ubuntu:
apt install strace

Once it's installed, it's as simple as running strace -p 351711

If there's no process running, you'll see a line returned which reads something along the lines of "no such process"

Was this answer helpful? 9728 Users Found This Useful (12422 Votes)