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

DTrace script never reports write syscalls

I'm using the following DTrace script to follow the read and write syscalls of bash: syscall::write:entry, syscall::read:entry /execname == "bash"/ { } It successfully matches 2 probes, but no matter what I type, I only see the read calls. No…
cfischer
  • 24,452
  • 37
  • 131
  • 214
0
votes
1 answer

How to get a string from memory into DTrace script

I have a char* in my DTrace script that I know points to a zero-terminated string. How to access this string? Is there some function like copyin() that handles zero-terminated strings?
Tadeusz A. Kadłubowski
  • 8,047
  • 1
  • 30
  • 37
0
votes
1 answer

DTrace not printing aggregations

I'm trying to execute the following very simple use of DTrace from the terminal in OS X 10.8. sudo dtrace -n 'syscall:::entry { @counts["System Call Entry"] = count(); }' When I hit ^C I expect the aggregate @counts to be printed out, but instead I…
James Bedford
  • 28,702
  • 8
  • 57
  • 64
0
votes
1 answer

Error deploying node js restify application to heroku

I'm having an issue deploying a restify application to Heroku. npm ERR! dtrace-provider@0.0.9 install: `node-waf clean ; node-waf configure build` npm ERR! `sh "-c" "node-waf clean ; node-waf configure build"` failed with 1 npm ERR! npm ERR! Failed…
Andy Williams
  • 105
  • 1
  • 4
0
votes
1 answer

Access dtrace probe from C program

There is runocc.d dtrace script which prints run queue for each processor. I need to get run queue length in my C++ program on Mac OS X. Is it possible to somehow embed dtrace constructs into C++ program?
DimaA6_ABC
  • 578
  • 4
  • 15
0
votes
1 answer

Profile C code with dtrace

I was looking through stackoverflow for the best profiling technique. I have a bunch of processes running 24/7, written in C and using Oracle 10g. I have discovered several tools I want to try: oprofile, strace, systemtap and dtrace. I want to…
hasnobrains
  • 109
  • 6
0
votes
2 answers

DTrace - How do I correctly retrieve initial parameters in the return probe

I'm trying to read the initial arguments that was passed into the function in my return probe. Unlike the entry probe, the argument variables(arg0,arg1,...) in the return probe do not contain the initial parameters, and I'm not sure how I would be…
JosephH
  • 8,465
  • 4
  • 34
  • 62
0
votes
0 answers

dtrace libc probes on opensolaris

when im trying to do trace getenv function i got: -bash-4.0#/usr/sbin/dtrace -n 'pid$target:libc:getenv:entry' -p 2017 dtrace: invalid probe specifier pid$target:libc:getenv:entry: probe description pid2017:libc:getenv:entry does not match any…
JosiP
  • 2,619
  • 5
  • 29
  • 33
0
votes
1 answer

dtrace - aggregation of variables passing to funcion from diffrent places where function was called

Sorry for compilcated title, but here is a dtrace output of my script, which I think will help explain what im talking about: 16384 1 38048 1 38050 1 38051 …
JosiP
  • 2,619
  • 5
  • 29
  • 33
0
votes
2 answers

Is it possible to conceal a OS X app from DTrace?

I am developing an OS X application that I would like to conceal from inspection by DTrace. I'm aware of the P_LNOATTACH flag, but everything I've read tells me that there are ways around it. Is it possible?
ericg
  • 8,413
  • 9
  • 43
  • 77
-4
votes
2 answers

Following a pointer to a pointer

sqlite3_open takes a pointer to a pointer. Id like to trace the address of the second pointer. E.g: p1(p2(obj)) https://www.sqlite.org/c3ref/open.html int sqlite3_open( const char *filename, /* Database filename (UTF-8) */ sqlite3 **ppDb …
zino
  • 1,222
  • 2
  • 17
  • 47
1 2 3
17
18