From 04267470b13e4f94d52fd2556e6f6bf6b0b3dcc7 Mon Sep 17 00:00:00 2001 From: Fedor Loshakov Date: Mon, 9 Dec 2024 14:50:35 +0100 Subject: [PATCH] ziomon/ziorep_utilization: swap Bus-ID and CHPID columns in virt report MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As virtual adapter report in ziorep_utilization represents utilization values of FCP devices, swap Bus-ID and CHPID columns in virtual adapter report to avoid confusion during evaluation. Also use print_delimiter() function instead of slash for Bus-ID and CHPID fields separation. Before patch virtual adapter report looks like: ... CHP Bus-ID |qdio util.%|queu|fail|-thp in MB/s-|I/O reqs-| ID max avg full erc rd wrt rd wrt 2020-05-14 14:00:41 60/0.0.1906 2.3 0.8 0 0 0.0 329.8 30 192K 61/0.0.1946 0.8 0.7 0 0 0.0 341.8 30 192K ... After patch application virtual adapter report looks like: ... Bus-ID |CHP|qdio util.%|queu|fail|-thp in MB/s-|I/O reqs-| ID max avg full erc rd wrt rd wrt 2020-05-14 14:00:41 0.0.1906 60 0.0 0.8 0 0 0.0 331.2 0 1.3K 0.0.1946 61 0.0 0.7 0 0 0.0 344.0 0 1.3K ... Note, that this patch does not change CSV-format report. Signed-off-by: Fedor Loshakov Reviewed-by: Steffen Maier Reviewed-by: Benjamin Block Reviewed-by: Sakshi Singh <005c7w@linux.ibm.com> Reviewed-by: M Nikhil Signed-off-by: Jan Höppner --- ziomon/ziorep_printers.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/ziomon/ziorep_printers.cpp b/ziomon/ziorep_printers.cpp index 98711987..f0825c52 100644 --- a/ziomon/ziorep_printers.cpp +++ b/ziomon/ziorep_printers.cpp @@ -451,10 +451,11 @@ void VirtAdapterPrinter::print_virt_adpt(FILE *fp, __u32 devno, fprintf(fp, "%x,%x.%x.%04x", m_cfg->get_chpid_by_devno(devno, rc), ZIOREP_BUSID_UNPACKED(devno)); - else - fprintf(fp, "%3x/%x.%x.%04x", - m_cfg->get_chpid_by_devno(devno, rc), - ZIOREP_BUSID_UNPACKED(devno)); + else { + fprintf(fp, "%x.%x.%04x", ZIOREP_BUSID_UNPACKED(devno)); + print_delimiter(fp); + fprintf(fp, "%3x", m_cfg->get_chpid_by_devno(devno, rc)); + } } void VirtAdapterPrinter::print_queue_fill(FILE *fp, @@ -548,8 +549,8 @@ void VirtAdapterPrinter::print_topline(FILE *fp) if (m_csv) fprintf(fp, "timestamp,aggregated,CHPID,Bus-ID,qdio utilization max %%,qdio utilization avg %%,queue full,fail erc,throughput read / MS/s,throughput write / MS/s,I/O requests read,I/O requests write\n"); else { - fprintf(fp, "CHP Bus-ID |qdio util.%%|queu|fail|-thp in MB/s-|I/O reqs-|\n"); - fprintf(fp, " ID max avg full erc rd wrt rd wrt\n"); + fprintf(fp, "Bus-ID |CHP|qdio util.%%|queu|fail|-thp in MB/s-|I/O reqs-|\n"); + fprintf(fp, " ID max avg full erc rd wrt rd wrt\n"); } }