Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:30151 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 66824 invoked by uid 1010); 13 Jun 2007 11:17:24 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 66809 invoked from network); 13 Jun 2007 11:17:24 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Jun 2007 11:17:24 -0000 Authentication-Results: pb1.pair.com smtp.mail=stefan.priebsch@e-novative.de; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=stefan.priebsch@e-novative.de; sender-id=unknown Received-SPF: error (pb1.pair.com: domain e-novative.de from 85.214.26.34 cause and error) X-PHP-List-Original-Sender: stefan.priebsch@e-novative.de X-Host-Fingerprint: 85.214.26.34 eno001.e-novative.de Linux 2.5 (sometimes 2.4) (4) Received: from [85.214.26.34] ([85.214.26.34:2092] helo=eno001.e-novative.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8D/18-26103-242DF664 for ; Wed, 13 Jun 2007 07:17:23 -0400 Received: from [127.0.0.1] (p57AE4C72.dip.t-dialin.net [87.174.76.114]) by eno001.e-novative.de (Postfix) with ESMTP id 7D720844325; Wed, 13 Jun 2007 13:34:19 +0200 (CEST) Message-ID: <466FD223.3010109@e-novative.de> Date: Wed, 13 Jun 2007 13:16:51 +0200 Organization: e-novative GmbH User-Agent: Thunderbird 2.0.0.0 (Windows/20070326) MIME-Version: 1.0 To: Markus Fischer CC: Alexey Zakhlestin , internals@lists.php.net References: <466F9623.3050102@fischer.name> <466FC781.3010601@fischer.name> In-Reply-To: <466FC781.3010601@fischer.name> X-Enigmail-Version: 0.95.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] [PHP4] Logging native PHP function calls From: stefan.priebsch@e-novative.de (Stefan Priebsch) Hi Markus, > The thing is: I need to know specific information of the mysql operations: > > 1) host,user,pass of connects/pconnects (and which type of connect), > count of connects this very request already had > 2) sql statement on query, execution time, count of how many statements > this very request already had You can configure xdebug to create a trace log showing the parameters passed to the called functions. This could be a basis for what you need. > Additional to that I need information like: > * server ip (multiple servers) > * remote ip > * http host (zillions of vhosts) > * uri > * user agent string A quick and maybe dirty idea that comes to my mind is to add a function call in your application that has these parameter (easy to gather from $_SERVER etc.) so they show up in the trace logs. Then it's a matter of processing a gazillion lines of trace log to get out the information you need, but at least it should be there. > in the past, profiling things, but I don't see this possible in > production environment running and getting out the the information I need. Trace logging in a production environment *absolutely* kills your performance, so if you have to dedicated test environment, hmmm. But would you actually create a patched PHP and deploy this in your production environment. Then I personally would rather opt for running an xdebug-based trace Sunday morning at 4 am. Kind regards, Stefan -- >e-novative> - We make IT work for you. e-novative GmbH - HR: Amtsgericht München HRB 139407 Sitz: Wolfratshausen - GF: Dipl. Inform. Stefan Priebsch http://www.e-novative.de