I'd like to modify the executable name for the process that is running Dtrace.  
I have a Dtrace script running in the background all the time, and would like 
to wipeout the 'dtrace -s ...' and replace it with a single string.

I've tried the following, which of course doesn't work.  Can this even be done?

#!/usr/sbin/dtrace -s

#pragma D option destructive
#pragma D option quiet

dtrace:::BEGIN
{
        self->parent = execname;
        self->mypid = curpsinfo->pr_pid;
        printf("Exec_name = %s   PID = %d\n", execname, curpsinfo->pr_pid);

        copyoutstr("daemon", curpsinfo->pr_fname, 6);

        self->parent = execname;
        self->mypid = curpsinfo->pr_pid;
        printf("Exec_name = %s   PID = %d\n", execname, curpsinfo->pr_pid);
}
-- 
This message posted from opensolaris.org
_______________________________________________
dtrace-discuss mailing list
[email protected]

Reply via email to