[dtrace-discuss] Anonymous dtrace

Jonathan Adams
Tue, 19 Jul 2005 16:30:50 -0000

On Tue, Jul 19, 2005 at 07:29:50PM +0530, Manoj Joseph
wrote:
> Hi,
>
> We need to dtrace a boot module. We tried anonymous dtrace.
> But we find that dtrace probes are getting enabled after the event that
> we want dtraced.
>
> Is there a way of forcing dtrace to load earlier??
> Does anyone know of a way out?
>
> This is on an AMD/snv_16 machine.
>
> This is the console log.
> -------
> SunOS Release 5.11 Version snv_16 64-bit
> Copyright 1983-2005 Sun Microsystems, Inc.  All rights reserved.
> Use is subject to license terms.
> NOTICE: Can''t open /etc/cluster/nodeid    <---- We want to
dtrace this
>
> NOTICE: BOOTING IN NON CLUSTER MODE
>
> NOTICE: enabling probe 0 (fbt:cl_bootstrap:clconf_init:entry)
> NOTICE: enabling probe 1 (fbt:::)
> NOTICE: enabling probe 2 (fbt:cl_bootstrap:clconf_init:return)
> NOTICE: enabling probe 3 (dtrace:::ERROR)
> -------

It looks like the activity you want to trace is happening before
forceload:s are processed, which is when dtrace''s anonymous tracing
becomes active.  kmdb(1) is your only hope for this kind of tracing at the
moment.

However, I think the explanation here is pretty simple; on x86 machines,
before / is "mounted" in the kernel, only files in the boot archive
are
available.  /etc/cluster/nodeid is not, by default, in it, so any attempt to
open it will fail.

Try adding the files needed to
	/boot/solaris/filelist.ramdisk

run
	# bootadm update-archive

and reboot the system.

Cheers,
- jonathan

--
Jonathan Adams, Solaris Kernel Development