Re: [EMAIL PROTECTED] Re: debug apache

2006-06-21 Thread Mathieu CARBONNEAUX




i'm not sure that only apr solution because is httpd information to log... no hook only information...but can be acheve with hook of hook... and this idea can be posted to [EMAIL PROTECTED]but can be apache hook impl super macro to acheve this...and the information to log rely on apache log mecanic...and must be activable/desactivable like extended status...Regards,MAthieuFrom: Alexander Lazic [mailto:[EMAIL PROTECTED]To: dev@httpd.apache.orgSent: Wed, 21 Jun 2006 09:42:59 +0200Subject: [EMAIL PROTECTED] Re: debug apacheOn Die 20.06.2006 18:40, William A. Rowe, Jr. wrote:Jeff Trawick wrote:A past discussion of very closely related functionality, though notexactly what you asked for originally, yielded multiple interestedadmin-type folks and no developers expressing interest other thanmyself.And also Jeff's already suggested you bring the subject up at [EMAIL PROTECTED].Since Apache httpd is not the only program using apr, you might find-more- developers interested in working on this feature since it wouldhelp their program as well.Hm well, i will overthink this, i'am not very glad for this, but isounds the logical correct way.regardsAlex


Re: [EMAIL PROTECTED] Re: debug apache

2006-06-18 Thread Mathieu CARBONNEAUX




i think is very usefull to have this in production environment... to debug probleme without interupting production... in only up the log level with reload...with strace you must restart apache with strace...and for desactivating it you must restart... in some production environement is not acceptable...From: Nick Kew [mailto:[EMAIL PROTECTED]To: dev@httpd.apache.orgSent: Sat, 17 Jun 2006 14:14:25 +0200Subject: [EMAIL PROTECTED] Re: debug apacheOn Saturday 17 June 2006 09:47, Ruediger Pluem wrote: On 06/17/2006 08:57 AM, Alexander Lazic wrote:  On Sam 17.06.2006 00:54, Ruediger Pluem wrote:  From my current point of view the answer is: No, this is not possible  out of the box.  It may be possible if you modify the hook macros.   And do you think that the developer would accept a patch for apache 2.x  and would apply it? Depends on the patch :-). Please take into account that these macros are part of apr-util. So this discussion belongs to dev@apr.apache.org. Currently I have not made any thoughts how these macros could be modified in a way such that they play together with httpd logging.I think you'd be far better off with a generic trace such as strace.They're made for precisely this kind of thing.Having said that. what you could do with the hooks is to wrap themin functions that add logging.  To do that with apache logging wouldrequire the APR macros to be masked out.  Since you'd be adding overhead to everything the server does, you'll never get it acceptedinto the main source tree, unless you can at the very least make itconditionally compile.-- Nick Kew


Re: [EMAIL PROTECTED] Re: debug apache

2006-06-18 Thread Ruediger Pluem


On 06/18/2006 02:49 PM, Mathieu CARBONNEAUX wrote:
 i think is very usefull to have this in production environment... to debug 
 probleme without interupting production... in only up the log level with 
 reload...
 with strace you must restart apache with strace...and for desactivating it 
 you must restart... in some production environement is not acceptable...

Why that? You can attach strace to running processes, provided that you have 
appropriate permissions on this process. So
you might need root access for this.

Of course I admit that the strace / ltrace output is generic and a more 
specific output by logging inside the hooks
could provide better information.

Regards

Rüdiger



Re: [EMAIL PROTECTED] Re: debug apache

2006-06-18 Thread Mathieu CARBONNEAUX




ok i've forget that possibility :)but using strace directly by attaching to processus can be risky in production (like gdb!)... and with apache with 256 or 512 processuss all working can be hard to debug...in some time have lost the processus...by attempting to attach to it...and yes is very low level trace... in first aproche debug log can usefull to see where the problem are and after can be useful to use strace/ltrace to deep into the problem...debug trace can be usefull to encircle the problem...and to have trace of internal information of apache is not very freindly in using strace/ltrace... than debug log that are trace important information...i think is more simple to make corelation with debug trace...and with proprietary module like websphere and weblogic can be deficulte to make good filter in strace/ltrace to debug...and some is only to debug configuration probleme... not only bug...Regards,MathieuFrom: Ruediger Pluem [mailto:[EMAIL PROTECTED]To: dev@httpd.apache.orgSent: Sun, 18 Jun 2006 15:03:59 +0200Subject: Re: [EMAIL PROTECTED] Re: debug apacheOn 06/18/2006 02:49 PM, Mathieu CARBONNEAUX wrote: i think is very usefull to have this in production environment... to debug probleme without interupting production... in only up the log level with reload... with strace you must restart apache with strace...and for desactivating it you must restart... in some production environement is not acceptable...Why that? You can attach strace to running processes, provided that you have appropriate permissions on this process. Soyou might need root access for this.Of course I admit that the strace / ltrace output is generic and a more specific output by logging inside the hookscould provide better information.RegardsRüdiger


Re: [EMAIL PROTECTED] Re: debug apache

2006-06-18 Thread Alexander Lazic

On Son 18.06.2006 22:25, Mathieu CARBONNEAUX wrote:

ok i've forget that possibility :)

but using strace directly by attaching to processus can be risky in
production (like gdb!)... 
and with apache with 256 or 512 processuss all working can be hard to

debug...

in some time have lost the processus...by attempting to attach to it...

and yes is very low level trace... 


in first aproche debug log can usefull to see where the problem are and
after can be useful to use strace/ltrace to deep into the problem...

debug trace can be usefull to encircle the problem...

and to have trace of internal information of apache is not very
freindly in using strace/ltrace... than debug log that are trace
important information...

i think is more simple to make corelation with debug trace...

and with proprietary module like websphere and weblogic can be
deficulte to make good filter in strace/ltrace to debug...

and some is only to debug configuration probleme... not only bug...


Sorry for full quote but, full ack ;-)

It is also a help to know *when* *which* catch the request and which
data goes thru.

Regards

Alex


Re: [EMAIL PROTECTED] Re: debug apache

2006-06-18 Thread Colm MacCarthaigh
On Sun, Jun 18, 2006 at 10:25:27PM +0200, Mathieu CARBONNEAUX wrote:
 but using strace directly by attaching to processus can be risky in
 production (like gdb!)...  and with apache with 256 or 512 processuss
 all working can be hard to debug...

*shrug*, I regulary attach tracers to apache with well into the
thousands of processess/threads. Never had a problem in years of doing
that.

Anyway, as others have pointed out, this topic is off-topic here.

-- 
Colm MacCárthaighPublic Key: [EMAIL PROTECTED]


Re: [EMAIL PROTECTED] Re: debug apache

2006-06-18 Thread Matty


On Sun, 18 Jun 2006, Ruediger Pluem wrote:


On 06/18/2006 02:49 PM, Mathieu CARBONNEAUX wrote:

i think is very usefull to have this in production environment... to debug 
probleme without interupting production... in only up the log level with 
reload...
with strace you must restart apache with strace...and for desactivating it you 
must restart... in some production environement is not acceptable...


Why that? You can attach strace to running processes, provided that you have 
appropriate permissions on this process. So
you might need root access for this.

Of course I admit that the strace / ltrace output is generic and a more 
specific output by logging inside the hooks
could provide better information.


If you have a Solaris 10 host handy, you can get at this information with 
the DTrace pid provider. It allows you to enable probes dynamically on 
user-level functions, and is an invaluable tool for debugging stuff in 
production.


- Ryan
--
UNIX Administrator
http://daemons.net/~matty