From 095e5ee2263cb88b55d612b43869be7d241c7f97 Mon Sep 17 00:00:00 2001 From: Ajaykumar Rajappa Date: Mon, 28 Jul 2025 07:37:16 +0200 Subject: [PATCH] ziomon/ziorep_config: Add port_id and failed attributes to -A option output MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update ziorep_config utility to extract and display the local fc_host port_id and failed /sysfs attributes when -A(adapter) option is used. $ ziorep_config -A Host: host0 PCHID: 0308 CHPID: 60 Adapter: 0.0.1927 Sub-Ch.: 0.0.0004 Name: 0xc05076fff38075d4 Port-Id: 0x33c016 P-Name: 0xc05076fff3803081 Version: 0x000b LIC: 0x24500103 Type: NPIV VPORT Speed: 32 Gbit State: Online Failed: No Signed-off-by: Ajaykumar Rajappa Reviewed-by: Chinmaya Kajagar Reviewed-by: Nihar Panda Signed-off-by: Jan Höppner --- ziomon/ziorep_config | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ziomon/ziorep_config b/ziomon/ziorep_config index 39d9cce9..cdfdf948 100755 --- a/ziomon/ziorep_config +++ b/ziomon/ziorep_config @@ -82,10 +82,13 @@ sub get_sub_ch_data $sub_ch{$adapter}{host} = $host; $sub_ch{$adapter}{speed} = get_line("speed"); $sub_ch{$adapter}{name} = get_line("port_name"); + $sub_ch{$adapter}{id} = get_line("port_id"); $sub_ch{$adapter}{pname} = get_line("permanent_port_name"); $sub_ch{$adapter}{type} = get_line("port_type"); $c_src = catdir($base_dir, S_DIR2, $sub_ch, $adapter); $sub_ch{$adapter}{lic} = get_line("lic_version"); + $sub_ch{$adapter}{faild} = get_line("failed") == 0 ? "No" : + "Yes"; $sub_ch{$adapter}{gen} = get_line("card_version"); $sub_ch{$adapter}{state} = get_line("online") == 1 ? "Online" : "Offline"; @@ -245,12 +248,14 @@ sub adapter_report push @out_str, "Adapter: $a\n"; push @out_str, "Sub-Ch.: $sub_ch{$a}{sub_ch}\n"; push @out_str, "Name: $sub_ch{$a}{name}\n"; + push @out_str, "Port-Id: $sub_ch{$a}{id}\n"; push @out_str, "P-Name: $sub_ch{$a}{pname}\n"; push @out_str, "Version: $sub_ch{$a}{gen}\n"; push @out_str, "LIC: $sub_ch{$a}{lic}\n"; push @out_str, "Type: $sub_ch{$a}{type}\n"; push @out_str, "Speed: $sub_ch{$a}{speed}\n"; push @out_str, "State: $sub_ch{$a}{state}\n"; + push @out_str, "Failed: $sub_ch{$a}{faild}\n"; print @out_str, "\n"; } }