Questions tagged [dtrace]

A comprehensive dynamic tracing framework originating from the Solaris Operating Environment.

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.

(Source: http://en.wikipedia.org/wiki/Dtrace)

25 questions
8
votes
3 answers

DTrace limited on Centos/Fedora

I wanted to work on a problem on a Centos 6 box. I ran dtrace and it failed. It doesn't accept -n or -l or -P or any command line options. It claims to ONLY accept -h, -G, -C, -I, -s, and -o. I figured this must be some weird Centos thing, so I went…
kainaw
  • 213
  • 2
  • 10
8
votes
2 answers

What's in my ZFS ARC and L2ARC caches?

I have a simple ZFS setup at home, four disks mirrored, 8GB ram and 120GB Intel X25-M SSD for L2ARC. I ran zpool add poolname cache cXtXdX then generated load and eagerly tracked the warming process by running zpool iostat -v mypool. A few hours…
notpeter
  • 3,505
  • 1
  • 24
  • 44
6
votes
1 answer

How to trace file access with dtrace on solaris

I would like to find out how can I trace (show) file access on Solaris. I already found the dtrace toolkit in a hope that voptrace will fit the bill. I ran it with voptrace -t /my/path if I ls or cat files under that path it produces no output. Am I…
cstamas
  • 6,607
  • 24
  • 42
5
votes
3 answers

Enable dtrace without sudo on Mac OS X?

How do I enable users to use dtrace on Mac OS X. I am trying to do the equivalent of strace on Linux, and I don't like running applications with elevated privileges. UPDATE Ok, the best I can tell. The only way to keep a nefarious application from…
Juan
  • 245
  • 3
  • 8
5
votes
1 answer

How do I find what processes (with args) are being run on OS X (Leopard) during a period of time?

I am trying to find out what processes a particular process is exec'ing on an OS X machine (including arguments). I have not used DTrace before, but thought it should be trivial. After looking around for examples, I found this, which looks exactly…
Wodin
  • 279
  • 1
  • 2
  • 10
4
votes
2 answers

Understanding iotop (DTT) output in Solaris

When running DTT iotop on a write heavy Solaris 10 server, which runs multiple zones with MySQL daemons installed, I get the following output: UID PID PPID CMD DEVICE MAJ MIN D BYTES 70 26636 1 mysqld …
shlomoid
  • 289
  • 3
  • 14
3
votes
1 answer

Tracing what blocks go through L2ARC in ZFS on Solaris using dtrace

My colleague and myself are trying to trace the reads/writes to the L2ARC in OpenZFS. We want the block offsets, IO type (read/write) and the device-ids of the requests. Note that we don't want the offset in the L2ARC device but we want the…
trauzti
  • 41
  • 2
3
votes
1 answer

Printing variable sized binary data from reads and writes with dtrace

I'm trying to print out the binary buffers of some read() and write() calls with dtrace. The problem with just using printf() and %s is that the string is terminated at null bytes. (\000) There is also tracemem() but it can only print out fixed size…
dax
  • 143
  • 4
2
votes
1 answer

looking for dtrace script to list top used nfs files

I'm currently using https://github.com/siebenmann/cks-dtrace/blob/master/nfs3-mon.d to identify most active datasets on our NFS server (Solaris 10) Unfortunately I need to dig deeper, and I would like to be able to track down most used files. Is…
Samoo
  • 21
  • 1
2
votes
0 answers

How to identify which process the received TCP traffic belongs to with DTrace on macOS

As can be seen here we have PID available on send but not receive. How to limit the probes to connections owned/initiated by a particular process? sudo dtrace -n 'tcp:::receive, tcp:::send { printf("PID = %d, arg1 == %x", pid, arg1); }' dtrace:…
BuyManAFish
  • 423
  • 1
  • 4
  • 7
2
votes
1 answer

iostat taking lot of time to return

I have a solaris 10 server with a lot of SAN disks (close to 1000 across all paths). iostat -En takes close to 5 min to return. Is there a way to figure out what is causing the delay? truss hasn't helped much.
2
votes
0 answers

Dtrace Oracle show high fsflush on solaris 10

Solaris 10 - Oracle 11G in a zone Running mpstat , i've noticed that one CPU was at 100% used every 5 seconds for 5 seconds while all other CPU were fine, in used but nicely spread. 1 0 0 0 1154 1 1599 20 105 34 0 7416 9 15…
Arnaud
  • 121
  • 2
2
votes
6 answers

Strange IP address showing up with OS X ssh

I was futzing around with DTrace on Mac OS X and found the following script that prints out information about connections being established: $ cat script.d syscall::connect:entry { printf("execname: %s\n", execname); printf("pid: %d\n",…
user50799
  • 31
  • 2
1
vote
0 answers

capturing durations (intervals) between tracepoints in perf

When using the perf tool (Linux), is there any simple and convenient way to time durations between two tracepoints? The obvious use is for syscall sys_enter and sys_exit points like sys_enter_fsync and sys_enter_fsync. But I'm also interested in…
Craig Ringer
  • 10,553
  • 9
  • 38
  • 59
1
vote
0 answers

Dtrace not displaying stacks on Mac

I'm on OSx Yosemite and i'm playing with Node.js CPU profiling. However i can't get DTrace to display the stack traces. I'm suspecting a problem with jstack/ustack. So if i do a DTrace at 97Hz: sudo dtrace -n 'profile-97/pid == 54308/{ @[jstack(80,…
Faris Zacina
  • 125
  • 7
1
2