You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Ahmed Musa <do...@gmx.at> on 2008/02/28 14:20:55 UTC

JkRequestLogFormat Options

Hallo,

I am logging the mod_jk Output through the Apache access_log - as written in the reference found under
http://tomcat.apache.org/connectors-doc/reference/apache.html

Because i want to get clearness about what exactly is going on in our system i use the following LogFormat:

LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" \"%{Cookie}i\" \"%{Set-Cookie}o\" %{pid}P %{tid}P%T 
%{JK_WORKER_NAME}n %{JK_REQUEST_DURATON}n %{JK_WORKER_ROUTE}n %{JK_LB_FIRST_NAME}n %{JK_LB_FIRST_BUSY}n %{JK_LB_FIRST_VALUE}n
%{JK_LB_FIRST_ACCESSED}n %{JK_LB_FIRST_READ}n %{JK_LB_FIRST_TRANSFERRED}n %{JK_LB_FIRST_ERRORS}n %{JK_LB_FIRST_ACTIVATION}n
%{JK_LB_FIRST_STATE}n %{JK_LB_LAST_NAME}n" mod_jk_log

...everthing works fine except the Options responsible for the Request Duration.

Mostly neither %T nor %{JK_REQUEST_DURATON}n have a Value (%T mostly is 0 an the other Parameter is "-").
At some Requests i found the %T has a value like for example 2 or 3.. - and JK_REQUEST DURATION has "-"
or %T is 0 and JK_REQUEST_DURATION has an value like 2 or 3 ...

First - why are there not values at each request ?
Second -i think both Options are measuring the same Value - why they are not the same ?
Third - why they are not showing seconds.microseconds as written in the reference but only (I think so) rounded seconds.

We use mod_jk 1.2.26

Thanks for help
Best 
ahmed
-- 
Psst! Geheimtipp: Online Games kostenlos spielen bei den GMX Free Games! 
http://games.entertainment.web.de/de/entertainment/games/free

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: JkRequestLogFormat Options

Posted by Ahmed Musa <do...@gmx.at>.
Hallo Fred,

AHHHH - you're right - the missing Letter was the fault -> i checked this command so many times -but don't see this. 
Thanks a lot
best
ahmed
-------- Original-Nachricht --------
> Datum: Thu, 28 Feb 2008 12:23:25 -0800 (PST)
> Von: fredk2 <fr...@gmail.com>
> An: users@tomcat.apache.org
> Betreff: Re: JkRequestLogFormat Options

> 
> Hi,
> 
> btw, in your log format line you have %{JK_REQUEST_DURATON}n instead of
> %{JK_REQUEST_DURATION}n see the missing I.
> 
> I am using 1.2.25 and i get times alike 0.0275 when using Apache 2.2
> 
> Rgds, Fred
> 
> 
> Ahmed Musa wrote:
> > 
> > Hallo,
> > 
> > I am logging the mod_jk Output through the Apache access_log - as
> written
> > in the reference found under
> > http://tomcat.apache.org/connectors-doc/reference/apache.html
> > 
> > Because i want to get clearness about what exactly is going on in our
> > system i use the following LogFormat:
> > 
> > LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"
> > \"%{Cookie}i\" \"%{Set-Cookie}o\" %{pid}P %{tid}P%T 
> > %{JK_WORKER_NAME}n %{JK_REQUEST_DURATON}n %{JK_WORKER_ROUTE}n
> > %{JK_LB_FIRST_NAME}n %{JK_LB_FIRST_BUSY}n %{JK_LB_FIRST_VALUE}n
> > %{JK_LB_FIRST_ACCESSED}n %{JK_LB_FIRST_READ}n
> %{JK_LB_FIRST_TRANSFERRED}n
> > %{JK_LB_FIRST_ERRORS}n %{JK_LB_FIRST_ACTIVATION}n
> > %{JK_LB_FIRST_STATE}n %{JK_LB_LAST_NAME}n" mod_jk_log
> > 
> > ...everthing works fine except the Options responsible for the Request
> > Duration.
> > 
> > Mostly neither %T nor %{JK_REQUEST_DURATON}n have a Value (%T mostly is
> 0
> > an the other Parameter is "-").
> > At some Requests i found the %T has a value like for example 2 or 3.. -
> > and JK_REQUEST DURATION has "-"
> > or %T is 0 and JK_REQUEST_DURATION has an value like 2 or 3 ...
> > 
> > First - why are there not values at each request ?
> > Second -i think both Options are measuring the same Value - why they are
> > not the same ?
> > Third - why they are not showing seconds.microseconds as written in the
> > reference but only (I think so) rounded seconds.
> > 
> > We use mod_jk 1.2.26
> > 
> > Thanks for help
> > Best 
> > ahmed
> > -- 
> > Psst! Geheimtipp: Online Games kostenlos spielen bei den GMX Free Games!
> > http://games.entertainment.web.de/de/entertainment/games/free
> > 
> > ---------------------------------------------------------------------
> > To start a new topic, e-mail: users@tomcat.apache.org
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> > 
> > 
> > 
> 
> -- 
> View this message in context:
> http://www.nabble.com/JkRequestLogFormat-Options-tp15736214p15745192.html
> Sent from the Tomcat - User mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org

-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: JkRequestLogFormat Options

Posted by fredk2 <fr...@gmail.com>.
Hi,

btw, in your log format line you have %{JK_REQUEST_DURATON}n instead of
%{JK_REQUEST_DURATION}n see the missing I.

I am using 1.2.25 and i get times alike 0.0275 when using Apache 2.2

Rgds, Fred


Ahmed Musa wrote:
> 
> Hallo,
> 
> I am logging the mod_jk Output through the Apache access_log - as written
> in the reference found under
> http://tomcat.apache.org/connectors-doc/reference/apache.html
> 
> Because i want to get clearness about what exactly is going on in our
> system i use the following LogFormat:
> 
> LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"
> \"%{Cookie}i\" \"%{Set-Cookie}o\" %{pid}P %{tid}P%T 
> %{JK_WORKER_NAME}n %{JK_REQUEST_DURATON}n %{JK_WORKER_ROUTE}n
> %{JK_LB_FIRST_NAME}n %{JK_LB_FIRST_BUSY}n %{JK_LB_FIRST_VALUE}n
> %{JK_LB_FIRST_ACCESSED}n %{JK_LB_FIRST_READ}n %{JK_LB_FIRST_TRANSFERRED}n
> %{JK_LB_FIRST_ERRORS}n %{JK_LB_FIRST_ACTIVATION}n
> %{JK_LB_FIRST_STATE}n %{JK_LB_LAST_NAME}n" mod_jk_log
> 
> ...everthing works fine except the Options responsible for the Request
> Duration.
> 
> Mostly neither %T nor %{JK_REQUEST_DURATON}n have a Value (%T mostly is 0
> an the other Parameter is "-").
> At some Requests i found the %T has a value like for example 2 or 3.. -
> and JK_REQUEST DURATION has "-"
> or %T is 0 and JK_REQUEST_DURATION has an value like 2 or 3 ...
> 
> First - why are there not values at each request ?
> Second -i think both Options are measuring the same Value - why they are
> not the same ?
> Third - why they are not showing seconds.microseconds as written in the
> reference but only (I think so) rounded seconds.
> 
> We use mod_jk 1.2.26
> 
> Thanks for help
> Best 
> ahmed
> -- 
> Psst! Geheimtipp: Online Games kostenlos spielen bei den GMX Free Games! 
> http://games.entertainment.web.de/de/entertainment/games/free
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/JkRequestLogFormat-Options-tp15736214p15745192.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: JkRequestLogFormat Options

Posted by Ahmed Musa <do...@gmx.at>.
Hallo Rainer,

thanks for your Input
- of course i have to change my FIRST and LAST variant (the FIRST_NAME i will use to check if the worker has changed) - but you're right - i am more interested in the LAST values.

Changed %T to %D -> works fine, thanks

We upgraded to 1.2.26 last week - but the Values for ROUTE and DURATION are the same than before (1.2.25) - and we haven't set JkRequestLogFormat explicitly.(of course i wrote DURATION without I - now it's ok).

thanks
best ahmed



-------- Original-Nachricht --------
> Datum: Thu, 28 Feb 2008 23:52:40 +0100
> Von: Rainer Jung <ra...@kippdata.de>
> An: Tomcat Users List <us...@tomcat.apache.org>
> Betreff: Re: JkRequestLogFormat Options

> In addition to Freds remark:
> 
> Usually you want the "LAST" variant, instead of the "FIRST" variant. The 
> two are the same, if a loab balancer only tries one worker, but in case 
> of an error and failover, FIRST will be the first worker tried (so the 
> failed one) and LAST the last one, so usually the successful one (unless 
> all workers fail).
> 
> %T: response time in seconds, and I think it always gets rounded down. 
> So usually not very useful
> 
> Instead you could use the httpd standard %D, which is response time in 
> microseconds.
> 
> Last remark: until JK 1.2.25 the variables JK_WORKER_ROUTE and 
> JK_REQUEST_DURATION where only filled, if some JkRequestLogFormat was 
> set. In your version 1.2.26 both of them should get set even with a 
> JkRequestLogFormat (but only, if the request gets handled by mod_jk, so 
> not for static content, that is returned by the web server without any 
> Tomcat interaction).
> 
> Regards,
> 
> Rainer
> 
> Ahmed Musa schrieb:
> > Hallo,
> > 
> > I am logging the mod_jk Output through the Apache access_log - as
> written in the reference found under
> > http://tomcat.apache.org/connectors-doc/reference/apache.html
> > 
> > Because i want to get clearness about what exactly is going on in our
> system i use the following LogFormat:
> > 
> > LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"
> \"%{Cookie}i\" \"%{Set-Cookie}o\" %{pid}P %{tid}P%T 
> > %{JK_WORKER_NAME}n %{JK_REQUEST_DURATON}n %{JK_WORKER_ROUTE}n
> %{JK_LB_FIRST_NAME}n %{JK_LB_FIRST_BUSY}n %{JK_LB_FIRST_VALUE}n
> > %{JK_LB_FIRST_ACCESSED}n %{JK_LB_FIRST_READ}n
> %{JK_LB_FIRST_TRANSFERRED}n %{JK_LB_FIRST_ERRORS}n %{JK_LB_FIRST_ACTIVATION}n
> > %{JK_LB_FIRST_STATE}n %{JK_LB_LAST_NAME}n" mod_jk_log
> > 
> > ...everthing works fine except the Options responsible for the Request
> Duration.
> > 
> > Mostly neither %T nor %{JK_REQUEST_DURATON}n have a Value (%T mostly is
> 0 an the other Parameter is "-").
> > At some Requests i found the %T has a value like for example 2 or 3.. -
> and JK_REQUEST DURATION has "-"
> > or %T is 0 and JK_REQUEST_DURATION has an value like 2 or 3 ...
> > 
> > First - why are there not values at each request ?
> > Second -i think both Options are measuring the same Value - why they are
> not the same ?
> > Third - why they are not showing seconds.microseconds as written in the
> reference but only (I think so) rounded seconds.
> > 
> > We use mod_jk 1.2.26
> > 
> > Thanks for help
> > Best 
> > ahmed
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org

-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: JkRequestLogFormat Options

Posted by Rainer Jung <ra...@kippdata.de>.
In addition to Freds remark:

Usually you want the "LAST" variant, instead of the "FIRST" variant. The 
two are the same, if a loab balancer only tries one worker, but in case 
of an error and failover, FIRST will be the first worker tried (so the 
failed one) and LAST the last one, so usually the successful one (unless 
all workers fail).

%T: response time in seconds, and I think it always gets rounded down. 
So usually not very useful

Instead you could use the httpd standard %D, which is response time in 
microseconds.

Last remark: until JK 1.2.25 the variables JK_WORKER_ROUTE and 
JK_REQUEST_DURATION where only filled, if some JkRequestLogFormat was 
set. In your version 1.2.26 both of them should get set even with a 
JkRequestLogFormat (but only, if the request gets handled by mod_jk, so 
not for static content, that is returned by the web server without any 
Tomcat interaction).

Regards,

Rainer

Ahmed Musa schrieb:
> Hallo,
> 
> I am logging the mod_jk Output through the Apache access_log - as written in the reference found under
> http://tomcat.apache.org/connectors-doc/reference/apache.html
> 
> Because i want to get clearness about what exactly is going on in our system i use the following LogFormat:
> 
> LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" \"%{Cookie}i\" \"%{Set-Cookie}o\" %{pid}P %{tid}P%T 
> %{JK_WORKER_NAME}n %{JK_REQUEST_DURATON}n %{JK_WORKER_ROUTE}n %{JK_LB_FIRST_NAME}n %{JK_LB_FIRST_BUSY}n %{JK_LB_FIRST_VALUE}n
> %{JK_LB_FIRST_ACCESSED}n %{JK_LB_FIRST_READ}n %{JK_LB_FIRST_TRANSFERRED}n %{JK_LB_FIRST_ERRORS}n %{JK_LB_FIRST_ACTIVATION}n
> %{JK_LB_FIRST_STATE}n %{JK_LB_LAST_NAME}n" mod_jk_log
> 
> ...everthing works fine except the Options responsible for the Request Duration.
> 
> Mostly neither %T nor %{JK_REQUEST_DURATON}n have a Value (%T mostly is 0 an the other Parameter is "-").
> At some Requests i found the %T has a value like for example 2 or 3.. - and JK_REQUEST DURATION has "-"
> or %T is 0 and JK_REQUEST_DURATION has an value like 2 or 3 ...
> 
> First - why are there not values at each request ?
> Second -i think both Options are measuring the same Value - why they are not the same ?
> Third - why they are not showing seconds.microseconds as written in the reference but only (I think so) rounded seconds.
> 
> We use mod_jk 1.2.26
> 
> Thanks for help
> Best 
> ahmed

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org