Monday Oct 12, 2009

Interested in finding out what to do with DTrace inside PHP ?

I am proposing a talk in Zend Unconference'09 on the benefits of using DTrace within PHP. If you are attending ZendCon'09 or interested in hearing more on dynamic tracing within PHP, please vote for this talk by visiting here.  Thanks for your support. Here are some of my previous posts on this subject

 Hope to see you in ZendUnCon'09

Wednesday Aug 26, 2009

Using DTrace to analyze your web site

During recent OSCON'09 conference, Jack Adams met with me to discuss on the ways to troubleshoot the problems with his web site. Check out this video.

A Jack Adams conversation with Sriram Natarajan, at OSCON 2009.

References: 

Sunday Apr 05, 2009

New DTrace probes within PHP in OpenSolaris 2009.06

Wez Furlong wrote a PECL extension to provide a DTrace probe within PHP more than 4 years back. As part of Web Stack project within OpenSolaris, this extension has been made available within Solaris 10 as well as in OpenSolaris distribution in the last year or so. 

Now, with the upcoming release of OpenSolaris 2009.06 (more specifically with Indiana build 110 or above), PHP runtime has been updated to the latest 5.2.9 release. See my earlier blog on this topic. Besides PHP version update, David Soria Parra - contributor within open source projects like Mercurial, PHP Web Stack has made  this (experimental) patch available to provide the following additional DTrace probes within PHP for this release :

\* compile-file-entry / compile-file-return -> This proble wil fire whenever Zend engine need to compile a given PHP script and can provide information as to which PHP script is currently going through PHP compilation process along with start and end line number. Note: PHP engine within OpenSolaris includes APC PECL extension - which caches the compiled PHP script when requested again and hence this probe will not fire in that circumstance.

\* function-entry / function-return -> This probe will fire whenever Zend engine is executing a PHP function and can provide information as to which PHP function along with its file name and line number is currently being executed by PHP Zend engine.

\* execute-entry / execute-return -> This probe will fire while executing PHP script and can provide information as to which file, line number is currently being executed by PHP Zend engine.

\* exception-thrown / exception-catched -> This probe gets fired whenever PHP runtime encounters an exception and can the classname when an exception is thrown.

\* error -> This probe gets fired whenever PHP runtime throws an error and can provide information like the error message, file name in which the error happened and the corresponding line number.

\* request-startup / request-shutdown  -> This probe gets fired at the start and end of processing a given PHP script and can provide the filename of the script , request URI . This should allow a given DTrace script to track the start and end of PHP script. 

Note:  this patch is under active development and will be further refined to add additional DTrace probes as well as to address any user reported issues. 

Considering that DTrace support is available for Mac as well as FreeBSD, I am sure, PHP community will be interested into looking into this patch as well.

Okay, so now, if you are interested in trying out OpenSolaris 2009.06 (preview build) and the updated AMP stack, check out my earlier  blog for detailed steps on this.

Here is a sample DTrace script that you can use as a reference point.

About

Sharing what little I know

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today