Questions tagged [dtrace]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
0 answers
18 views

How to debug a freezing dtrace on Ventura

I'm trying to use dtrace on a very new system: Ventura 13.2.1, MBP M2. Any attempt to run it ends up with the terminal and most of macos system gui freezing. (beachballing, I can switch the apps, but ...
  • 141
0 votes
0 answers
12 views

Is there a way to trace syscalls without disabling SIP?

I'm trying to optimize a local Python script and I'd like to see syscalls etc. dtruss seems like a great tool for that, but I get a series of errors when I run it that I think are related to SIP being ...
  • 6,441
5 votes
1 answer
236 views

A standard method to trace and log which software creates and accesses files on my system?

Is there a way to continually trace/log which software is creating and accessing files on my system? I assume these log files would grow very large unless trimmed. I see a bunch of dot files and no ...
  • 861
2 votes
0 answers
70 views

Why can't I run dtruss against this executable?

Darwin ME 19.6.0 Darwin Kernel Version 19.6.0: Tue Jun 22 19:49:55 PDT 2021; root:xnu-6153.141.35~1/RELEASE_X86_64 x86_64 Im trying to run an executable with dtruss. Even when removing code signing I ...
  • 131
2 votes
0 answers
199 views

Old bug: The application "Preview.app" is not open anymore

Since many versions of MacOS, I got different applications leaving a ghost version only visible at the Finder and Dock level but not at the basic Unix level. Here is the usual error message the Finder ...
  • 11.6k
1 vote
2 answers
105 views

How to cause manual "Announce the time:" checkbox changes to take effect

Edit: my original question, below, assumes there is a secret copy (a cache) of the system preferences settings. I have since learned that is not the case. However, my problem still needed a solution,...
  • 133
7 votes
2 answers
4k views

How to find which shared library is missing?

When I use ldd on Linux it tells me right away if something is missing, i.e. ldd -d some_lib.so libexample.so => not found libex.2.so => not found libm.so.6 => /lib/libm.so.6 (...
  • 183
1 vote
1 answer
138 views

How to execute an equivalent function of Xcode's Instruments > "File Activity" in shell?

I need to be able to show and capture the same output that Xcode.app/Contents/Applications/Instruments.app captures while in Terminal.app (in the shell). Is there a dtrace function / script, or some ...
  • 5,022
1 vote
1 answer
334 views

dtruss not working on Mojave

Running dtruss on 10.14.4 (Xcode 10.2) gives me this: tmp$ sudo dtruss ./ls dtrace: failed to enable ' #pragma D option quiet ': Failed to enable probe CSCppMachTaskContainer pid_for_task failed ...
  • 141
1 vote
0 answers
98 views

How to isolate systemic hangs in macOS 10.14?

I'm struggling with some kind of a hang that is very elusive. Apple can't seem to isolate the problem after many sysdiagnose submissions. It predominantly happens in instances of Google Chrome, Finder ...
  • 5,022
1 vote
1 answer
72 views

`dtrace_deadman_timeout` modification for dtrace scripts such as dtruss?

When running some intensive debugging that needs to run on the order of about 5 minutes, I'm finding that dtrace's deadman switch is being triggered regularly and cannot get to the error that is being ...
  • 5,022
7 votes
1 answer
4k views

dtrace/dtruss command to see what files a command tries to open?

Is there a dtrace one liner that will run a command, and tell me all the files it tries to open? The Linux strace equivalent of what I'm trying to do is strace -e trace=file -f cat /etc/passwd > /...
  • 285
4 votes
0 answers
1k views

iotop on High Sierra

I seem to have issues with iotop on High Sierra, googling it I find no useful information. The output is garbled and almost unusable. I have SIP disabled for dtrace (I know "I'm not suppose to do ...
5 votes
2 answers
6k views

How to find which shared library is loaded by a process on OSX?

I am trying to compile and use a shared C library as a python module and I am observing that depending on the DYLD_LIBRARY_PATH my code works or it crashes with a cryptic error message. Jul 24 02:44:...
5 votes
0 answers
804 views

Why is SIP keeping me from using `dtruss` on an executable outside its protected folders?

I'm trying to run the following command on OS X El Capitan (10.11.4): sudo dtruss /usr/local/bin/mix phoenix.server It fails, saying: dtrace: failed to execute /usr/local/bin/mix: dtrace cannot ...
  • 1,169
1 vote
2 answers
648 views

Dtrace script newproc.d stopped working after upgrade, because of missing proc:::exec-success probe

I'm trying to run: $ sudo /usr/bin/newproc.d which suppose to snoop new processes as they are executed, but it fails with the error: dtrace: failed to compile script /usr/bin/newproc.d: line 22: ...
  • 12.2k
3 votes
1 answer
2k views

Trace file reads and writes on os x?

I have something running that is syncing two directories. I want to turn it off but cannot figure out what it is. El Capitan, if that matters. Can someone provide a command or tool that will reliably ...
2 votes
1 answer
1k views

dtrace errors when running opensnoop in El Capitan [duplicate]

In order to diagnose slow terminal interaction (which turned out to be an unrelated problem), I ran sudo opensnoop and saw output like this: dtrace errors I assume this has to do with SIP in El ...
28 votes
3 answers
13k views

Now that El Capitan is "rootless", is there any way to get dtrace working?

I've found dtrace to be an invaluable tool for debugging and troubleshooting all sorts of issues, not to mention the two dozen dtrace toolkit scripts shipped by Apple as part of El Capitan. On El Cap ...
  • 3,445
2 votes
2 answers
1k views

dtrace replacement for fseventer?

I think many of us have been disappointed with the effective demise of fseventer. What is a good dtrace shell based alternative to fseventer that will display all full paths of files being accessed ...
  • 5,022
1 vote
0 answers
638 views

How to trace and debug IPC (interprocess communication)

I have a problem with my distnoted process that I'm trying to debug. In order to investigate it, I'd like to trace the interprocess communication that's happening on my OS X 10.9.3 (Mavericks) system....