Date: Tue, 1 Sep 2015 23:32:51 +0800 From: Ben Woods <woodsb02@gmail.com> To: freebsd-dtrace@freebsd.org Subject: Dtrace in a jail Message-ID: <CAOc73CAOVcbD8KXGA5S6jkx4MqX-zRWWWh0h1PDCFeF7dCbhqQ@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
Hi everyone, I am just discovering dtrace, having heard about it a number of times but never investigated further. I like what I see so far! Is there a way to use Dtrace to debug programs being run in a jail? Attempting to run Dtrace from within the jail results in the following error: # dtrace -l dtrace: failed to initialize dtrace: DTrace device not available on system I want to debug a program I am running in a jail which is crashing a few seconds after being run. It doesn't crash in my FreeBSD 10.2 host, but does in the FreeBSD 9.3 jail. Since I want to run Dtrace on the pid provider on my program, I want my program to be executed by the Dtrace application. Something like: # dtrace -l -n 'pid$target::strcmp:entry{}' -c "./foo hello" But this results in the same error about Dtrace device not being available on the system (within the jail). If I instead run Dtrace and pass it the jexec command, I think it is tracing the jexec program, rather than my program that is then being executed within the jail. I.e. I don't think this works as expected: # dtrace -l -n 'pid$target::strcmp:entry{}' -c "jexec 1 foo hello" Any hints on how I can trace this program running in the jail? Thanks, Ben -- -- From: Benjamin Woods woodsb02@gmail.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOc73CAOVcbD8KXGA5S6jkx4MqX-zRWWWh0h1PDCFeF7dCbhqQ>