Questions tagged [dtrace]

DTrace is a comprehensive dynamic tracing framework for the Solaris Operating Environment.

15 questions
13
votes
1 answer

Error on enabled probe: syscall::open_nocancel:entry): invalid user access in action #2 at DIF

I've the following one-liner to show files opened by process: sudo dtrace -n 'syscall::open*:entry { printf("%s %s",execname,copyinstr(arg0)); }' however I've plenty of repeated errors such as: dtrace: error on enabled probe ID 4 (ID 946:…
kenorb
  • 20,250
  • 14
  • 140
  • 164
7
votes
2 answers

Measure disk IO latencies of a running process

I'm trying to measure the disk IO latencies of a running process to make a histogram. I could do this with DTrace in operating systems that provide it (e.g. as in this Joyent paper), but my application is running in Linux. My first thought was to…
ajduff574
  • 223
  • 3
  • 7
6
votes
1 answer

Finding the source of CoW page faults on OS X

I'm trying to find the source of CoW page faults in some C code on OS X. I would like to use the vminfo DTrace provider, but vminfo isn't available on OS X. On Linux, I can use SystemTap to print a stack trace on a CoW fault. Is there a way to do…
6
votes
1 answer

DTrace to trap any chmod applied to certain files

Underneath the Mac OS X directory /audit I have certain files which users can access and chmod to their liking. I need to audit any chmod done on any files by recording the time, user and file being chmod, especially the latter. I can dtrace -n…
Robottinosino
  • 5,271
  • 12
  • 39
  • 51
4
votes
1 answer

Are there awk versions that provide syntax for computing aggregations?

From time to time I find myself writing awk scripts that compute some simple statistics. For example computing a histogram, the average of a value, the standard deviation or even the variance ... Doing that again and again with helper…
maxschlepzig
  • 56,316
  • 50
  • 205
  • 279
3
votes
0 answers

Unix OSX invisible process, how do I identify further information?

Using execsnoop -v, I note a dtrace error for two processes. ID3 (ID 630) and ID2 (ID 360). ~ 03:59 am ∆:ps -p 260 PID TTY TIME CMD 260 ?? 0:02.36 /usr/libexec/UserEventAgent (Aqua) ~ 03:59 am ∆:ps -p 630 PID TTY TIME…
Cam_Aust
  • 131
  • 5
3
votes
2 answers

Java process, swap (/proc Solaris10) memory highly utilized

How can I analyze high swap memory utilization of Solaris 10 for Java processes?
Vishal
  • 131
  • 1
2
votes
1 answer

How to convert an int to a string in DTrace?

I'd like to be able to concatenate a string and an int using strjoin(), e.g., strjoin("ada", args[1]->unit_number); but in order to do that I have to make sure that the int is first converted to a string. I'm running DTrace on FreeBSD…
Mateusz Piotrowski
  • 4,623
  • 5
  • 36
  • 70
2
votes
1 answer

How to trace and print out all files that are accessed / used when bash starts?

I'm having a problem and need to print out to the console all files that are being access each time bash is executed on macOS. Is there a relatively easy method for doing this? Perhaps dtrace might make this fairly straight forward?
ylluminate
  • 591
  • 7
  • 16
2
votes
0 answers

Tools to debug slow NFS on OSX

I have 2 mac pros connected to a Nexenta NAS. They have a fast network connection, the same ping time, and the routes to the server are the same (both are plugged into the same switch). One computer has very slow reads and writes on the NAS when…
Dan
  • 9,372
  • 5
  • 25
  • 39
2
votes
0 answers

osx dtruss doesn't report opening ~/.bash_profile while tracing bash?

Let's assume I have this line at the start of my ~/.bash_profile: echo "*** THIS IS ~/.bash_profile RUNNING ***" On a Linux machine (Ubuntu 14.04), I can inspect which files bash loads at startup with strace, so I do this: strace -f bash --login…
sdaau
  • 6,668
  • 12
  • 57
  • 69
2
votes
1 answer

How to measure changes to the filesystem done by a certain application?

I am using a command line application which creates a great amount of intermediate artifacts to the file system and then at some point deletes them. On environments where storage space is constrained this can pose a problem. I'd like to know if…
carlossless
  • 243
  • 1
  • 2
  • 6
1
vote
1 answer

Why does timestamp increase after a call to chill() but vtimestamp and walltimestamp do not?

I'd like to understand why calling chill() in a DTrace action block increases the timestamp variable, but not vtimestamp and walltimestamp. Here's an example showing timestamp increasing after a call to chill(): # dtrace -w -c true -n…
Mateusz Piotrowski
  • 4,623
  • 5
  • 36
  • 70
1
vote
1 answer

Modifying standard DTT scripts to use -c instead of $1

There are lots of great dtrace programs out there and some of them require a PID to be passed to them, in order for them to trace that PID. Inside the dtrace scripts that argument is stored in $1. Is it possible to just simply replace $1 with…
0
votes
1 answer

Uprobes Status on the present linux kernel

I know uprobes was introduced on kernel 3.5 has it survived or is it dropped, is it still available on kernel 4.x
SAS
  • 31
  • 7