[PATCH] Variables: added $tcpinfo_retrans

Alexey Ivanov savetherbtz at gmail.com
Sat Dec 19 11:43:28 UTC 2015


# HG changeset patch
# User Alexey Ivanov <SaveTheRbtz at GMail.com>
# Date 1450520577 28800
#      Sat Dec 19 02:22:57 2015 -0800
# Branch tcpi_retrans
# Node ID 89e3d2427e669a060f23f70adbdd301f8916d11c
# Parent  78b4e10b4367b31367aad3c83c9c3acdd42397c4
Variables: added $tcpinfo_retrans

This one is useful for debugging poor network conditions.

diff -r 78b4e10b4367 -r 89e3d2427e66 src/http/ngx_http_variables.c
--- a/src/http/ngx_http_variables.c	Thu Dec 17 16:39:15 2015 +0300
+++ b/src/http/ngx_http_variables.c	Sat Dec 19 02:22:57 2015 -0800
@@ -343,6 +343,9 @@

    { ngx_string("tcpinfo_rcv_space"), NULL, ngx_http_variable_tcpinfo,
      3, NGX_HTTP_VAR_NOCACHEABLE, 0 },
+
+    { ngx_string("tcpinfo_retrans"), NULL, ngx_http_variable_tcpinfo,
+      4, NGX_HTTP_VAR_NOCACHEABLE, 0 },
#endif

    { ngx_null_string, NULL, NULL, 0, 0, 0 }
@@ -1053,6 +1056,10 @@
        value = ti.tcpi_rcv_space;
        break;

+    case 4:
+        value = ti.tcpi_retrans;
+        break;
+
    /* suppress warning */
    default:
        value = 0;

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20151219/3381d9ee/attachment.bin>


More information about the nginx-devel mailing list