Project

General

Profile

Actions

Feature #315

closed

first version of upload rate display in server-info

Added by Anonymous over 19 years ago. Updated over 16 years ago.

Status:
Wontfix
Priority:
Normal
Category:
core
Target version:
-
ASK QUESTIONS IN Forums:

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(b, connection_get_state(c->state));
-
- BUFFER_APPEND_STRING_CONST(b, "&lt;/td&gt;&lt;td class=\&quot;int\&quot;&gt;");

/* Written Rate /
+ BUFFER_APPEND_STRING_CONST(b, "&lt;/td&gt;&lt;td class=\&quot;int\&quot;&gt;");
+ 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, "&lt;/td&gt;&lt;td class=\&quot;int\&quot;&gt;");
buffer_append_long(b, srv->cur_ts - c->request_start);
Actions #1

Updated by brad@comstyle.com over 19 years ago

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

Actions #2

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.

Actions #3

Updated by stbuehler over 16 years ago

  • Status changed from Fixed to Wontfix
Actions

Also available in: Atom