Skip to content

Instantly share code, notes, and snippets.

@mdpuma
Last active April 11, 2024 08:11
Show Gist options
  • Select an option

  • Save mdpuma/429a4feecd1bc29887fed9bb3fa2af43 to your computer and use it in GitHub Desktop.

Select an option

Save mdpuma/429a4feecd1bc29887fed9bb3fa2af43 to your computer and use it in GitHub Desktop.
strace by process name
#!/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