在opensolaris上进行dtrace libc探测

时间:2012-06-27 13:32:34

标签: c dtrace opensolaris

当我试图做跟踪getenv功能时,我得到了:

-bash-4.0#/usr/sbin/dtrace -n 'pid$target:libc:getenv:entry' -p 2017
dtrace: invalid probe specifier pid$target:libc:getenv:entry: probe description 
pid2017:libc:getenv:entry does not match any probes

-bash-4.0# /usr/sbin/dtrace -n 'pid$target:libc::entry' -p 2017
dtrace: invalid probe specifier pid$target:libc::entry: probe description pid2017:libc::entry does not match any probes

来自myapp:

libz.so.1 =>     /lib/libz.so.1
libm.so.2 =>     /lib/libm.so.2
libdl.so.1 =>    /lib/libdl.so.1
libpthread.so.1 =>   /lib/libpthread.so.1
libbz2.so.1 =>   /usr/lib/libbz2.so.1
libsocket.so.1 =>    /lib/libsocket.so.1
libnsl.so.1 =>   /lib/libnsl.so.1
libsendfile.so.1 =>  /lib/libsendfile.so.1
libxml2.so.2 =>  /lib/libxml2.so.2
libc.so.1 =>     /lib/libc.so.1
libmp.so.2 =>    /lib/libmp.so.2
libmd.so.1 =>    /lib/libmd.so.1
libscf.so.1 =>   /lib/libscf.so.1
libuutil.so.1 =>     /lib/libuutil.so.1
libgen.so.1 =>   /lib/libgen.so.1
libsmbios.so.1 =>    /usr/lib/libsmbios.so.1

为什么会这样?是否有任何解决方案可以使libc函数能够通过dtrace进行跟踪?

祝你好运

0 个答案:

没有答案