We've demoded this many times using only the php dtrace probes and then 
simply tracing thru the mysql dispatch_command call. See 
http://blogs.sun.com/shanti/entry/debugging_amp for details.

Shanti

Martin MC Brown wrote:
> Hi Maria,
>
>   
>> We are working on Photon project which is WebStack + Dtrace in  
>> NetBeans (http://jupiter.czech.sun.com/wiki/view/Netbeans/NB70DynLangDTrace 
>> ).
>>     
>
>   
>> I tried to find a way to be able to set up correspondence between  
>> function  call from PHP and query execution in MySQL using Dtrace.
>>
>> All I have in PHP itself is function-entry and function-return probes.
>>     
>>> From MySQL I can get more info: such as connection id, host , user  
>>> name, etc.
>>>       
>> But how to set up this univocal correspondence between PHP and MYSQL?
>>     
>
> You mean how do you identify within the PHP part of the code and  
> relate those to the corresponding MySQL DTrace probes are you  
> triggering?
>
> There isn't a way I can think of doing this currently with PHP only  
> through DTrace, but in theory you could find out the information by  
> asking PHP to return the connection ID (by running the query 'select  
> connection_id()'), and then use that to work with the DTrace probes  
> you are monitoring on the MySQL side.
>
> That's a bit clumsy, but it is an issue that crossed my mind when  
> talking to Ted Leung about the project. I had some ideas before the  
> Christmas break, but didn't get a chance to follow them through. I'm  
> properly back in the office on Monday and will take a look at my notes  
> then.
>
> MC
>
> --
> Martin 'MC' Brown, mc at mcslp.com and mc.brown at sun.com
> Technical Writer, Database Group, Sun Microsystems
> Everything MCslp: http://planet.mcslp.com
>
> _______________________________________________
>
>
> webstack-discuss mailing list
> webstack-discuss at opensolaris.org
> http://mail.opensolaris.org/mailman/listinfo/webstack-discuss
>   

Reply via email to