My dtrace script should be started with -p pid or  -c command.  When it starts, 
I want to print a banner showing the pid and the name of that process.

BEGIN
{
  Version = "x0.4";
  start = timestamp;
  printf("ver %s - monitoring process %s[%d] - started %Y\n", Version, 
execname, $target, walltimestamp);
  printf("\nPress Ctrl/C to end sampling\n\n");
}

But execname is always dtrace in the BEGIN{}.

Any way to get the name of the process pointed to by $target ?


--
This message posted from opensolaris.org
_______________________________________________
dtrace-discuss mailing list
[email protected]

Reply via email to