Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Problems with Dtrace

    Scheduled Pinned Locked Moved Problems Installing or Upgrading pfSense Software
    4 Posts 4 Posters 997 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      miki_teleco
      last edited by

      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.

      1 Reply Last reply Reply Quote 0
      • NogBadTheBadN
        NogBadTheBad
        last edited by NogBadTheBad

        @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.
        
        

        Andy

        1 x Netgate SG-4860 - 3 x Linksys LGS308P - 1 x Aruba InstantOn AP22

        1 Reply Last reply Reply Quote 0
        • jimpJ
          jimp Rebel Alliance Developer Netgate
          last edited by

          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 allow dtrace 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.

          Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

          Need help fast? Netgate Global Support!

          Do not Chat/PM for help!

          1 Reply Last reply Reply Quote 0
          • K
            kpa
            last edited by

            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

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.