added BusyServer compat for ?auto

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@800 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.4.7
Jan Kneschke 2005-10-31 07:57:09 +00:00
parent 1022432a1e
commit 74d0c3d0de
1 changed files with 14 additions and 0 deletions

View File

@ -539,6 +539,8 @@ static handler_t mod_status_handle_server_status_text(server *srv, connection *c
plugin_data *p = p_d;
buffer *b;
double avg;
size_t j;
time_t ts;
b = chunkqueue_get_append_buffer(con->write_queue);
@ -554,7 +556,19 @@ static handler_t mod_status_handle_server_status_text(server *srv, connection *c
buffer_append_long(b, avg);
BUFFER_APPEND_STRING_CONST(b, "\n");
/* output uptime */
BUFFER_APPEND_STRING_CONST(b, "Uptime: ");
ts = srv->cur_ts - srv->startup_ts;
buffer_append_long(b, ts);
BUFFER_APPEND_STRING_CONST(b, "\n");
/* output busy servers */
BUFFER_APPEND_STRING_CONST(b, "BusyServers: ");
buffer_append_long(b, srv->conns->used);
BUFFER_APPEND_STRING_CONST(b, "\n");
/* set text/plain output */
response_header_overwrite(srv, con, CONST_STR_LEN("Content-Type"), CONST_STR_LEN("text/plain"));
return 0;