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
5
votes
2 answers

Determine what's blocking a process on OSX using command line tools?

The title says it most, really. On Linux it would be easy with strace and possibly lsof or /proc, and it used to be easy on OSX until truss was removed from OSX Leopard, along with underlying system calls (afaik). The obvious approach is to tackle…
Yaniv Aknin
  • 4,103
  • 3
  • 23
  • 29
5
votes
4 answers

dTrace scripts and tools

I've recently began using dTrace and have noticed just how awesome it is. Its the perfect tool for profiling without placing the burden on programmers to set up hundreds of probes in their applications. I've found some nice one liner and sample…
Robert Gould
  • 68,773
  • 61
  • 187
  • 272
5
votes
1 answer

DTrace END probe never fires

I have a mid-2009 MacBook Pro and a new 2012 MacBook Pro and I am in the process of learning DTrace ( a pretty amazing tool). When I calculate aggregates on the new 2012 MBP, the aggregates don't print out. sudo dtrace -n 'syscall:::entry {…
SargeATM
  • 2,483
  • 14
  • 24
4
votes
1 answer

dtracing a short lived application

I have written a DTrace script which measures the time spent inside a function in my C program. The program itself runs, outputs some data and then exits. The problem is that it finishes way to fast for me to get the process id and start DTrace. At…
bing
  • 443
  • 6
  • 11
4
votes
3 answers

Tracing all functions calls and printing out their parameters (userspace)

I want to see what functions are called in my user-space C99 program and in what order. Also, which parameters are given. Can I do this with DTrace? E.g. for program int g(int a, int b) { puts("I'm g"); } int f(int a, int b) {…
osgx
  • 90,338
  • 53
  • 357
  • 513
4
votes
1 answer

DTraceAsmProfiler of JMH fails with '[sudo: a password is required' on Mac

I'm running a benchmark from IDEA on MacOS with DTraceAsmProfiler and it fails with this error: Exception in thread "main" org.openjdk.jmh.runner.ProfilersFailedException: Profilers failed to initialize, exiting. at…
Sergey Tsypanov
  • 3,265
  • 3
  • 8
  • 34
4
votes
1 answer

Can I ask dtrace what probes are enabled?

If it matters, I am using Mac OS X, but I believe this would apply across OSs. If the answer is different per OS, I would be interested in learning about that as well. Let's say that I open a terminal window, enable a few probes, and start…
ericg
  • 8,413
  • 9
  • 43
  • 77
4
votes
0 answers

How to see read and write calls (including hidden characters like \n) with dtrace

I am new to dtrace, having previously had the luxury of Linux strace tracking everything I need by default. How to get tracking read and write calls from a running C program to work on dtrace? I've seen the answer here: dtrace: doesn't catch any…
Cheetaiean
  • 901
  • 1
  • 12
  • 26
4
votes
0 answers

Cannot find module './build/Debug/DTraceProviderBindings'

I know this question has been asked lots of times like here and here. I have tried all suggestions on these links and more.. I tried installing the latest bunyan sudo npm install bunyan@1.8.12 --unsafe-perm=true --allow-root I installed and rebuilt…
Yogi
  • 1,035
  • 2
  • 13
  • 39
4
votes
1 answer

macOS & dyld: Symbol not found: _usdt_create_provider

In short, I'm unable to install @pact-foundation/pact-node on my development computer and from what I gather it seems to be loosely related to being on macOS 10.14. When I say loosely, this does not affect my other non-development computer running…
Andrew Gould
  • 376
  • 1
  • 9
4
votes
1 answer

What does "dynamic variable drops with non-empty dirty list" mean in dtrace?

I am tracing a process on OSX 10.13 using dtruss trying to understand why it freezes up while doing a socket connect. However when it reaches the connect the tracer freezes and then displays 783 dynamic variable drops with non-empty dirty list on…
horseyguy
  • 29,455
  • 20
  • 103
  • 145
4
votes
1 answer

Can't Enable DTrace probes via jinfo on Mac OS X

Running Java 6 on Snow Leopard. You're supposed to be able to turn on ExtendedDTraceProbes on a running Java process with the jinfo utility. Even at my command prompt jinfo talks about about enabling general flags: Usage: jinfo [option]
Mark Bennett
  • 1,446
  • 2
  • 19
  • 37
4
votes
4 answers

Monitor Cocoa apps for execution of external utilities (e.g., ffmpeg) on Mac OS X?

There are Mac GUI applications which provide a front-end to more geeky commandline tools (often included as a part of the application package). I would like to look at what is happening under the hood of such GUIs. How to "attach" to an application,…
CaptSolo
  • 1,771
  • 1
  • 16
  • 17
4
votes
3 answers

How can write logs to a file in btrace?

I have following btrace script. I would like to record entry and exit of functions in a specific class. .. package com.sun.btrace.samples; import com.sun.btrace.BTraceUtils; import com.sun.btrace.Profiler; import…
Jayan
  • 18,003
  • 15
  • 89
  • 143
4
votes
3 answers

Is there a dtrace equivalent for .Net

Is there a .Net equivalent or analogue for dtrace?
user47589