Welcome! Log In Create A New Profile

Advanced

Writing the total request time in seconds to an nginx access log, possibly using a calculated variable

November 06, 2012 05:31PM
I'm trying to modify my nginx access log format to include the request duration, in seconds.

I see two possible variables I could use:

1) $request_time (http://wiki.nginx.org/HttpLogModule#log_format)

2) $upstream_response_time (http://wiki.nginx.org/NginxHttpUpstreamModule#.24upstream_response_time)

However both of these variables are expressed in microseconds, and I need this value to be rendered in seconds. Is there any way to specify the output as an expression (i.e. $request_time * 1000) or accomplish this in some other way?

Thanks,
Tharsan
SubjectAuthorPosted

Writing the total request time in seconds to an nginx access log, possibly using a calculated variable

tharsanNovember 06, 2012 05:31PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 90
Record Number of Users: 7 on March 06, 2014
Record Number of Guests: 165 on April 21, 2014
Powered by nginx    Powered by FreeBSD    PHP Powered    Powered by Percona     ipv6 ready