[dtrace-discuss] I do not understand. Please advise.

Rayson Ho rayrayson at gmail.com
Wed Jul 4 08:46:30 PDT 2007


system(3) takes 1 argument only:

  int system(const char *command);

In your case, you will need to use sprintf(3) to generate the needed string.

Rayson



On 7/4/07, Paul van den Bogaard <Paul.VandenBogaard at sun.com> wrote:
> I have the following script:
>
> proc:::exec-success
> /execname == "java"/
> {
>    stop();
>    printf("Restart with prun %d\n", pid);
> }
>
> This one stops any java process that I start (and others :-). Runs as expected. I "prun pid" and that stopped java process continues.
>
> Now I add a single line directly after the printf:
>
>    system("./scanit.d -p %d", pid);
>
> scanit.d uses the hotspot probes to dive into this java process just started.  If scanit.d is started from the command line it works as I expect it. However when started through the above mentioned "system(...)" way, an error is raised and the stopped java process is started again!
>
> The message is:
>
> dtrace: failed to compile script ./scanit.d: line 17: args[ ] may not be referenced because probe description hotspot4051:::method-entry matches an unstable set of probes
>
> What am I missing? (and yes I did start the java process with -XX:+ExtendedDTraceProbes)
>
> Thanks
> Paul
> --
> This message posted from opensolaris.org
> _______________________________________________
> dtrace-discuss mailing list
> dtrace-discuss at opensolaris.org
>


More information about the dtrace-discuss mailing list