Questions tagged [dtrace]

DTrace is a comprehensive dynamic tracing framework for the Solaris Operating Environment, Mac OS X 10.5+ and FreeBSD.

DTrace is a comprehensive dynamic tracing framework for the Solaris Operating Environment; it provides a powerful infrastructure to permit administrators, developers, and service personnel to concisely answer arbitrary questions about the behavior of the operating system and user programs.

DTrace can be used to get a global overview of a running system, such as the amount of memory, CPU time, file-system and network resources used by the active processes. It can also provide much more fine-grained information, such as a log of the arguments with which a specific function is being called, or a list of the processes accessing a specific file.

Resources

266 questions
143
votes
1 answer

Equivalent of strace -feopen < command > on mac os X

This is useful for debugging (hence programming related). On linux, we can use the command strace -feopen python myfile.py to figure out which python modules and shared objects are loaded. Is there an equivalent one-liner on macOS X?
Setjmp
  • 27,279
  • 27
  • 74
  • 92
107
votes
9 answers

Diagnosing high CPU usage on Docker for Mac

How do I diagnose the cause of Docker on MacOS, specifically com.docker.hyperkit using 100% of CPU? Docker stats Docker stats shows all the running containers have low CPU, memory, net IO and block IO. iosnoop iosnoop shows that…
Joe
  • 3,370
  • 4
  • 33
  • 56
81
votes
6 answers

Is there a workaround for: "dtrace cannot control executables signed with restricted entitlements"?

It looks like in OS X 10.11 El Capitan, dtruss and dtrace can no longer do what they're meant to do. This is the error I get when I try to run sudo dtruss curl ...: dtrace: failed to execute curl: dtrace cannot control executables signed with…
Flimm
  • 136,138
  • 45
  • 251
  • 267
64
votes
9 answers

How can I get dtrace to run the traced command with non-root priviledges?

OS X lacks linux's strace, but it has dtrace which is supposed to be so much better. However, I miss the ability to do simple tracing on individual commands. For example, on linux I can write strace -f gcc hello.c to caputre all system calls, which…
Gyom
  • 3,773
  • 5
  • 29
  • 38
41
votes
6 answers

What's an alternative for DTrace on Linux?

From what I can see, a DTrace implementation on Linux is held up by licensing and politics. What are the alternatives currently?
JanePhanie
  • 579
  • 1
  • 6
  • 10
40
votes
2 answers

iosnoop, iotop, opensnoop, execsnoop, opensnoop, dtruss and other dtrace based commands don't work on osx El capitan, macOS Sierra

While running iosnoop command on OSX 10.11.1 I get an error with the following text: dtrace: invalid probe specifier /* * Command line arguments */ inline int OPT_dump = 0; inline int OPT_device = 0; inline int OPT_delta = 0; inline…
Ara Yeressian
  • 3,746
  • 3
  • 26
  • 36
33
votes
1 answer

DTrace on Ubuntu, how-to?

I'd like to use DTrace on Ubuntu. https://github.com/dtrace4linux/linux There is one for Linux above, the github. I wonder if dtrace for linux is just same with dtrace for other OS(Solaris, FreeBSD, OSX). I'd like to find a tutorial for using…
Jumogehn
  • 1,102
  • 3
  • 11
  • 29
24
votes
5 answers

How to measure mutex contention?

I have some threaded code using PThreads on Linux that, I suspect, is suffering from excessive lock contention. What tools are available for me to measure this? Solaris has DTrace and plockstat. Is there something similar on Linux? (I know about a…
Luís Oliveira
  • 2,964
  • 1
  • 20
  • 26
22
votes
3 answers

ltrace equivalent for osx?

osx has the really powerful dtrace/ktrace/dtruss tools - however i'm not willing to invest the time necessary to learn dealing with them right now. what's the easiest way to get the equivalent functionality of linux ltrace (and possibly strace) on…
Enki
  • 221
  • 1
  • 2
  • 3
21
votes
2 answers

Mac OSX: Using dtruss?

I'm trying to dtruss a process in Mac OSX Catalina, however dtrace is reporting an error. $ sudo dtruss whoami dtrace: system integrity protection is on, some features will not be available dtrace: failed to execute whoami:…
user9405153
21
votes
3 answers

Profiling Node.JS (code) execution time in Linux

I am looking for a method to do precise Node.JS profiling of script execution times on Linux. There are interesting projects like the NodeTime.com Performance Profiler, but this profiles the timing of I/O httprequests and such, not execution time of…
Redsandro
  • 11,060
  • 13
  • 76
  • 106
20
votes
3 answers

Interpret dtruss output like “psynch_cvwait(...) = -1 Err#316”

dtruss appears to be a useful tool to analyze the (mis-)behaviour of applications on OS X. The closes thing I found to my beloved strace on linux. But interpreting its output requires an understanding of the syscalls it refers to, and sometimes the…
MvG
  • 57,380
  • 22
  • 148
  • 276
14
votes
8 answers

How to trace a program from its very beginning without running it as root

I'm writing a tool that calls through to DTrace to trace the program that the user specifies. If my tool uses dtrace -c to run the program as a subprocess of DTrace, not only can I not pass any arguments to the program, but the program runs with all…
Peter Hosey
  • 95,783
  • 15
  • 211
  • 370
13
votes
6 answers

Pointers to learn how to use DTrace

When I asked for tools to profile Rails apps, someone pointed at DTrace. Since I work on MacOSX stations and deploy on OpenSolaris, it is a valid way to go. But I have little knowledge of DTrace. Besides the usual suspect, Sun DTrace page and the…
lsdr
  • 1,245
  • 1
  • 15
  • 28
13
votes
1 answer

How do I disable Java stack frame optimizations, or profile stacks using system profilers?

System profilers, like DTrace and Linux perf_events, are able to profile stack traces from the JVM. Now, symbols aside (that's another problem), both DTrace and perf_events collect many stacks that are only 1 frame. These are partial, incomplete…
Brendan Gregg
  • 965
  • 8
  • 10
1
2 3
17 18