Maxim Dounin
November 22, 2016 07:54AM
Hello!

On Tue, Nov 22, 2016 at 05:21:45AM -0500, Phani Sreenivasa Prasad wrote:

> Hi
>
> I want to read the nginx the value of nginx variable $body_bytes_sent from
> my fastcgi application to check how many bytes nginx had sent to client?
>
> I tried something below
>
> fastcgi_param BODY_BYTES_SENT $body_bytes_sent in my fastcgi_params
>
> and trying to read the fastcgi param value from the fastcgi application. But
> it always returns 0.
>
> Please help me how to read nginx variables(apart from those defined default
> in fastcgi_params file) from my fastcgi app and when to read? I need to know
> when the value of $body_bytes_sent will get populated?

The $body_bytes_sent variable represents number of bytes sent to a
client. Obviously it is expected to be 0 before you've sent a
response. Effectively it is only available while logging a
request.

--
Maxim Dounin
http://nginx.org/

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

how to read $body_bytes_sent nginx variable

Phani Sreenivasa Prasad November 22, 2016 05:21AM

Re: how to read $body_bytes_sent nginx variable

Maxim Dounin November 22, 2016 07:54AM

Re: how to read $body_bytes_sent nginx variable

Phani Sreenivasa Prasad November 22, 2016 08:02AM

Re: how to read $body_bytes_sent nginx variable

Valentin V. Bartenev November 22, 2016 08:12AM

Re: how to read $body_bytes_sent nginx variable

Phani Sreenivasa Prasad November 22, 2016 08:22AM

Re: how to read $body_bytes_sent nginx variable

noci November 23, 2016 09:22AM

Re: how to read $body_bytes_sent nginx variable

Valentin V. Bartenev November 22, 2016 08:32AM

Re: how to read $body_bytes_sent nginx variable

Phani Sreenivasa Prasad November 22, 2016 08:42AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 172
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready