On Fri, Oct 24, 2014 at 12:26 AM, Michael Schuster via dtrace-discuss <
dtrace-discuss@lists.dtrace.org> wrote:

> Hi,
>
> The last time I tried something like that, you had to start a seperate
> Dtrace script for every process you wanted to trace - I don't think the pid
> provider allows for tracing of more than one process at a time (from within
> a single script).
>
> I don't have an example handy, but if you search for "pid provider" "fork"
> and "system" or similar, you should get along.
>
> HTH
> Michael
>


Sounds like this was understood, but for the benefit of future readers: the
pid provider can trace many processes from a single script.  The problem is
around creating the probes in the new process.  The pid provider probes are
only created when asked for by pid (i.e., not with "pid*"), and there's no
way for the first script to specify more probes at runtime.  But all the
second script needs to do is create those probes, after which the first
script (if using "pid*") will trace them.  It's often easier to have that
second script just enable the probes you want and immediately exit; it
doesn't actually have to rerun the first script.

-- Dave



-------------------------------------------
dtrace-discuss
Archives: https://www.listbox.com/member/archive/184261/=now
RSS Feed: https://www.listbox.com/member/archive/rss/184261/25769126-e243886f
Modify Your Subscription: 
https://www.listbox.com/member/?member_id=25769126&id_secret=25769126-8d47a7b2
Powered by Listbox: http://www.listbox.com

Reply via email to