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

intr.c:791:2: error: implicit declaration of function 'store_gdt'

while I "make all" on CentOS 7.0, kernel 3.10.0-123.el7.x86_64, some errors as following: build-3.10.0-123.el7.x86_64/driver/intr.c: In function 'gdt_seq_show': build-3.10.0-123.el7.x86_64/driver/intr.c:791:2: error: implicit declaration of…
0
votes
0 answers

how to build app with dtrace userland static probes with cmake

I have a server application on freebsd written in c++ and I want to add dtrace usdt in it. In order to be built properly, USDT probes require dtrace -G command to be run on all object files that contain probes. Than it generates object file that…
Pavel Davydov
  • 3,379
  • 3
  • 28
  • 41
0
votes
1 answer

dtrace impact, monitoring processes (OS X)?

I'm trying to find a efficient way to programmatically monitor, from user mode, what processes are started on my computer (OS X Yosemite). Since NSWorkspaceDidLaunchApplicationNotification only works for apps and kqueues (NOTE_EXIT) only allows one…
patrick
  • 380
  • 2
  • 14
0
votes
1 answer

Why can't we use DTrace in iOS

Can we DTrace in iOS world? I tried using DTrace in my mac. Is there any way or APIs to achieve DTrace things on iOS world?
user2533604
  • 655
  • 1
  • 11
  • 28
0
votes
1 answer

track every system and external library call on an OS X app

I want to examine every system and external library call of a given application, together with the data structures that are passed around. (The application in question is some kind of packaged software based on OpenSSL and around OS X keychain, and…
cnst
  • 25,870
  • 6
  • 90
  • 122
0
votes
1 answer

Using dtrace in objective C

I use dtrace with parameters below to calculate a specific process network traffic usage : sudo dtrace -n 'syscall::recvfrom:return { @[pid] = sum(arg0); }' How could I use dtrace in objective C? I used NSTask to launch dtrace with above parameters…
0
votes
2 answers

getaddrinfo fails to resolve address in hosts file when using mocha

Node.js 0.10.26 OS X 10.9.2 (also on ubuntu vagrant box) In two different modules on my system, when I run tests using mocha, I get this error: { [Error: getaddrinfo ENOTFOUND] code: 'ENOTFOUND', errno: 'ENOTFOUND', syscall: 'getaddrinfo' } Which…
joshuten
  • 1
  • 2
0
votes
2 answers

dtrace function time tracing without called functions that are also traced

I would like to have a record of how much cpu time each function is using. The caveat here is that I only want to record the time used by the function itself, not the cpu time used by functions that are called by the function and which are also…
wich
  • 16,709
  • 6
  • 47
  • 72
0
votes
1 answer

Is accessing different key/value pairs in associative array simultaneously multi-cpu safe?

From Brendan's post: DTrace variable types, I know accessing associative array simultaneously isn't multi-cpu safe.Is accessing different key/value pairs in associative array simultaneously multi-cpu safe? Or it is also not multi-cpu safe.
Nan Xiao
  • 16,671
  • 18
  • 103
  • 164
0
votes
2 answers

how to use Dtrace to check malloc on Solaris 10?

I meet a troublesome bug about memory usage, so I want to use Dtrace to check malloc and free on Solaris 10. I use the following command dtrace -l | grep malloc The output is: 7000 fbt unix …
Nan Xiao
  • 16,671
  • 18
  • 103
  • 164
0
votes
0 answers

Adding Dtrace on Java

How can I add a DTrace probe inside a java code so that I can fire it and profile it on OS X? I tried com.sun.tracing framework which works well in Solaris, but not supported in OSX.
Chamila Wijayarathna
  • 1,815
  • 5
  • 30
  • 54
0
votes
1 answer

FreeBSD User Space DTrace and dumping function arguments for user space

Can we dump function arguments for user space functions just like for functions in kernel space? Can FBT provider dump arguments for user space functions if we do dtrace -l -f -v? I was DTrace'ing "top" utility, (the "top" utility has both the…
Shrikanth R K
  • 85
  • 1
  • 1
  • 9
0
votes
2 answers

In Mac ,exec Dtrace, but console has nothing to display

I am a newer to dtrace when i exec the code sudo dtrace -n 'syscall::read:entry /execname != "dtrace"/ { @reads[execname, fds[arg0].fi_pathname] = count(); } then I exec cat filename in another console. but console has nothing to…
fuyou001
  • 1,594
  • 4
  • 16
  • 27
0
votes
1 answer

dtrace execute action only when the function returns to a specific module

I'm tracking some libc functions with dtrace. I want to make a predicate that only executes the action when the function returns to an adress into a specific module given in the parameters. copyin(uregs[R_ESP],1) on the return probe should give…
Vision
  • 57
  • 5
0
votes
1 answer

Tutorial for creating custom Instrument in XCode

I want to create my own custom Instrument in XCode. Unfortunately, I can't seem to find any Tutorial; the only help I found is the manual, which is in my opinion hardly self-contained. Does anyone know of a tutorial? Actually, I would already be…
HdM
  • 169
  • 1
  • 11
1 2 3
17
18