Re: log format different and CAPTURE_LEN settings

2012-08-12 Thread Aleksandar Lazic

Hi Willy,

On 10-08-2012 04:56, Willy Tarreau wrote:

Hi Aleks,

On Fri, Aug 10, 2012 at 12:56:18AM +0200, Aleksandar Lazic wrote:

Hi will,

On 09-08-2012 19:21, Willy Tarreau wrote:
On Thu, Aug 09, 2012 at 06:57:16PM +0200, Aleksandar Lazic wrote:

[snip]

after the first minute the log is now as defined ;-)

Thanks guys, patch applied.

how about the CAPTURE_LEN setting.

###
After rebuild I still get the warning that the I can only capture 63
bytes.
I have change include/common/defaults.h to

###
// reserved buffer space for header capture
#ifndef CAPTURE_LEN
#define CAPTURE_LEN 64
#endif
###

and rebuild it.
###


It's unclear to me what is causing you an issue with this one, 
because
it's only used for cookie captures now (you know, the request and 
response

cookie specified in capture cookie). Also, you shouldn't set it too
high because this memory is allocated for each session.


I think it's a classical Bug.

In the Makefile is a comment like

###
 Memory usage tuning
# If small memory footprint is required, you can reduce the buffer 
size. There
# are 2 buffers per concurrent session, so 16 kB buffers will eat 32 MB 
memory
# with 1000 concurrent sessions. Putting it slightly lower than a page 
size
# will prevent the additional parameters to go beyond a page. 8030 
bytes is
# exactly 5.5 TCP segments of 1460 bytes and is generally good. Useful 
tuning

# macros include :
#SYSTEM_MAXCONN, BUFSIZE, MAXREWRITE, REQURI_LEN, CAPTURE_LEN.
# Example: SMALL_OPTS = -DBUFSIZE=8030 -DMAXREWRITE=1030 
-DSYSTEM_MAXCONN=1024

SMALL_OPTS =
###

If you set -DCAPTURE_LEN=xxx nothing will happen, as far as I have 
understand.


Best regards
Aleks



Re: log format different and CAPTURE_LEN settings

2012-08-09 Thread William Lallemand
On Thu, Aug 09, 2012 at 03:16:07PM +0200, Aleksandar Lazic wrote:
 Hi,


Hello,

 [...]
 
 As you can see I have not 'option logasap' but get the '+'-sign?!
  
 Please can anybody help me to find the error, thanks.
 
 Best regards
 Aleks
 

It looks like a bug with the option unique-id-format.

Can you try this patch ?


-- 
William Lallemand
From 7d40e9f6d3f8f1c5ce09e264226a1e5e369d70a0 Mon Sep 17 00:00:00 2001
From: William Lallemand wlallem...@exceliance.fr
Date: Thu, 9 Aug 2012 16:41:35 +0200
Subject: [PATCH] BUG/MINOR: to_log erased with unique-id-format

curproxy-to_log was reset to LW_INIT when using unique-id-format,
so logs looked like option logasap
---
 src/log.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/log.c b/src/log.c
index 2a3cd16..b1f532a 100644
--- a/src/log.c
+++ b/src/log.c
@@ -309,7 +309,7 @@ void parse_logformat_string(char *str, struct proxy *curproxy, struct list *list
 	struct logformat_node *tmplf, *back;
 	int options = 0;
 
-	curproxy-to_log = LW_INIT;
+	curproxy-to_log |= LW_INIT;
 
 	/* flush the list first. */
 	list_for_each_entry_safe(tmplf, back, list_format, list) {
-- 
1.7.9.5



Re: log format different and CAPTURE_LEN settings

2012-08-09 Thread Aleksandar Lazic

Hi William,

On 09-08-2012 16:52, William Lallemand wrote:

On Thu, Aug 09, 2012 at 03:16:07PM +0200, Aleksandar Lazic wrote:

Hi,



Hello,


[...]

As you can see I have not 'option logasap' but get the '+'-sign?!

Please can anybody help me to find the error, thanks.

Best regards
Aleks



It looks like a bug with the option unique-id-format.

Can you try this patch ?


after the first minute the log is now as defined ;-)

Thanks.

Cheers
Aleks



Re: log format different and CAPTURE_LEN settings

2012-08-09 Thread Willy Tarreau
On Thu, Aug 09, 2012 at 06:57:16PM +0200, Aleksandar Lazic wrote:
 Hi William,
 
 On 09-08-2012 16:52, William Lallemand wrote:
 On Thu, Aug 09, 2012 at 03:16:07PM +0200, Aleksandar Lazic wrote:
 Hi,
 
 
 Hello,
 
 [...]
 
 As you can see I have not 'option logasap' but get the '+'-sign?!
 
 Please can anybody help me to find the error, thanks.
 
 Best regards
 Aleks
 
 
 It looks like a bug with the option unique-id-format.
 
 Can you try this patch ?
 
 after the first minute the log is now as defined ;-)

Thanks guys, patch applied.

Willy




Re: log format different and CAPTURE_LEN settings

2012-08-09 Thread Aleksandar Lazic

Hi will,

On 09-08-2012 19:21, Willy Tarreau wrote:

On Thu, Aug 09, 2012 at 06:57:16PM +0200, Aleksandar Lazic wrote:


[snip]


after the first minute the log is now as defined ;-)


Thanks guys, patch applied.


how about the CAPTURE_LEN setting.

###
After rebuild I still get the warning that the I can only capture 63 
bytes.

I have change include/common/defaults.h to

###
// reserved buffer space for header capture
#ifndef CAPTURE_LEN
#define CAPTURE_LEN 64
#endif
###

and rebuild it.
###

Best regards
Aleks



Re: log format different and CAPTURE_LEN settings

2012-08-09 Thread Willy Tarreau
Hi Aleks,

On Fri, Aug 10, 2012 at 12:56:18AM +0200, Aleksandar Lazic wrote:
 Hi will,
 
 On 09-08-2012 19:21, Willy Tarreau wrote:
 On Thu, Aug 09, 2012 at 06:57:16PM +0200, Aleksandar Lazic wrote:
 
 [snip]
 
 after the first minute the log is now as defined ;-)
 
 Thanks guys, patch applied.
 
 how about the CAPTURE_LEN setting.
 
 ###
 After rebuild I still get the warning that the I can only capture 63 
 bytes.
 I have change include/common/defaults.h to
 
 ###
 // reserved buffer space for header capture
 #ifndef CAPTURE_LEN
 #define CAPTURE_LEN 64
 #endif
 ###
 
 and rebuild it.
 ###

It's unclear to me what is causing you an issue with this one, because
it's only used for cookie captures now (you know, the request and response
cookie specified in capture cookie). Also, you shouldn't set it too
high because this memory is allocated for each session.

Regards,
Willy