printf(" rsec/s wsec/s");
}
printf(" rrqm/s wrqm/s %%rrqm %%wrqm r_await w_await"
- " aqu-sz rareq-sz wareq-sz svctm %%util");
+ " aqu-sz rareq-sz wareq-sz %%util");
}
}
else {
/* rareq-sz wareq-sz (in kB, not sectors) */
cprintf_f(DISPLAY_UNIT(flags) ? UNIT_KILOBYTE : NO_UNIT, 2, 8, 2,
xios->rarqsz / 2, xios->warqsz / 2);
- /* svctm - The ticks output is biased to output 1000 ticks per second */
- cprintf_f(NO_UNIT, 1, 6, 2, xds->svctm);
/*
* %util
* Again: Ticks in milliseconds.
xios->wsectors /= fctr);
printf("\"rrqm/s\": %.2f, \"wrqm/s\": %.2f, \"rrqm\": %.2f, \"wrqm\": %.2f, "
"\"r_await\": %.2f, \"w_await\": %.2f, "
- "\"aqu-sz\": %.2f, \"rareq-sz\": %.2f, \"wareq-sz\": %.2f, \"svctm\": %.2f, ",
+ "\"aqu-sz\": %.2f, \"rareq-sz\": %.2f, \"wareq-sz\": %.2f, ",
S_VALUE(ioj->rd_merges, ioi->rd_merges, itv),
S_VALUE(ioj->wr_merges, ioi->wr_merges, itv),
xios->rrqm_pc,
xios->w_await,
S_VALUE(ioj->rq_ticks, ioi->rq_ticks, itv) / 1000.0,
xios->rarqsz / 2,
- xios->warqsz / 2,
- xds->svctm);
+ xios->warqsz / 2);
}
printf("\"util\": %.2f}",
shi->used ? xds->util / 10.0 / (double) shi->used
{
struct stats_disk *sdc, *sdp, sdpzero;
struct ext_disk_stats xds;
- int group[] = {1, 2, 2, 2, 1};
+ int group[] = {1, 2, 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)",
char *g_title[] = {"tps",
"rkB/s", "wkB/s",
"areq-sz", "aqu-sz",
- "await", "svctm",
+ "await",
"%util"};
int g_fields[] = {0, 1, 2};
+ int nr_arrays = 8;
unsigned int local_types_nr[] = {1, 0, 0};
static double *spmin, *spmax;
static char **out;
if (action & F_BEGIN) {
/*
- * Allocate arrays (#0..7) that will contain the graphs data
+ * Allocate arrays (#0..6) that will contain the graphs data
* and the min/max values.
- * 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
+ * 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
* has either still not been registered, or has been unregistered.
*/
- out = allocate_graph_lines(9 * a->item_list_sz, &outsize, &spmin, &spmax);
+ out = allocate_graph_lines(nr_arrays * a->item_list_sz, &outsize, &spmin, &spmax);
}
if (action & F_MAIN) {
* possibly unregistered for all graphs.
*/
for (k = 0; k < a->item_list_sz; k++) {
- unregistered = outsize + k * 9 + 8;
+ unregistered = outsize + k * nr_arrays + 7;
if (*unregistered == FALSE) {
*unregistered = MAYBE;
}
/* Look for corresponding graph */
for (k = 0; k < a->item_list_sz; k++) {
- if ((sdc->major == *(spmax + k * 9 + 8)) &&
- (sdc->minor == *(spmin + k * 9 + 8)))
+ if ((sdc->major == *(spmax + k * nr_arrays + 7)) &&
+ (sdc->minor == *(spmin + k * nr_arrays + 7)))
/* 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 * 9 + 8) == -DBL_MAX)
+ if (*(spmax + k * nr_arrays + 7) == -DBL_MAX)
break;
}
if (k == a->item_list_sz) {
continue;
}
}
- pos = k * 9;
- unregistered = outsize + pos + 8;
+ pos = k * nr_arrays;
+ unregistered = outsize + pos + 7;
/*
* If current device was marked as previously unregistered,
}
*unregistered = FALSE;
- if (*(spmax + pos + 8) == -DBL_MAX) {
+ if (*(spmax + pos + 7) == -DBL_MAX) {
/* Save device major and minor numbers (if not already done) */
- *(spmax + pos + 8) = sdc->major;
- *(spmin + pos + 8) = sdc->minor;
+ *(spmax + pos + 7) = sdc->major;
+ *(spmin + pos + 7) = sdc->minor;
}
j = check_disk_reg(a, curr, !curr, i);
if (xds.await > *(spmax + pos + 5)) {
*(spmax + pos + 5) = xds.await;
}
- if (xds.svctm < *(spmin + pos + 6)) {
- *(spmin + pos + 6) = xds.svctm;
- }
- if (xds.svctm > *(spmax + pos + 6)) {
- *(spmax + pos + 6) = xds.svctm;
+ 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 + 7)) {
- *(spmax + pos + 7) = xds.util / 10.0;
+ if ((xds.util / 10.0) > *(spmax + pos + 6)) {
+ *(spmax + pos + 6) = xds.util / 10.0;
}
/* tps */
lnappend(record_hdr->ust_time - svg_p->ust_time_ref,
xds.await,
out + pos + 5, outsize + pos + 5, restart);
- /* svctm */
- lnappend(record_hdr->ust_time - svg_p->ust_time_ref,
- xds.svctm,
- 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 + 7, outsize + pos + 7, svg_p->dt);
+ out + pos + 6, outsize + pos + 6, svg_p->dt);
}
/* Mark devices not seen here as now unregistered */
for (k = 0; k < a->item_list_sz; k++) {
- unregistered = outsize + k * 9 + 8;
+ unregistered = outsize + k * nr_arrays + 7;
if (*unregistered != FALSE) {
*unregistered = TRUE;
}
for (i = 0; i < a->item_list_sz; i++) {
/* Check if there is something to display */
- pos = i * 9;
+ pos = i * nr_arrays;
if (!**(out + pos))
continue;
/* Get device name */
- item_name = get_sa_devname(*(spmax + pos + 8), *(spmin + pos + 8), flags);
+ item_name = get_sa_devname(*(spmax + pos + 7), *(spmin + pos + 7), flags);
if (draw_activity_graphs(a->g_nr, g_type,
title, g_title, item_name, group,