b395 FreeBSD's DTrace needs specific settings? - The FreeBSD Forums
The FreeBSD Forums  

Go Back   The FreeBSD Forums > Development > FreeBSD Development

FreeBSD Development Kernel development, writing drivers, coding, and questions regarding FreeBSD internals.

Reply
 
Thread Tools Display Modes
  #1  
Old April 5th, 2012, 16:39
martintangsl martintangsl is offline
Junior Member
 
Join Date: Apr 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default FreeBSD's DTrace needs specific settings?

I'm learning and evaluating DTrace.

DTrace on FreeBSD seems to be a bit different from other platforms.

# dtrace -n 'syscall:::'
gives the message
Code:
dtrace: failed to initialize dtrace: DTrace device not available on system
Other platforms tested show a list of system calls.

Does DTrace need some specific settings on FreeBSD? My platform is FreeBSD 9.0 x86 running inside VirtualBox.
Reply With Quote
  #2  
Old April 5th, 2012, 17:01
SirDice's Avatar
SirDice SirDice is online now
Moderator
 
Join Date: Nov 2008
Location: Rotterdam, Netherlands
Posts: 13,699
Thanks: 47
Thanked 2,022 Times in 1,861 Posts
Default

Dtrace needs to be specifically enabled.

Handbook: 26.3 Enabling DTrace Support
__________________
Senior UNIX Engineer at Unix Support Nederland
Experience is something you don't get until just after you need it.
Reply With Quote
  #3  
Old April 7th, 2012, 06:37
martintangsl martintangsl is offline
Junior Member
 
Join Date: Apr 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks. Still some problems in using DTrace. Some probes does not work and running them several times would cause the virtual machine restarts.
sudo dtrace -n 'pid$target:a.out:ntry' -c ./a.out gives
Code:
dtrace: description 'pid$target:a.out::entry' matched 5 probes
dtrace: buffer size lowered to 6m
dtrace: pid 1150 has exited
I followed the wiki page here, created and wrote /etc/make.conf, compiled and installed the world. Still restarting.
Reply With Quote
  #4  
Old August 12th, 2012, 15:23
tthtlc tthtlc is offline
Junior Member
 
Join Date: May 2011
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

After FreeBSD9 installation, I got the same error too. Then I did "kldload dtrace" and "kldload dtraceall" and surprisingly, no error, which means that default it is not loaded. These kernel modules are residing in /boot/kernel - so go there and make sure it exists. If yes, then just kldload the module, and it should work.
Reply With Quote
Reply

Tags
dtrace

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
FTP Access for Specific User to Specific Directory domanb Web & Network Services 1 May 5th, 2011 18:14
[Solved] FreeBSD + Linux shared zpool settings Beeblebrox General 2 December 12th, 2010 08:45
DTrace in 7.1-p2 alp General 6 December 7th, 2010 13:07
[Solved] FreeBSD-specific buzzing noise. strings System Hardware 2 August 29th, 2010 11:59
cant save settings settings alex9025 General 4 December 1st, 2008 07:21


All times are GMT +1. The time now is 13:38.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
The mark FreeBSD is a registered trademark of The FreeBSD Foundation and is used by The FreeBSD Project with the permission of The FreeBSD Foundation.
Web protection and acceleration provided by CloudFlare
0