wkz / ply

Light-weight Dynamic Tracer for Linux
https://wkz.github.io/ply
GNU General Public License v2.0
402 stars 156 forks source link

Add ptysnoop.sh, a script that calls ptysnoop.ply. #5

Closed AlbertVeli closed 6 years ago

AlbertVeli commented 7 years ago

Make ptysnoop.ply a bit more useful by processing the data using a bourne shell script.

brendangregg commented 7 years ago

red flags:

There's numerous lower priority style issues as well.

AlbertVeli commented 7 years ago

Yeah, it is better to remove sudo and let the script fail if the user doesn't have the required privileges. But you do want to save the output in a file because the user will probably want to add more awk lines to filter out data from more processes.

If you have a better way to send on SIGINT from the shellscript to ply without killing the shellscript, please change the trap line, I just used trap to get something that works, it is not optimal.

wkz commented 6 years ago

I agree with @brendangregg on most comments. In addition the syntax has changed in v2, so I will close this. Please feel free to submit a similar script for v2!