strace equivalent in Mac OS X

‹ Generating grpc stubs for Python from the command line | How do I find which AWS IAM user owns an AWS Access Key ›

Recent versions of Mac OS X have a System Integrity Protection feature which breaks the dtrace implementation installed on Mac OS X. In order to use dtrace functionality you first need to disable a portion of System Integrity Protection.

  1. Restart computer
  2. Hold down Command-R while computer boots
  3. Launch Terminal from the Utilities menu
  4. csrutil disable
  5. csrutil enable --without dtrace
  6. Restart again

Now you can use dtrace command line tools such as:

  • newproc.d (shows exec calls)
  • dtruss
  • etc
Subscribe to All Posts - Wesley Tanaka