Skip to content

Instantly share code, notes, and snippets.

@githubutilities
Last active August 29, 2015 14:20
Show Gist options
  • Select an option

  • Save githubutilities/2cf560c970c268fa1e44 to your computer and use it in GitHub Desktop.

Select an option

Save githubutilities/2cf560c970c268fa1e44 to your computer and use it in GitHub Desktop.
Trace a program in Mac

Trace a program in Mac

1. Using dtrace

Try run apropos dtrace for its usage.

  • io--iosnoop,hfsslower.d
  • exec--execsnoop,opensnoop
  • all--dtruss

Reference

2. Snooping file changes while program running

  • Use opensnoop which is a dtrace script. Try to run sudo opensnoop(you can redirect the output) and open your targeted app.
  • Use fs_usage to monitor file system changes.(Too mush logs)

Reference

Reference

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment