Feature #315
closedfirst version of upload rate display in server-info
Description
--- mod_status.orig 2005-10-05 14:05:27.000000000 0400>write_queue));
++ mod_status.c 2005-10-05 14:24:51.000000000 -0400@ -462,6 +462,7
@
mod_status_header_append_sort(b, p_d, "Read");
mod_status_header_append_sort(b, p_d, "Written");
mod_status_header_append_sort(b, p_d, "State");
mod_status_header_append_sort(b, p_d, "Wr Rate");
mod_status_header_append_sort(b, p_d, "Time");
mod_status_header_append_sort(b, p_d, "Host");
mod_status_header_append_sort(b, p_d, "URI");@ -490,12 +491,34
@
buffer_append_off_t(b, chunkqueue_written(c
BUFFER_APPEND_STRING_CONST(b, "/");
buffer_append_off_t(b, chunkqueue_length(c->write_queue));
-
/* State */
BUFFER_APPEND_STRING_CONST(b, "</td><td class=\"string\">");
buffer_append_string(b, connection_get_state(c->state));
-
- BUFFER_APPEND_STRING_CONST(b, "</td><td class=\"int\">");
/* Written Rate /
+ BUFFER_APPEND_STRING_CONST(b, "</td><td class=\"int\">");
+ if (srv->cur_ts - c->request_start > 0)
+ avg = c->bytes_written / (srv->cur_ts - c->request_start);
+ else
+ avg = 0;
+ mod_status_get_multiplier(&avg, &multiplier, 1024);
if (avg != 0)
+ {
+ sprintf(buf, "%.2f", avg);
+ buffer_append_string(b, buf);
+ if (multiplier) buffer_append_string_len(b, &multiplier, 1);
+ BUFFER_APPEND_STRING_CONST(b, "B");
+ }
+ else
+ {
+ BUFFER_APPEND_STRING_CONST(b, "-");
+ }
/ Time */
+ BUFFER_APPEND_STRING_CONST(b, "</td><td class=\"int\">");
buffer_append_long(b, srv->cur_ts - c->request_start);
Updated by brad@comstyle.com over 19 years ago
Attach your patch to the ticket instead of trying to post it inline.
Updated by stbuehler over 16 years ago
- Status changed from New to Fixed
- Resolution set to wontfix
I don't think the write rate for the complete uptime is interesting. just poll the counters in a db (like rrdtool) and you have more useful information.
Also available in: Atom