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
3
votes
1 answer

Local Variables in Dtrace

How do I access variables local to a function using dtrace? For example, in the following snippet I would like to know the value of variable x using dtrace. void foo(int a){ int x=some_fun(a); }
g3nair
  • 137
  • 5
3
votes
1 answer

How to monitor file open and file read events in OSX

I have researched on File System Events and Kernel Queues to identify how to monitor events. Unfortunately, these allow notifications only upon modifications, renames or delete events (events that update the state). I need to get a callback upon…
3
votes
1 answer

Dtrace print parent process command

I'd like to have a script that for each new running process, prints its starting command, as well as its parent process. i'm using the following probes : proc::posix_spawn:exec-success,proc::__mac_execve:exec-success From within the script body,…
Zohar81
  • 4,554
  • 5
  • 29
  • 82
3
votes
0 answers

Script length limitation on DTrace Java API?

I have a Java program that uses the Java DTrace API (Java DTrace API) to build and execute a dtrace script on Solaris Sparc 10. The script uses the pid provider to place probes on the entry points of all the functions in a set of libraries, like…
user2048466
  • 185
  • 3
  • 13
3
votes
3 answers

Which (OS X) dtrace probe fires when a page is faulted in from disk?

I'm writing up a document about page faulting and am trying to get some concrete numbers to work with, so I wrote up a simple program that reads 12*1024*1024 bytes of data. Easy: int main() { FILE*in = fopen("data.bin", "rb"); int i; int…
Sniggerfardimungus
  • 11,583
  • 10
  • 52
  • 97
3
votes
1 answer

What is the state of system level tracing in production Linux systems (RH/CentOS and Debian/Ubuntu)?

I'm helping develop an internal cloud infrastructure (OpenStack) to provide our departments with a fully on-premises alternative to AWS/Rackspace/SoftLayer/etc. My boss just relayed a question to me from some internal customer who is asking us to…
Jim Dennis
  • 17,054
  • 13
  • 68
  • 116
3
votes
0 answers

Log all messages sent to a stripped class with DTrace

It's normally easy to log all messages sent to a class with DTrace, for example by using trace_msg_send.sh script from here: #!/usr/sbin/dtrace -s #pragma D option quiet unsigned long long indention; int indentation_amount; BEGIN { …
Tyilo
  • 28,998
  • 40
  • 113
  • 198
3
votes
1 answer

No function names when using DTrace on Node.js program

I am trying to use DTrace for CPU profiling of a Node.js program according to this guide on an OmniOS VM in VirtualBox, which I set up following these steps exactly (except for using node 0.10.26). Unfortunately, DTrace does not give me…
d0gb3r7
  • 818
  • 8
  • 19
3
votes
1 answer

how do you build DTrace on Mac OS X?

I'm trying to build the dtrace target in the Xcode project using the advice here: http://osx86.boeaja.info/2009/10/building-xnu-kernel-on-snow-leopard/ But I get: libproc.m:24:49: error: CoreSymbolication/CoreSymbolication.h: No such file or…
JanePhanie
  • 579
  • 1
  • 6
  • 10
3
votes
1 answer

How do I see full strings in dtruss output?

I am using dtruss on MacOS X 10.8.5 in an attempt to see the conversation between a running application and an SSL server it talks to. Unlike strace on Linux, I'm not seeing full strings of data in the output, like I would expect to find as the…
ruief
  • 436
  • 6
  • 9
3
votes
2 answers

Can we profile per core with dtrace?

Is dtrace usable in multithreaded applications, and can I profile individual cores? If so, would someone point me to an example?
Dervin Thunk
  • 19,515
  • 28
  • 127
  • 217
3
votes
1 answer

High Write I/O "Pulsing" with dtrace errors

We are experiencing "pulsing" writes to disk (from 1 writes out/sec pulsing up to 142+ writes out/sec) around every 10 seconds. See this example…
Ted Wilmont
  • 463
  • 2
  • 9
  • 20
3
votes
1 answer

Dtrace Invalid Probe Specifier error

I installed Dtrace in Ubuntu 11.04. I was able to run: dtrace -n 'syscall:::' and: sudo dtrace -l | grep terminal commands properly and got the results. But when I tried to run: dtrace -n 'proc:::exec-success { trace(curpsinfo->pr_psargs);…
Chamila Wijayarathna
  • 1,815
  • 5
  • 30
  • 54
3
votes
1 answer

How to use dtrace to determine the maximum memory usage of a process

The following dtrace script will give the sum of all allocations a process has performed: pid$target::malloc:entry { @ = sum(arg0); } Now, I'm rather interested in the maximum total allocated memory usage during the life-span of the process (about…
digitalvision
  • 2,552
  • 19
  • 23
3
votes
0 answers

How to monitor any input and output of a process

There is the following process: NetAuthSysAgent which calls/create repeatedly the process mount_nfs of a non-existing NFS share. I have a hunch that these calls are triggered by another process which gives the instruction. Therefore I would like to…
Huygens
  • 617
  • 1
  • 13
  • 26