forked from dtrace4linux/linux
-
Notifications
You must be signed in to change notification settings - Fork 1
/
README
159 lines (113 loc) · 4.64 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
Linux port of DTrace
February 2012
Paul D. Fox
http://www.twitter.com/crispeditor
http://www.crisp.demon.co.uk
Blog - latest news and stuff about the dtrace project:
http://crtags.blogspot.com/
http://www.crisp.demon.co.uk/blog/
Download dtrace tarballs for linux here:
https://github.com/dtrace4linux/linux
ftp://crisp.dynalias.com/pub/release/website/dtrace
My public dropbox, likely out of date:
http://dl.dropbox.com/u/45405441/dtrace-latest.tar.gz
Introduction
============
This is a port of the Sun DTrace user and kernel code to Linux.
No linux kernel code is touched in this build, but what is
produced is a dynamically loadable kernel module. This avoids
licensing issues and allows people to load and update dtrace as
they desire.
The goal of this project is to make available DTrace for the
Linux platforms. By making it available for everyone, they can
use it to optimise their systems and tools, and in return, I
get to benefit from their work.
PayPal
======
If you want to make a donation for this software, feel free to
do so. Nothing is asked of you - it is genuinely free software,
but it can help guage interest and appreciation if you do.
You can pay by visiting the link below and clicking on
"Donate", or use this reference for donations:
Licensing
=========
The original DTrace is licensed under Sun's (now Oracle) CDDL
license. Original copyrights are left intact. No GPL code is
incorporated into the release, to avoid legal conflicts.
Any mistakes or omissions in copyright attribution will be my
mistake, so please let me know if there are such cases.
The linux kernel was referred to in order to engineer the glue
for dtrace behavior, and there is no intention of making this
code fall under anything other than CDDL. (If Oracle migrate to
a GPL friendly license, then this port of dtrace can follow). I
do not own the license or assert any rights on the licensing
other than that expected of me as a consumer/supplier.
I have no political affiliation or preference for a licensing
scheme, simply that Sun/Oracle has gracefully donated to the
community a large body of work.
I reserve the right to change the licensing model for my own
code at a later date, when and if someone puts forward a case
as to the correct license agreement.
If the code is useful to you - great. Spread it around and get
people to use, debug and enhance it.
GIT Repository
==============
https://github.com/dtrace4linux/dtrace
(Theres an older and orphaned github repository under
Peter McCormicks name, please ignore this as it has not been
updated in a long while and is no longer active).
Installation
============
Very simple:
$ make all
$ make install
$ make load (need to be root or have sudo access)
More details
============
Building is done in a build/ directory. The makefiles allow
you to compile for alternate kernel releases in the same tree,
which is useful for cross-version checking.
The result is:
build/dtrace User land executable
build/drti.o Object file for USDT apps
build/driver/dtracedrv.ko Kernel loadable module
Installing will copy them to Solaris compliant locations:
/usr/sbin/dtrace
/usr/lib/dtrace/64/drti.o
You dont need to 'install' to run dtrace, but you will need
to load the driver.
Kernel versioning
=================
dtrace relies on a kernel module and so a binary is needed
per system you deploy to, or kernel version.
dtrace is sensitive to the kernel - and attempts to cater for that,
but very old, or very new kernels may not have been validated.
Please feed back if that is the case.
No Linux Kernel source modifications required
=============================================
This is important for a number of reasons -- unless dtrace
is accepted into the kernel, it has to live with changes to header
files and data structures. Also, from a licensing perspective it
is not valid for dtrace to touch your sources. It is also much
easier to not even require kernel sources - so long as
a kernel build environment is available.
INSTALLATION
============
Run 'make' with no arguments to see the current options.
make all
to compile the drivers and user space commands. Check the file
Packages, for hints on what you need (not much, but libelf, kernel
source, flex/yacc -- bison will do).
make install
Copy dtrace binary and driver to correct install location.
make load
To load the drivers, and then you can play with cmd/dtrace/dtrace.
make unl
to unload the drivers.
make test
To run the userland cmd/dtrace regression test
For AS4/Centos
==============
yum install elfutils-libelf-devel