Hey James,

> >Zone ID may not be a good example of what you're talking about -- for
> >pr_zoneid, I think you should act as a Solaris machine would if it had
> >no installed zones.  (That is, always return 0 for pr_zoneid to  
> >denote the
> >global zone.)  There may be more convincing examples where there is no
> >mapping in the OS X world, but I find it hard to accept that you  
> >shouldn't
> >just refuse to translate such members and let the compile fail.
> 
>       Yes, I just remembered a much better example:
> 
>       curpsinfo->pr_psargs

I knew that there had to be a good example out there... ;)

>       The data needed to properly populate this field does not exist in
> OS X. Should DTTk's newproc.d fail to compile, or should it produce
> the marginally useful:
> 
> ghopper:/# newproc.d
> dtrace: script '/usr/bin/newproc.d' matched 2 probes
> CPU     ID                    FUNCTION:NAME
>   0  18481        __mac_execve:exec-success   sh
>   0  18481        __mac_execve:exec-success   hostname
>   0  18481        __mac_execve:exec-success   bash
>   0  18481        __mac_execve:exec-success   id
>   1  18481        __mac_execve:exec-success   login
>   1  18481        __mac_execve:exec-success   cat
>   3  18481        __mac_execve:exec-success   tcsh
> 
>       I'm certain there are other equally annoying areas of impedance
> mismatch, its just been a long time since I had this discussion and  
> don't
> remember them all.

I think with cases like these, we should all just collectively hash out here
(that is, dtrace-discuss) what we expect to see.  I think you could make an
argument either way in this case -- certainly, a script could rely on
pr_psargs to actually be the args (of course), but a script could also be
using this as a fuller execname.  Given that we in Solaris only record the
first 80 characters of this (that is, given that it isn't strictly speaking
complete anyway), I think my bias would be that you do the best you can with
pr_psargs -- and if that's only the execname, so be it.  Others' thoughts?

        - Bryan

--------------------------------------------------------------------------
Bryan Cantrill, Sun Microsystems FishWorks.       http://blogs.sun.com/bmc
_______________________________________________
dtrace-discuss mailing list
[email protected]

Reply via email to