Problems with Dtrace
-
Hi,
I want to get some specific I/O data from FreeBSD. IOStat command does not return what I want, so I think about using dtrace. The problem is that I am getting this error while executing dtrace command:[2.3.1-RELEASE][admin@machine]/usr/share/dtrace: dtrace -s iotime.d dtrace: failed to initialize dtrace: DTrace device not available on system [2.3.1-RELEASE][admin@machine]/usr/share/dtrace: which dtrace /usr/sbin/dtrace [2.3.1-RELEASE][admin@machine]/usr/share/dtrace: dtrace -V dtrace: Sun D 1.12.1
It seems it is loaded in kernel, but I don't know what should I do to make it works. My FreeBSD info:
[2.3.1-RELEASE][admin@machine]/usr/share/dtrace: uname -a FreeBSD machine 10.3-RELEASE-p3 FreeBSD 10.3-RELEASE-p3 #2 1988fec(RELENG_2_3_1): Wed May 25 14:14:46 CDT 2016 root@ce23-amd64-builder:/builder/pfsense-231/tmp/obj/builder/pfsense-231/tmp/FreeBSD-src/sys/pfSense amd64
Thanks beforehand,
Mike. -
@miki_teleco said in Problems with Dtrace:
dtrace -s iotime.d
What's the contents of iotime.d ?
According to man dtrace on my Mac the "-s" option is a script file.
−s script Compile the specified D program source file. If the −e option is present, the program is com- piled but instrumentation is not enabled. If the −l option is present, the program is compiled and the set of probes matched by it is listed, but instrumentation is not enabled. If none of −e, −l, −G, or −A are present, the instrumentation specified by the D program is enabled and tracing begins.
-
First, that version is quite old and you should upgrade ASAP.
Second, it looks like we do not include the
dtrace.ko
kernel module which would allowdtrace
to function. You may be able to copy/boot/kernel/dtrace.ko
from a FreeBSD system running an identical version to pfSense as a test. -
I can't check atm but I do remember vaguely that dtrace also requires a kernel option or a src.conf option or both to work