Created
October 22, 2013 18:09
-
-
Save sennajox/7105217 to your computer and use it in GitHub Desktop.
A simple script to strace a group of processes
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 | |
if [ $# -lt 1 ];then | |
echo "usage:$0 process_name" | |
exit 1 | |
fi | |
process_name="$1" | |
function straceall() | |
{ | |
strace $(pidof "${1}" | sed 's/\([0-9]*\)/-p \1/g') | |
} | |
straceall $process_name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment