Hello Martin, thanks for your reply!
> >> 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. What I mean is to get somehow information using PHP probes about query id, connection id or any info that would help me to understand that queries which is executing now in MySQL is a result of function call in my PHP code. I not have access to PHP developer's code, all I have is Dtrace and opensolaris and application, so I cannot run a query in PHP:( > > 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. Will wait for your notes.. Thanks, Maria > > 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 >