Permalink
Browse files

more stuff

  • Loading branch information...
1 parent 72ebf02 commit bde4fd37c798140fe63f1de73743de951cce82eb @greenisus committed Jul 4, 2012
Showing with 10 additions and 30 deletions.
  1. +1 −13 addons/ngx_http_extended_status_module.c
  2. +9 −17 addons/ngx_http_extended_status_module.h
@@ -298,15 +298,8 @@ put_basic_status(ngx_http_request_t *r)
rd = *ngx_stat_reading;
wr = *ngx_stat_writing;
- // size = sizeof("<b>Active connections: %uA </b>\n<br><br>\n") + NGX_ATOMIC_T_LEN;
- size = sizeof("'active-connections': '%uA', ") + NGX_ATOMIC_T_LEN;
- // size += sizeof("<table border=0><tr><th>server accepts</th><th>handled</th><th>requests</th></tr>\n");
-
- // size += sizeof("<tr align=right><td> %uA </td><td> %uA </td><td> %uA </td></tr></table><br>\n") + NGX_ATOMIC_T_LEN * 3;
+ size = sizeof("'active-connections': '%uA', ") + NGX_ATOMIC_T_LEN;
size += sizeof("'accepts': '%uA', 'handled': '%uA', 'requests': '%uA', ") + NGX_ATOMIC_T_LEN * 3;
-
- // size += sizeof("<table border=0><tr><th>Reading:</th><td> %uA </td><th>Writing:</th><td> %uA </td><th>Waiting:</th><td> %uA </td></tr></table>\n")
- // + NGX_ATOMIC_T_LEN * 3;
size += sizeof("'reading': '%uA', 'writing': '%uA', 'waiting': '%uA', ")
+ NGX_ATOMIC_T_LEN * 3;
@@ -317,13 +310,8 @@ put_basic_status(ngx_http_request_t *r)
if (c == NULL)
return NULL;
- // b->last = ngx_sprintf(b->last, "<b>Active connections: %uA </b>\n<br><br>\n", ac);
b->last = ngx_sprintf(b->last, "'active-connections': '%uA', ", ac);
- // b->last = ngx_sprintf(b->last, "<table border=0><tr><th>server accepts</th><th>handled</th><th>requests</th></tr>\n");
- // b->last = ngx_sprintf(b->last, "<tr align=right><td> %uA </td><td> %uA </td><td> %uA </td></tr></table><br>\n", ap, hn, rq);
b->last = ngx_sprintf(b->last, "'accepts': '%uA', 'handled': '%uA', 'requests': '%uA', ", ap, hn, rq);
- // b->last = ngx_sprintf(b->last, "<table border=0><tr><th>Reading:</th><td> %uA </td><th>Writing:</th><td> %uA </td><th>Waiting:</th><td> %uA </td></tr></table>\n",
- // rd, wr, ac - (rd + wr));
b->last = ngx_sprintf(b->last, "'reading': '%uA', 'writing': '%uA', 'waiting': '%uA', ",
rd, wr, ac - (rd + wr));
c->buf = b;
@@ -23,23 +23,15 @@
#define GZIP_HEADER "<th class=sortable>Gzip Ratio</th>"
#define PROXY_HEADER "<th class=sortable>Proxy TIME</th>"
-#define SHORTENED_TABLE "<table>\n" \
- "<tr><th>PID</th><td>OS process ID</td></tr>\n" \
- "<tr><th>Acc</th><td>Number of requests serviced with this connection slot</td></tr>\n" \
- "<tr><th>M</th><td>Mode of operation</td></tr>\n" \
- "<tr><th>CPU</th><td>Accumulated CPU usage in seconds</td></tr>\n" \
- "<tr><th>Gzip Ratio</th><td>Ratio of original size to compressed size </td>\n" \
- "<tr><th>SS</th><td>Seconds since the request completion</td></tr>\n" \
- "<tr><th>Proxy TIME</th><td> Proxy response time in milliseconds. 0 means the value is less than 1 millisecond</td></tr>\n" \
- "<tr><th>TIME</th><td>Response time in milliseconds. 0 means the value is less than 1 millisecond</td></tr>\n" \
- "</table>\n"
-
-#define MODE_LIST "<b>Mode List</b><br><table>" \
- "<tr><th>-</th><td>Waiting for request</td></tr>\n" \
- "<tr><th>R</th><td>Reading request</td></tr>\n" \
- "<tr><th>W</th><td>Sending reply</td></tr>\n" \
- "<tr><th>L</th><td>Logging</td></tr>\n" \
- "<tr><th>I</th><td>Inactive connection</td></tr>\n"
+#define SHORTENED_TABLE ""
+
+#define MODE_LIST ""
+// #define MODE_LIST "<b>Mode List</b><br><table>" \
+// "<tr><th>-</th><td>Waiting for request</td></tr>\n" \
+// "<tr><th>R</th><td>Reading request</td></tr>\n" \
+// "<tr><th>W</th><td>Sending reply</td></tr>\n" \
+// "<tr><th>L</th><td>Logging</td></tr>\n" \
+// "<tr><th>I</th><td>Inactive connection</td></tr>\n"
#define MBYTE 1048576.0

0 comments on commit bde4fd3

Please sign in to comment.