Re: DTrace probe problem

2008-06-05 Thread radj
> http://www.cocoadev.com/index.pl?NSTaskArguments > Oh. So that's how it's supposed to be done. Use "which dtrace" in the shell to find out the path to the dtrace > executable. > Found it. It's "/usr/sbin/dtrace". Finally made DTrace run off from the driver but unfortunately, dtrace requires m

Re: DTrace probe problem

2008-06-05 Thread Michael Ash
On Fri, Jun 6, 2008 at 10:28 AM, radj <[EMAIL PROTECTED]> wrote: > Hello again. > > I have another problem now and it is how to set off DTrace from within the > application. This is my code: > > // SNIPPET START > > int pid = [[NSProcessInfo processInfo] processIdentifier]; > > NSArray *arguments =

Re: DTrace probe problem

2008-06-05 Thread radj
Hello again. I have another problem now and it is how to set off DTrace from within the application. This is my code: // SNIPPET START int pid = [[NSProcessInfo processInfo] processIdentifier]; NSArray *arguments = [NSArray arrayWithObjects: @"-w", // permit destructive actions

Re: DTrace probe problem

2008-06-04 Thread radj
I tried the raise() in D script. My driver got the signal but it kinda malfunctioned, it got stuck somehow although it still can accept any signal. Weird. My small experience can't tell me anything. So I googled up some more D trace commands and found system(). I tried this instead: pid$1::dummyC

Re: DTrace probe problem

2008-06-03 Thread radj
> > I'm not sure I understand what you're asking. Are you looking for the > dtrace:::BEGIN probe? If you put an action on that, it's executed when > DTrace starts tracing. > This is exactly what I'm looking for. Thanks again! :) ___ Cocoa-dev mailing

Re: DTrace probe problem

2008-06-03 Thread Ken Thomases
On Jun 3, 2008, at 9:48 PM, radj wrote: It can. There's an action, raise(int signal), that may be used in a DTrace clause. This action is considered "destructive", so you have to pass the -w option to the "dtrace" command. This is good! But since D script are made out of probes, is it

Re: DTrace probe problem

2008-06-03 Thread radj
> It can. There's an action, raise(int signal), that may be used in a DTrace > clause. This action is considered "destructive", so you have to pass the -w > option to the "dtrace" command. > This is good! But since D script are made out of probes, is it possible to use raise() when dtrace comman

Re: DTrace probe problem

2008-06-03 Thread radj
> It can. There's an action, raise(int signal), that may be used in a DTrace > clause. This action is considered "destructive", so you have to pass the -w > option to the "dtrace" command. > This is good! But since D script are made out of probes, is it possible to use raise() when dtrace comman

Re: DTrace probe problem

2008-06-03 Thread Ken Thomases
On Jun 1, 2008, at 9:31 PM, Bill Bumgarner wrote: On Jun 1, 2008, at 7:19 PM, radj wrote: I can try that. Sounds like a good idea. Make the "waiting for the signal" the first thing the driver will do. but how do you send a signal from within DTrace to a specific process? I have no idea if

Solved (still open to suggestions): DTrace probe problem

2008-06-02 Thread radj
Finally got it to poll. I had to study signals and signal handling within the driver. lol. I've tried it and atleast it helps me delay the actual "initialization" of the driver while I run the D script. Your quick responses were really helpful. Thanks alot, Bill! DTrace rocks! radj On Mon, Jun

Re: DTrace probe problem

2008-06-01 Thread Bill Bumgarner
On Jun 1, 2008, at 7:19 PM, radj wrote: I can try that. Sounds like a good idea. Make the "waiting for the signal" the first thing the driver will do. but how do you send a signal from within DTrace to a specific process? I have no idea if dtrace can send a signal. I would send a kill - U

Re: DTrace probe problem

2008-06-01 Thread radj
> Personally, I would start by trying to use a signal handler. See > x-man-page://signal (the signal man page). Specifically, I would write a > handler for SIGUSR1 or SIGUSR2 as those exist explicitly to offer user > specific behaviors. Take a command line option or read an environment > varia