Feature #315

first version of upload rate display in server-info

Added by Anonymous 1190 days ago. Updated 89 days ago.

Status:Wontfix Start:
Priority:Normal Due date:
Assigned to:- % Done:

0%

Category:core
Target version:-
Pending:

No

Resolution:

wontfix

Patch available:


Description

--- mod_status.orig 2005-10-05 14:05:27.000000000 -0400
+++ 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->write_queue));
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_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);

History

10/05/2005 07:23 PM - brad@comstyle.com

Attach your patch to the ticket instead of trying to post it inline.

09/02/2008 01:02 PM - stbuehler

  • 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.

10/10/2008 07:03 PM - stbuehler

  • Status changed from Fixed to Wontfix

Also available in: Atom PDF