From b223a2ceaae574a8648a0e30c2eb36f7d64dc9a0 Mon Sep 17 00:00:00 2001 From: Steve Kay Date: Tue, 7 Apr 2015 14:05:54 -0700 Subject: [PATCH] Add new activity "fc_act". --- activity.c | 37 +++++++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/activity.c b/activity.c index 2bf9390..c2e959b 100644 --- a/activity.c +++ b/activity.c @@ -1226,6 +1226,37 @@ struct activity filesystem_act = { .bitmap = NULL }; +/* Fibre Channel HBA usage activity */ +struct activity fc_act = { + .id = A_FC, + .options = AO_NULL, + .magic = ACTIVITY_MAGIC_BASE, + .group = G_DISK, +#ifdef SOURCE_SADC + .f_count_index = 10, /* wrap_get_hba_nr() */ + .f_count2 = NULL, + .f_read = wrap_read_hba, +#endif +#ifdef SOURCE_SAR + .f_print = print_fc_stats, + .f_print_avg = print_avg_hba_stats, +#endif +#ifdef SOURCE_SADF + .f_render = render_hba_stats, + .f_xml_print = xml_print_fc_stats, + .f_json_print = json_print_fc_stats, + .hdr_line = "FCHBA;hba_rxf/s;hba_txf/s;hba_rxw/s;hba_txw/s", + .name = "A_FC", +#endif + .nr = -1, + .nr2 = 1, + .fsize = STATS_FC_SIZE, + .msize = STATS_FC_SIZE, + .opt_flags = 0, + .buf = {NULL, NULL, NULL}, + .bitmap = NULL +}; + #ifdef SOURCE_SADC /* * Array of functions used to count number of items. @@ -1240,7 +1271,8 @@ __nr_t (*f_count[NR_F_COUNT]) (struct activity *) = { wrap_get_temp_nr, wrap_get_in_nr, wrap_get_usb_nr, - wrap_get_filesystem_nr + wrap_get_filesystem_nr, + wrap_get_hba_nr }; #endif @@ -1289,5 +1321,6 @@ struct activity *act[NR_ACT] = { &pwr_wghfreq_act, &pwr_usb_act, /* AO_CLOSE_MARKUP */ /* */ - &filesystem_act + &filesystem_act, + &fc_act }; -- 2.40.0