Linux – Bash process with 100% cpu usage. How to troubleshoot

bashlinux

I have a bash script that is in a runnable state with 100% cpu usage in the user space. Is there a way I can inspect more closely what's causing the issue, without killing the process, such as do a stack trace?

Best Answer

Take a look at your process with strace:

strace -p <pid_of_your_process>
Related Question