ptrace 获取程序实时的堆栈
#!/bin/bashif test $# -ne 1; then echo "Usage: `basename $0 .sh` <process-id>" 1>&2 exit 1fiif test ! -r /proc/$1; then echo "Process $1 not found." 1&g