Forum: NGINX nginx request time

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
E40f7fb8900eba3c3a2da70faad085fa?d=identicon&s=25 Deepan Chakravarthy (Guest)
on 2009-04-13 21:22
(Received via mailing list)
Hi,
Is it possible to log the time taken for each request in the log file ?
Or
is there a package like apache top for nginx ?

Thanks
Deepan
A8108a0961c6087c43cda32c8616dcba?d=identicon&s=25 Maxim Dounin (Guest)
on 2009-04-13 22:49
(Received via mailing list)
Hello!

On Tue, Apr 14, 2009 at 12:44:50AM +0530, Deepan Chakravarthy wrote:

> Hi,
> Is it possible to log the time taken for each request in the log file ?  Or
> is there a package like apache top for nginx ?

http://wiki.nginx.org/NginxHttpLogModule#log_format
$request_time

Note that this time depends on the client behaviour, not only
server performance.  Take a look at $upstream_response_time if you
need something more related to your backend performance, see
http://wiki.nginx.org/NginxHttpUpstreamModule#.24u....

Maxim Dounin
Fcaa940f447c1c76afb8ee2448ba0461?d=identicon&s=25 Jérôme Loyet (Guest)
on 2009-06-17 15:01
(Received via mailing list)
2009/4/13 Maxim Dounin <mdounin@mdounin.ru>:
>
I'm using $request_time in my access_log and I have this:
10.1.1.1 - - [17/Jun/2009:14:48:12 +0200] "GET
/lib/exploit_tools/test.static.html HTTP/1.1" 200 1391040 "-"
"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2; .NET CLR 1.1.4322;
.NET CLR 2.0.50727)" 26.691

And on the wiki it's said:
$request_time, the time it took nginx to work on the request, in
milliseconds, (in seconds for versions older than 0.5.19)

26.691 is the time in seconds with milliseconds after the dot. Am I
right ?
A8108a0961c6087c43cda32c8616dcba?d=identicon&s=25 Maxim Dounin (Guest)
on 2009-06-17 15:55
(Received via mailing list)
Hello!

On Wed, Jun 17, 2009 at 02:50:43PM +0200, Jérôme Loyet wrote:

> > $request_time
> milliseconds, (in seconds for versions older than 0.5.19)
Official docs say it's "... request processing time in seconds with
millisecond resolution" (in Russian). See
http://sysoev.ru/nginx/docs/http/ngx_http_log_module.html.

> 26.691 is the time in seconds with milliseconds after the dot. Am I right ?

Yes.

Maxim Dounin
Fcaa940f447c1c76afb8ee2448ba0461?d=identicon&s=25 Jérôme Loyet (Guest)
on 2009-06-17 15:59
(Received via mailing list)
2009/6/17 Maxim Dounin <mdounin@mdounin.ru>:
>> >> Is it possible to log the time taken for each request in the log file ?  Or
>> .NET CLR 2.0.50727)" 26.691
>>
>> And on the wiki it's said:
>> $request_time, the time it took nginx to work on the request, in
>> milliseconds, (in seconds for versions older than 0.5.19)
>
> Official docs say it's "... request processing time in seconds with
> millisecond resolution" (in Russian). See
> http://sysoev.ru/nginx/docs/http/ngx_http_log_module.html.

Thanks for the answer and the translation :)
This topic is locked and can not be replied to.