{
struct stats_disk *sdc, *sdp, sdpzero;
struct ext_disk_stats xds;
- int group[] = {1, 2, 2, 1, 1};
+ int group[] = {1, 3, 2, 1, 1};
int g_type[] = {SVG_LINE_GRAPH, SVG_LINE_GRAPH, SVG_LINE_GRAPH,
SVG_LINE_GRAPH, SVG_BAR_GRAPH};
char *title[] = {"Block devices statistics (1)", "Block devices statistics (2)",
"Block devices statistics (3)", "Block devices statistics (4)",
"Block devices statistics (5)"};
char *g_title[] = {"tps",
- "rkB/s", "wkB/s",
+ "rkB/s", "wkB/s", "dkB/s",
"areq-sz", "aqu-sz",
"await",
"%util"};
int g_fields[] = {0, 1, 2};
- int nr_arrays = 8;
+ int nr_arrays = 9;
unsigned int local_types_nr[] = {1, 0, 0};
static double *spmin, *spmax;
static char **out;
static int *outsize;
char *item_name;
- double rkB, wkB, aqusz;
+ double rkB, wkB, dkB, aqusz;
int i, j, k, pos, restart, *unregistered;
if (action & F_BEGIN) {
/*
- * Allocate arrays (#0..6) that will contain the graphs data
+ * Allocate arrays (#0..7) that will contain the graphs data
* and the min/max values.
- * Also allocate one additional array (#7) for each disk device:
- * spmax + 7 will contain the device major number,
- * spmin + 7 will contain the device minor number,
- * outsize + 7 will contain a positive value (TRUE) if the device
+ * Also allocate one additional array (#8) for each disk device:
+ * spmax + 8 will contain the device major number,
+ * spmin + 8 will contain the device minor number,
+ * outsize + 8 will contain a positive value (TRUE) if the device
* has either still not been registered, or has been unregistered.
*/
out = allocate_graph_lines(nr_arrays * a->item_list_sz, &outsize, &spmin, &spmax);
* possibly unregistered for all graphs.
*/
for (k = 0; k < a->item_list_sz; k++) {
- unregistered = outsize + k * nr_arrays + 7;
+ unregistered = outsize + k * nr_arrays + 8;
if (*unregistered == FALSE) {
*unregistered = MAYBE;
}
/* Look for corresponding graph */
for (k = 0; k < a->item_list_sz; k++) {
- if ((sdc->major == *(spmax + k * nr_arrays + 7)) &&
- (sdc->minor == *(spmin + k * nr_arrays + 7)))
+ if ((sdc->major == *(spmax + k * nr_arrays + 8)) &&
+ (sdc->minor == *(spmin + k * nr_arrays + 8)))
/* Graph found! */
break;
}
if (k == a->item_list_sz) {
/* Graph not found: Look for first free entry */
for (k = 0; k < a->item_list_sz; k++) {
- if (*(spmax + k * nr_arrays + 7) == -DBL_MAX)
+ if (*(spmax + k * nr_arrays + 8) == -DBL_MAX)
break;
}
if (k == a->item_list_sz) {
}
}
pos = k * nr_arrays;
- unregistered = outsize + pos + 7;
+ unregistered = outsize + pos + 8;
/*
* If current device was marked as previously unregistered,
}
*unregistered = FALSE;
- if (*(spmax + pos + 7) == -DBL_MAX) {
+ if (*(spmax + pos + 8) == -DBL_MAX) {
/* Save device major and minor numbers (if not already done) */
- *(spmax + pos + 7) = sdc->major;
- *(spmin + pos + 7) = sdc->minor;
+ *(spmax + pos + 8) = sdc->major;
+ *(spmin + pos + 8) = sdc->minor;
}
j = check_disk_reg(a, curr, !curr, i);
rkB = S_VALUE(sdp->rd_sect, sdc->rd_sect, itv) / 2;
wkB = S_VALUE(sdp->wr_sect, sdc->wr_sect, itv) / 2;
+ dkB = S_VALUE(sdp->dc_sect, sdc->dc_sect, itv) / 2;
if (rkB < *(spmin + pos + 1)) {
*(spmin + pos + 1) = rkB;
}
if (wkB > *(spmax + pos + 2)) {
*(spmax + pos + 2) = wkB;
}
+ if (dkB < *(spmin + pos + 3)) {
+ *(spmin + pos + 3) = dkB;
+ }
+ if (dkB > *(spmax + pos + 3)) {
+ *(spmax + pos + 3) = dkB;
+ }
compute_ext_disk_stats(sdc, sdp, itv, &xds);
- if ((xds.arqsz / 2) < *(spmin + pos + 3)) {
- *(spmin + pos + 3) = xds.arqsz / 2;
+ if ((xds.arqsz / 2) < *(spmin + pos + 4)) {
+ *(spmin + pos + 4) = xds.arqsz / 2;
}
- if ((xds.arqsz / 2) > *(spmax + pos + 3)) {
- *(spmax + pos + 3) = xds.arqsz / 2;
+ if ((xds.arqsz / 2) > *(spmax + pos + 4)) {
+ *(spmax + pos + 4) = xds.arqsz / 2;
}
aqusz = S_VALUE(sdp->rq_ticks, sdc->rq_ticks, itv) / 1000.0;
- if (aqusz < *(spmin + pos + 4)) {
- *(spmin + pos + 4) = aqusz;
+ if (aqusz < *(spmin + pos + 5)) {
+ *(spmin + pos + 5) = aqusz;
}
- if (aqusz > *(spmax + pos + 4)) {
- *(spmax + pos + 4) = aqusz;
+ if (aqusz > *(spmax + pos + 5)) {
+ *(spmax + pos + 5) = aqusz;
}
- if (xds.await < *(spmin + pos + 5)) {
- *(spmin + pos + 5) = xds.await;
+ if (xds.await < *(spmin + pos + 6)) {
+ *(spmin + pos + 6) = xds.await;
}
- if (xds.await > *(spmax + pos + 5)) {
- *(spmax + pos + 5) = xds.await;
+ if (xds.await > *(spmax + pos + 6)) {
+ *(spmax + pos + 6) = xds.await;
}
- if ((xds.util / 10.0) < *(spmin + pos + 6)) {
- *(spmin + pos + 6) = xds.util / 10.0;
+ if ((xds.util / 10.0) < *(spmin + pos + 7)) {
+ *(spmin + pos + 7) = xds.util / 10.0;
}
- if ((xds.util / 10.0) > *(spmax + pos + 6)) {
- *(spmax + pos + 6) = xds.util / 10.0;
+ if ((xds.util / 10.0) > *(spmax + pos + 7)) {
+ *(spmax + pos + 7) = xds.util / 10.0;
}
/* tps */
lnappend(record_hdr->ust_time - svg_p->ust_time_ref,
S_VALUE(sdp->wr_sect, sdc->wr_sect, itv) / 2,
out + pos + 2, outsize + pos + 2, restart);
+ /* dkB/s */
+ lnappend(record_hdr->ust_time - svg_p->ust_time_ref,
+ S_VALUE(sdp->wr_sect, sdc->wr_sect, itv) / 2,
+ out + pos + 3, outsize + pos + 3, restart);
/* areq-sz */
lnappend(record_hdr->ust_time - svg_p->ust_time_ref,
xds.arqsz / 2,
- out + pos + 3, outsize + pos + 3, restart);
+ out + pos + 4, outsize + pos + 4, restart);
/* aqu-sz */
lnappend(record_hdr->ust_time - svg_p->ust_time_ref,
aqusz,
- out + pos + 4, outsize + pos + 4, restart);
+ out + pos + 5, outsize + pos + 5, restart);
/* await */
lnappend(record_hdr->ust_time - svg_p->ust_time_ref,
xds.await,
- out + pos + 5, outsize + pos + 5, restart);
+ out + pos + 6, outsize + pos + 6, restart);
/* %util */
brappend(record_hdr->ust_time - svg_p->ust_time_ref,
0.0, xds.util / 10.0,
- out + pos + 6, outsize + pos + 6, svg_p->dt);
+ out + pos + 7, outsize + pos + 7, svg_p->dt);
}
/* Mark devices not seen here as now unregistered */
for (k = 0; k < a->item_list_sz; k++) {
- unregistered = outsize + k * nr_arrays + 7;
+ unregistered = outsize + k * nr_arrays + 8;
if (*unregistered != FALSE) {
*unregistered = TRUE;
}
continue;
/* Get device name */
- item_name = get_sa_devname(*(spmax + pos + 7), *(spmin + pos + 7), flags);
+ item_name = get_sa_devname(*(spmax + pos + 8), *(spmin + pos + 8), flags);
if (draw_activity_graphs(a->g_nr, g_type,
title, g_title, item_name, group,