How can we get the parent process id, when a new process is created as well as when it succesfully exits. thnaks and Regards, Arun DK. This message posted from opensolaris.org
Here is a one liner (ok almost one liner) dtrace -q -n exec-success''{printf("%s(%d) born for parent id %d\n",execname,pid,ppid)}'' -n exit''{printf("%s(%d) child of pid %d exited\n",execname, pid, ppid)}'' -Angelo Arun wrote:> How can we get the parent process id, when a new process is created as well as when it succesfully exits. > > thnaks and Regards, > Arun DK. > > > This message posted from opensolaris.org > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org >
I have dtarce_user privilege, Is there any way I cant get the pid, ppid, execname and timestamp information for a new process without dtrace_proc privilege??? I have access to syscall provider, but no access to proc provider... Thanks and Regards, Arun DK This message posted from opensolaris.org
If you have access to the syscall provider, you should be able to probe the various forms of "exec" and get what you need. Chip Arun wrote:> I have dtarce_user privilege, Is there any way I cant get the pid, ppid, execname and timestamp information for a new process without dtrace_proc privilege??? > I have access to syscall provider, but no access to proc provider... > > Thanks and Regards, > Arun DK > > > This message posted from opensolaris.org > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org >
Ya am able to. But am not able to use the ppid variable. Am able to trace pid and execname , and also timestamp. On 4/13/07, Chip Bennett <cbennett at laurustech.com> wrote:> > If you have access to the syscall provider, you should be able to probe > the various forms of "exec" and get what you need. > > Chip > > Arun wrote: > > I have dtarce_user privilege, Is there any way I cant get the pid, ppid, > execname and timestamp information for a new process without dtrace_proc > privilege??? > > I have access to syscall provider, but no access to proc provider... > > > > Thanks and Regards, > > Arun DK > > > > > > This message posted from opensolaris.org > > _______________________________________________ > > dtrace-discuss mailing list > > dtrace-discuss at opensolaris.org > > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/dtrace-discuss/attachments/20070413/42e4e614/attachment.html>