]> granicus.if.org Git - apache/commitdiff
update scoreboard CHANGES, doh
authorStefan Eissing <icing@apache.org>
Thu, 21 Jan 2016 16:39:12 +0000 (16:39 +0000)
committerStefan Eissing <icing@apache.org>
Thu, 21 Jan 2016 16:39:12 +0000 (16:39 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1726010 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/http2/h2_session.c
modules/http2/h2_session.h

diff --git a/CHANGES b/CHANGES
index d6e7f5d7d0edb1e73e255c6ee5b35f6ce9f414b5..98525966a64e9318989fca089a1ef9fe16ac7984 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,12 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.5.0
 
+  *) mod_status/scoreboard: additional column 'Protocol' showing the protocol
+     run on the connection. New ap_update_child_status methods for updating
+     server/description information separately. 
+     mod_ssl: server vhost negotiated by servername directly in status.
+     [Stefan Eissing]
+     
   *) mod_http2: keep-alive blocking reads are done with 1 second timeouts to
      check for MPM stopping. Will announce early GOAWAY and finish processing
      open streams, then close.
index 386c69fbe0e4dd4cc667d65f4c864824b0f1f14c..8c55c287bfa41efa4c6332854541a88d1bc97dce 100644 (file)
@@ -1983,6 +1983,19 @@ static void dispatch_event(h2_session *session, h2_session_event_t ev,
 
 static const int MAX_WAIT_MICROS = 200 * 1000;
 
+static void update_child_status(h2_session *session, int status, const char *msg)
+{
+    apr_snprintf(session->status, sizeof(session->status),
+                 "%s, streams: %d/%d/%d/%d/%d (open/recv/resp/push/rst)", 
+                 msg? msg : "-",
+                 (int)h2_stream_set_size(session->streams), 
+                 (int)session->requests_received,
+                 (int)session->responses_submitted,
+                 (int)session->pushes_submitted,
+                 (int)session->pushes_reset + session->streams_reset);
+    ap_update_child_status_descr(session->c->sbh, status, session->status);
+}
+
 apr_status_t h2_session_process(h2_session *session, int async)
 {
     apr_status_t status = APR_SUCCESS;
@@ -2002,16 +2015,19 @@ apr_status_t h2_session_process(h2_session *session, int async)
             }
         }
         
+        session->status[0] = '\0';
+        
         switch (session->state) {
             case H2_SESSION_ST_INIT:
+                ap_update_child_status_from_conn(c->sbh, SERVER_BUSY_READ, c);
                 if (!h2_is_acceptable_connection(c, 1)) {
+                    update_child_status(session, SERVER_BUSY_READ, "inadequate security");
                     h2_session_shutdown(session, NGHTTP2_INADEQUATE_SECURITY, NULL);
                 } 
                 else {
-                    ap_update_child_status(c->sbh, SERVER_BUSY_READ, NULL);
+                    update_child_status(session, SERVER_BUSY_READ, "init");
                     status = h2_session_start(session, &rv);
-                    ap_log_cerror(APLOG_MARK, APLOG_DEBUG, status, c,
-                                  APLOGNO(03079)
+                    ap_log_cerror(APLOG_MARK, APLOG_DEBUG, status, c, APLOGNO(03079)
                                   "h2_session(%ld): started on %s:%d", session->id,
                                   session->s->server_hostname,
                                   c->local_addr->port);
@@ -2026,7 +2042,7 @@ apr_status_t h2_session_process(h2_session *session, int async)
                 /* We wait in smaller increments, using a 1 second timeout.
                  * That gives us the chance to check for MPMQ_STOPPING often. */
                 h2_filter_cin_timeout_set(session->cin, 1);
-                ap_update_child_status_from_conn(c->sbh, SERVER_BUSY_KEEPALIVE, c);
+                update_child_status(session, SERVER_BUSY_KEEPALIVE, "idle");
                 status = h2_session_read(session, 1, 10);
                 if (status == APR_SUCCESS) {
                     have_read = 1;
@@ -2050,7 +2066,7 @@ apr_status_t h2_session_process(h2_session *session, int async)
             case H2_SESSION_ST_LOCAL_SHUTDOWN:
             case H2_SESSION_ST_REMOTE_SHUTDOWN:
                 if (nghttp2_session_want_read(session->ngh2)) {
-                    ap_update_child_status_from_conn(c->sbh, SERVER_BUSY_READ, c);
+                    update_child_status(session, SERVER_BUSY_READ, "busy");
                     h2_filter_cin_timeout_set(session->cin, session->timeout_secs);
                     status = h2_session_read(session, 0, 10);
                     if (status == APR_SUCCESS) {
@@ -2092,6 +2108,7 @@ apr_status_t h2_session_process(h2_session *session, int async)
                 }
                 
                 if (nghttp2_session_want_write(session->ngh2)) {
+                    ap_update_child_status(session->c->sbh, SERVER_BUSY_WRITE, NULL);
                     status = h2_session_send(session);
                     if (status == APR_SUCCESS) {
                         have_written = 1;
@@ -2121,6 +2138,7 @@ apr_status_t h2_session_process(h2_session *session, int async)
                 
                 ap_log_cerror( APLOG_MARK, APLOG_TRACE2, status, c,
                               "h2_session(%ld): process -> trywait", session->id);
+                    update_child_status(session, SERVER_BUSY_READ, "wait");
                 status = h2_mplx_out_trywait(session->mplx, session->wait_us, 
                                              session->iowait);
                 if (status == APR_SUCCESS) {
@@ -2137,6 +2155,7 @@ apr_status_t h2_session_process(h2_session *session, int async)
                 break;
                 
             case H2_SESSION_ST_DONE:
+                update_child_status(session, SERVER_CLOSING, "done");
                 status = APR_EOF;
                 goto out;
                 
index 011e0561c905f1e700eee1e6a22456fc8f1fffea..0e3bc5d7fdee1eb708bc7043550e10ddf96bde25 100644 (file)
@@ -134,6 +134,8 @@ typedef struct h2_session {
     struct h2_workers *workers;     /* for executing stream tasks */
     
     struct h2_push_diary *push_diary; /* remember pushes, avoid duplicates */
+    
+    char status[64];                /* status message for scoreboard */
 } h2_session;