Last active
April 11, 2024 08:11
-
-
Save mdpuma/429a4feecd1bc29887fed9bb3fa2af43 to your computer and use it in GitHub Desktop.
strace by process name
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| strace $(pidof php-fpm | xargs -n1 | xargs -I{} echo -n ' -p {}') | |
| strace $(ps -ef | grep lsphp | grep USER | cut -d ' ' -f2 | xargs -I{} echo -n ' -p {}') | |
| # chatgpt generated version | |
| # strace by user name | |
| strace -p $(pgrep -u USER -d,) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment