diff --git a/CommonInstall/Makefile b/CommonInstall/Makefile index cf43ebc..c4c9ddd 100644 --- a/CommonInstall/Makefile +++ b/CommonInstall/Makefile @@ -96,10 +96,11 @@ CMD_TARGETS_MISC = CLEAN_TARGETS_MISC = CLEAN_TARGETS = $(OBJECTS) $(RSCOBJECTS) $(IDL_TARGETS) $(CLEAN_TARGETS_MISC) # other files to remove during clobber phase -CLOBBER_TARGETS_MISC= comp_ff_of_prereq_RHEL72.pl comp_ff_of_prereq_RHEL73.pl comp_ff_of_prereq_RHEL74.pl comp_ff_of_prereq_RHEL75.pl comp_ff_of_prereq_RHEL76.pl comp_ff_of_prereq_RHEL8.pl \ +CLOBBER_TARGETS_MISC= comp_ff_of_prereq_RHEL72.pl comp_ff_of_prereq_RHEL73.pl comp_ff_of_prereq_RHEL74.pl comp_ff_of_prereq_RHEL75.pl comp_ff_of_prereq_RHEL76.pl \ + comp_ff_of_prereq_RHEL77.pl comp_ff_of_prereq_RHEL8.pl \ comp_ff_of_prereq_SLES122.pl comp_ff_of_prereq_SLES123.pl comp_ff_of_prereq_SLES124.pl comp_ff_of_prereq_SLES15.pl comp_ff_of_prereq_SLES151.pl \ - comp_fm_prereq_RHEL72.pl comp_fm_prereq_RHEL73.pl comp_fm_prereq_RHEL74.pl comp_fm_prereq_RHEL75.pl comp_fm_prereq_RHEL76.pl comp_fm_prereq_RHEL8.pl \ - comp_fm_prereq_SLES122.pl comp_fm_prereq_SLES123.pl comp_fm_prereq_SLES124.pl comp_fm_prereq_SLES15.pl comp_fm_prereq_SLES151.pl + comp_fm_prereq_RHEL72.pl comp_fm_prereq_RHEL73.pl comp_fm_prereq_RHEL74.pl comp_fm_prereq_RHEL75.pl comp_fm_prereq_RHEL76.pl comp_fm_prereq_RHEL77.pl \ + comp_fm_prereq_RHEL8.pl comp_fm_prereq_SLES122.pl comp_fm_prereq_SLES123.pl comp_fm_prereq_SLES124.pl comp_fm_prereq_SLES15.pl comp_fm_prereq_SLES151.pl # sub-directory to install to within bin BIN_SUBDIR = # sub-directory to install to within include @@ -126,11 +127,11 @@ INCLUDE_SUBDIR = LOCALDEPLIBS = FF_FILES = comp_ff_of_prereq_RHEL72.pl comp_ff_of_prereq_RHEL73.pl comp_ff_of_prereq_RHEL74.pl \ - comp_ff_of_prereq_RHEL75.pl comp_ff_of_prereq_RHEL76.pl comp_ff_of_prereq_RHEL8.pl \ + comp_ff_of_prereq_RHEL75.pl comp_ff_of_prereq_RHEL76.pl comp_ff_of_prereq_RHEL77.pl comp_ff_of_prereq_RHEL8.pl \ comp_ff_of_prereq_SLES122.pl comp_ff_of_prereq_SLES123.pl comp_ff_of_prereq_SLES124.pl \ comp_ff_of_prereq_SLES15.pl comp_ff_of_prereq_SLES151.pl FM_FILES = comp_fm_prereq_RHEL72.pl comp_fm_prereq_RHEL73.pl comp_fm_prereq_RHEL74.pl \ - comp_fm_prereq_RHEL75.pl comp_fm_prereq_RHEL76.pl comp_fm_prereq_RHEL8.pl \ + comp_fm_prereq_RHEL75.pl comp_fm_prereq_RHEL76.pl comp_fm_prereq_RHEL77.pl comp_fm_prereq_RHEL8.pl \ comp_fm_prereq_SLES122.pl comp_fm_prereq_SLES123.pl comp_fm_prereq_SLES124.pl \ comp_fm_prereq_SLES15.pl comp_fm_prereq_SLES151.pl diff --git a/CommonInstall/comp_delta.pl b/CommonInstall/comp_delta.pl index 6da2387..46ef566 100755 --- a/CommonInstall/comp_delta.pl +++ b/CommonInstall/comp_delta.pl @@ -79,6 +79,7 @@ my @delta_kernel_srpms_rhel74 = ( 'kmod-ifs-kernel-updates' ); my @delta_kernel_srpms_rhel75 = ( 'kmod-ifs-kernel-updates' ); my @delta_kernel_srpms_rhel76 = ( 'kmod-ifs-kernel-updates' ); +my @delta_kernel_srpms_rhel77 = ( 'kmod-ifs-kernel-updates' ); my @delta_kernel_srpms_rhel8 = ( 'kmod-ifs-kernel-updates' ); my @delta_kernel_srpms = ( ); @@ -159,6 +160,8 @@ ($) } } elsif ( "$CUR_VENDOR_VER" eq "ES8" ) { @delta_kernel_srpms = ( @delta_kernel_srpms_rhel8 ); + } elsif ( "$CUR_VENDOR_VER" eq "ES77" ) { + @delta_kernel_srpms = ( @delta_kernel_srpms_rhel77 ); } elsif ( "$CUR_VENDOR_VER" eq "ES76" ) { @delta_kernel_srpms = ( @delta_kernel_srpms_rhel76 ); } elsif ( "$CUR_VENDOR_VER" eq "ES75" ) { @@ -789,6 +792,9 @@ () } elsif ( "$CUR_VENDOR_VER" eq "ES8" ) { return ( has_version_delta() && rpm_is_installed("kmod-ifs-kernel-updates", $CUR_OS_VER)); + } elsif ( "$CUR_VENDOR_VER" eq "ES77" ) { + return ( has_version_delta() + && rpm_is_installed("kmod-ifs-kernel-updates", $CUR_OS_VER)); } elsif ( "$CUR_VENDOR_VER" eq "ES76" ) { return ( has_version_delta() && rpm_is_installed("kmod-ifs-kernel-updates", $CUR_OS_VER)); @@ -896,6 +902,10 @@ ($$) return preinstall_delta("opa_stack", $install_list, $installing_list); } +my $arptbl_tunning = "ARPTABLE_TUNING"; +my $arptbl_tunning_desc = 'Adjust kernel ARP table size for large fabrics'; +AddAnswerHelp("$arptbl_tunning", "$arptbl_tunning_desc"); + sub install_opa_stack($$) { my $install_list = shift(); # total that will be installed when done @@ -924,7 +934,7 @@ ($$) check_config_dirs(); check_dir("/usr/lib/opa"); - prompt_opa_conf_param('ARPTABLE_TUNING', 'Adjust kernel ARP table size for large fabrics', "y", 'OPA_ARPTABLE_TUNING'); + prompt_opa_conf_param("$arptbl_tunning", "$arptbl_tunning_desc", "y", 'OPA_ARPTABLE_TUNING'); install_comp_rpms('opa_stack', " -U --nodeps ", $install_list); # rdma.conf values not directly associated with driver startup are left @@ -1094,6 +1104,9 @@ () } elsif ( "$CUR_VENDOR_VER" eq "ES76" ) { return (has_version_delta() && rpm_is_installed("kmod-ifs-kernel-updates", $CUR_OS_VER)); + } elsif ( "$CUR_VENDOR_VER" eq "ES77" ) { + return (has_version_delta() + && rpm_is_installed("kmod-ifs-kernel-updates", $CUR_OS_VER)); } elsif ( "$CUR_VENDOR_VER" eq "ES8" ) { return (has_version_delta() && rpm_is_installed("kmod-ifs-kernel-updates", $CUR_OS_VER)); @@ -1503,119 +1516,6 @@ ($$) $ComponentWasInstalled{'mpi_selector'}=0; } -# ========================================================================== -# OFA sandiashmem for gcc installation - -sub get_rpms_dir_sandiashmem($) -{ - my $package = shift(); - return get_rpms_dir_delta($package) -} - -sub available_sandiashmem() -{ - my $srcdir=$ComponentInfo{'sandiashmem'}{'SrcDir'}; - return ( -d "$srcdir/SRPMS" || -d "$srcdir/RPMS" ); -} - -sub installed_sandiashmem() -{ - return ((rpm_is_installed("sandia-openshmem_gcc_hfi", "user") - && has_version_delta())); -} - -# only called if installed_openshmem is true -sub installed_version_sandiashmem() -{ - if ( -e "$BASE_DIR/version_delta" ) { - return `cat $BASE_DIR/version_delta`; - } else { - return 'Unknown'; - } -} - -# only called if available_openshmem is true -sub media_version_sandiashmem() -{ - return media_version_delta(); -} - -sub build_sandiashmem($$$$) -{ - my $osver = shift(); - my $debug = shift(); # enable extra debug of build itself - my $build_temp = shift(); # temp area for use by build - my $force = shift(); # force a rebuild - return 0; # success -} - -sub need_reinstall_sandiashmem($$) -{ - my $install_list = shift(); # total that will be installed when done - my $installing_list = shift(); # what items are being installed/reinstalled - - return (need_reinstall_delta_comp('sandiashmem', $install_list, $installing_list)); -} - -sub preinstall_sandiashmem($$) -{ - my $install_list = shift(); # total that will be installed when done - my $installing_list = shift(); # what items are being installed/reinstalled - - return preinstall_delta("sandiashmem", $install_list, $installing_list); -} - -sub install_sandiashmem($$) -{ - my $install_list = shift(); # total that will be installed when done - my $installing_list = shift(); # what items are being installed/reinstalled - - print_comp_install_banner('sandiashmem'); - - # make sure any old potentially custom built versions of sandiashmem are uninstalled - rpm_uninstall_list2("any", " --nodeps ", 'silent', @{ $ComponentInfo{'sandiashmem'}{'UserRpms'}}); - my $rpmfile = rpm_resolve(delta_rpms_dir() . "/sandia-openshmem_gcc_hfi", "any"); - if ( "$rpmfile" ne "" && -e "$rpmfile" ) { - # try to remove existed SOS folders. Note this is the workaround for PR 144408. We shall remove the following - # code after we resolve the PR. - my @installed_pkgs = glob("/usr/shmem/gcc/sandia-openshmem-*-hfi"); - if (@installed_pkgs) { - foreach my $installed_pkg (@installed_pkgs) { - if (GetYesNo ("Remove $installed_pkg directory?", "y")) { - LogPrint "rm -rf $installed_pkg\n"; - system("rm -rf $installed_pkg"); - } - } - } - } - - install_comp_rpms('sandiashmem', " -U --nodeps ", $install_list); - - $ComponentWasInstalled{'sandiashmem'}=1; -} - -sub postinstall_sandiashmem($$) -{ - my $install_list = shift(); # total that will be installed when done - my $installing_list = shift(); # what items are being installed/reinstalled - #delta_restore_autostart('sandiashmem'); -} - -sub uninstall_sandiashmem($$) -{ - my $install_list = shift(); # total that will be left installed when done - my $uninstalling_list = shift(); # what items are being uninstalled - - print_comp_uninstall_banner('sandiashmem'); - uninstall_comp_rpms('sandiashmem', ' --nodeps ', $install_list, $uninstalling_list, 'verbose'); - $ComponentWasInstalled{'sandiashmem'}=0; -} - -sub check_os_prereqs_sandiashmem -{ - return rpm_check_os_prereqs("sandiashmem", "user"); -} - # ========================================================================== # OFA delta_debug installation diff --git a/CommonInstall/comp_delta_prereq_RHEL75.pl b/CommonInstall/comp_delta_prereq_RHEL75.pl index ff563ae..9bc57e0 100644 --- a/CommonInstall/comp_delta_prereq_RHEL75.pl +++ b/CommonInstall/comp_delta_prereq_RHEL75.pl @@ -70,6 +70,7 @@ "systemd", "numactl-libs", "irqbalance", + "libatomic", ); $comp_prereq_hash{'intel_hfi_prereq'} = \@intel_hfi_prereq; diff --git a/CommonInstall/comp_delta_prereq_RHEL76.pl b/CommonInstall/comp_delta_prereq_RHEL76.pl index c272ec2..8125735 100644 --- a/CommonInstall/comp_delta_prereq_RHEL76.pl +++ b/CommonInstall/comp_delta_prereq_RHEL76.pl @@ -69,6 +69,7 @@ "systemd", "numactl-libs", "irqbalance", + "libatomic", ); $comp_prereq_hash{'intel_hfi_prereq'} = \@intel_hfi_prereq; diff --git a/CommonInstall/comp_delta_prereq_RHEL77.pl b/CommonInstall/comp_delta_prereq_RHEL77.pl new file mode 100644 index 0000000..8125735 --- /dev/null +++ b/CommonInstall/comp_delta_prereq_RHEL77.pl @@ -0,0 +1,138 @@ +#!/usr/bin/perl +## BEGIN_ICS_COPYRIGHT8 **************************************** +# +# Copyright (c) 2015-2018, Intel Corporation +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, +# this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of Intel Corporation nor the names of its contributors +# may be used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +## END_ICS_COPYRIGHT8 **************************************** +# +## [ICS VERSION STRING: unknown] +#use strict; +##use Term::ANSIColor; +##use Term::ANSIColor qw(:constants); +##use File::Basename; +##use Math::BigInt; +# +## ========================================================================== +# +#Installation Prequisites array for delta components +my @opa_stack_prereq = ( + "bash", + "kernel", + "kmod", + "rdma-core", + "systemd", + "glibc", + "pciutils", + "opensm-libs", + "libibumad", + "rdma-core-devel", +); +$comp_prereq_hash{'opa_stack_prereq'} = \@opa_stack_prereq; + +my @mpi_selector_prereq = ( + "bash", + "coreutils", + "perl", + "perl-Getopt-Long", + "tcsh", +); +$comp_prereq_hash{'mpi_selector_prereq'} = \@mpi_selector_prereq; + +my @intel_hfi_prereq = ( + "bash", + "glibc", + "libgcc", + "python", + "systemd", + "numactl-libs", + "irqbalance", + "libatomic", +); +$comp_prereq_hash{'intel_hfi_prereq'} = \@intel_hfi_prereq; + +my @mvapich2_prereq = ( + "bash", + "libibverbs", + "librdmacm", + "glibc", + "zlib", + "sysfsutils", +); +$comp_prereq_hash{'mvapich2_prereq'} = \@mvapich2_prereq; + +my @openmpi_prereq = ( + "bash", + "glibc", + "libgcc", + "libgfortran", + "gcc-gfortran", + "libgomp", + "libibverbs", + "libquadmath", + "librdmacm", + "libstdc++", + "libstdc++-devel", + "opensm-libs", + "pkgconfig", + "zlib", +); +$comp_prereq_hash{'openmpi_prereq'} = \@openmpi_prereq; + +my @mvapich2_gcc_hfi_prereq = ( + "bash", + "zlib", + "glibc", +); +$comp_prereq_hash{'mvapich2_gcc_hfi_prereq'} = \@mvapich2_gcc_hfi_prereq; + +my @mvapich2_intel_hfi_prereq = ( + "bash", +); +$comp_prereq_hash{'mvapich2_intel_hfi_prereq'} = \@mvapich2_intel_hfi_prereq; + +my @openmpi_gcc_hfi_prereq = ( + "bash", + "glibc", + "infinipath-psm", + "libgcc", + "libgfortran", + "gcc-gfortran", + "libgomp", + "libibverbs", + "libquadmath", + "librdmacm", + "libstdc++", + "libstdc++-devel", + "opensm-libs", + "pkgconfig", + "zlib", +); +$comp_prereq_hash{'openmpi_gcc_hfi_prereq'} = \@openmpi_gcc_hfi_prereq; + +my @openmpi_intel_hfi_prereq = ( + "bash", +); +$comp_prereq_hash{'openmpi_intel_hfi_prereq'} = \@openmpi_intel_hfi_prereq; diff --git a/CommonInstall/comp_delta_prereq_SLES122.pl b/CommonInstall/comp_delta_prereq_SLES122.pl index de40e1b..7b44ffd 100644 --- a/CommonInstall/comp_delta_prereq_SLES122.pl +++ b/CommonInstall/comp_delta_prereq_SLES122.pl @@ -65,6 +65,7 @@ "libncurses5", "libnuma1", "irqbalance", + "libatomic1", ); $comp_prereq_hash{'intel_hfi_prereq'} = \@intel_hfi_prereq; diff --git a/CommonInstall/comp_delta_prereq_SLES123.pl b/CommonInstall/comp_delta_prereq_SLES123.pl index 5429543..29b1c1f 100644 --- a/CommonInstall/comp_delta_prereq_SLES123.pl +++ b/CommonInstall/comp_delta_prereq_SLES123.pl @@ -65,6 +65,7 @@ "libncurses5", "libnuma1", "irqbalance", + "libatomic1", ); $comp_prereq_hash{'intel_hfi_prereq'} = \@intel_hfi_prereq; diff --git a/CommonInstall/comp_delta_prereq_SLES124.pl b/CommonInstall/comp_delta_prereq_SLES124.pl index b4c6b1d..9fe4f42 100644 --- a/CommonInstall/comp_delta_prereq_SLES124.pl +++ b/CommonInstall/comp_delta_prereq_SLES124.pl @@ -65,6 +65,7 @@ "libncurses5", "libnuma1", "irqbalance", + "libatomic1", ); $comp_prereq_hash{'intel_hfi_prereq'} = \@intel_hfi_prereq; diff --git a/CommonInstall/comp_delta_prereq_SLES15.pl b/CommonInstall/comp_delta_prereq_SLES15.pl index 5886f3f..305f034 100644 --- a/CommonInstall/comp_delta_prereq_SLES15.pl +++ b/CommonInstall/comp_delta_prereq_SLES15.pl @@ -64,6 +64,7 @@ "libncurses6", "libnuma1", "irqbalance", + "libatomic1", ); $comp_prereq_hash{'intel_hfi_prereq'} = \@intel_hfi_prereq; diff --git a/CommonInstall/comp_ff_of_prereq_RHEL77.pl b/CommonInstall/comp_ff_of_prereq_RHEL77.pl new file mode 100644 index 0000000..af44df6 --- /dev/null +++ b/CommonInstall/comp_ff_of_prereq_RHEL77.pl @@ -0,0 +1,87 @@ +#!/usr/bin/perl +## BEGIN_ICS_COPYRIGHT8 **************************************** +# +# Copyright (c) 2015-2018, Intel Corporation +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, +# this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of Intel Corporation nor the names of its contributors +# may be used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +## END_ICS_COPYRIGHT8 **************************************** +# +## [ICS VERSION STRING: unknown] +#use strict; +##use Term::ANSIColor; +##use Term::ANSIColor qw(:constants); +##use File::Basename; +##use Math::BigInt; +# +## ========================================================================== +# +#Installation Prequisites array for fast fabric +#and of tools component +my @oftools_prereq = ( + "glibc", + "libgcc", + "libibumad", + "libibverbs", + "libstdc++", + "ibacm", + "rdma-core", +); +$comp_prereq_hash{'oftools_prereq'} = \@oftools_prereq; + +my @fastfabric_prereq = ( + "atlas", + "bash", + "bc", + "expat", + "expect", + "glibc", + "libgcc", + "libibumad", + "libibverbs", + "libstdc++", + "ncurses-libs", + "openssl-libs", + "perl", + "perl-Getopt-Long", + "perl-Socket", + "rdma-core", + "tcl", + "zlib", +); +$comp_prereq_hash{'fastfabric_prereq'} = \@fastfabric_prereq; + +my @opamgt_sdk_prereq = ( + "bash", + "glibc", + "libgcc", + "libibumad", + "libibverbs", + "libstdc++", + "openssl", + "openssl-devel", + "openssl-libs", + "rdma-core-devel", +); +$comp_prereq_hash{'opamgt_sdk_prereq'} = \@opamgt_sdk_prereq; diff --git a/CommonInstall/comp_ff_of_prereq_RHEL77.pl.base b/CommonInstall/comp_ff_of_prereq_RHEL77.pl.base new file mode 100644 index 0000000..af44df6 --- /dev/null +++ b/CommonInstall/comp_ff_of_prereq_RHEL77.pl.base @@ -0,0 +1,87 @@ +#!/usr/bin/perl +## BEGIN_ICS_COPYRIGHT8 **************************************** +# +# Copyright (c) 2015-2018, Intel Corporation +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, +# this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of Intel Corporation nor the names of its contributors +# may be used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +## END_ICS_COPYRIGHT8 **************************************** +# +## [ICS VERSION STRING: unknown] +#use strict; +##use Term::ANSIColor; +##use Term::ANSIColor qw(:constants); +##use File::Basename; +##use Math::BigInt; +# +## ========================================================================== +# +#Installation Prequisites array for fast fabric +#and of tools component +my @oftools_prereq = ( + "glibc", + "libgcc", + "libibumad", + "libibverbs", + "libstdc++", + "ibacm", + "rdma-core", +); +$comp_prereq_hash{'oftools_prereq'} = \@oftools_prereq; + +my @fastfabric_prereq = ( + "atlas", + "bash", + "bc", + "expat", + "expect", + "glibc", + "libgcc", + "libibumad", + "libibverbs", + "libstdc++", + "ncurses-libs", + "openssl-libs", + "perl", + "perl-Getopt-Long", + "perl-Socket", + "rdma-core", + "tcl", + "zlib", +); +$comp_prereq_hash{'fastfabric_prereq'} = \@fastfabric_prereq; + +my @opamgt_sdk_prereq = ( + "bash", + "glibc", + "libgcc", + "libibumad", + "libibverbs", + "libstdc++", + "openssl", + "openssl-devel", + "openssl-libs", + "rdma-core-devel", +); +$comp_prereq_hash{'opamgt_sdk_prereq'} = \@opamgt_sdk_prereq; diff --git a/CommonInstall/comp_fm_prereq_RHEL77.pl b/CommonInstall/comp_fm_prereq_RHEL77.pl new file mode 100644 index 0000000..a166489 --- /dev/null +++ b/CommonInstall/comp_fm_prereq_RHEL77.pl @@ -0,0 +1,53 @@ +#!/usr/bin/perl +## BEGIN_ICS_COPYRIGHT8 **************************************** +# +# Copyright (c) 2015-2018, Intel Corporation +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, +# this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of Intel Corporation nor the names of its contributors +# may be used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +## END_ICS_COPYRIGHT8 **************************************** +# +## [ICS VERSION STRING: unknown] +#use strict; +##use Term::ANSIColor; +##use Term::ANSIColor qw(:constants); +##use File::Basename; +##use Math::BigInt; +# +## ========================================================================== +# +#Installation Prequisites array for opafm +my @opafm_prereq = ( + "bash", + "expat", + "glibc", + "libibumad", + "libibverbs", + "openssl-libs", + "rdma-core", + "systemd", + "zlib", +); +$comp_prereq_hash{'opafm_prereq'} = \@opafm_prereq; + diff --git a/CommonInstall/comp_fm_prereq_RHEL77.pl.base b/CommonInstall/comp_fm_prereq_RHEL77.pl.base new file mode 100644 index 0000000..a166489 --- /dev/null +++ b/CommonInstall/comp_fm_prereq_RHEL77.pl.base @@ -0,0 +1,53 @@ +#!/usr/bin/perl +## BEGIN_ICS_COPYRIGHT8 **************************************** +# +# Copyright (c) 2015-2018, Intel Corporation +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, +# this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of Intel Corporation nor the names of its contributors +# may be used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +## END_ICS_COPYRIGHT8 **************************************** +# +## [ICS VERSION STRING: unknown] +#use strict; +##use Term::ANSIColor; +##use Term::ANSIColor qw(:constants); +##use File::Basename; +##use Math::BigInt; +# +## ========================================================================== +# +#Installation Prequisites array for opafm +my @opafm_prereq = ( + "bash", + "expat", + "glibc", + "libibumad", + "libibverbs", + "openssl-libs", + "rdma-core", + "systemd", + "zlib", +); +$comp_prereq_hash{'opafm_prereq'} = \@opafm_prereq; + diff --git a/CommonInstall/do_openmpi_build.sh b/CommonInstall/do_openmpi_build.sh index e7aea1a..9563d12 100755 --- a/CommonInstall/do_openmpi_build.sh +++ b/CommonInstall/do_openmpi_build.sh @@ -632,7 +632,7 @@ logfile=make.openmpi.$interface.$compiler --define '_usr $STACK_PREFIX' \ --define 'ofed 0' \ --define '_prefix $MPICH_PREFIX' \ - --define '_defaultdocdir $MPICH_PREFIX' \ + --define '_defaultdocdir $MPICH_PREFIX/doc/..' \ --define '_mandir %{_prefix}/share/man' \ --define 'mflags -j 4' \ --define 'configure_options $CONFIG_OPTIONS $openmpi_ldflags --with-verbs=$STACK_PREFIX --with-verbs-libdir=$STACK_PREFIX/$openmpi_lib $openmpi_comp_env $openmpi_conf_psm --with-devel-headers --disable-oshmem' \ diff --git a/CommonInstall/main_omnipathwrap_delta.pl b/CommonInstall/main_omnipathwrap_delta.pl index f84b431..94c7840 100644 --- a/CommonInstall/main_omnipathwrap_delta.pl +++ b/CommonInstall/main_omnipathwrap_delta.pl @@ -56,7 +56,7 @@ "delta_ipoib", "opafm", "opamgt_sdk", "mvapich2_gcc_hfi", "mvapich2_intel_hfi", "openmpi_gcc_hfi", "openmpi_intel_hfi", - "openmpi_gcc_cuda_hfi", "sandiashmem", + "openmpi_gcc_cuda_hfi", "mvapich2_gcc", "openmpi_gcc", #"mpiRest", "mpisrc", "delta_debug" ); @@ -80,6 +80,8 @@ @OmniPathAllComponents ); my @Components_rhel76 = ( "opa_stack", "mpi_selector", @OmniPathAllComponents ); +my @Components_rhel77 = ( "opa_stack", "mpi_selector", + @OmniPathAllComponents ); my @Components_rhel8 = ( "opa_stack", "mpi_selector", @OmniPathAllComponents ); @@ -282,25 +284,6 @@ StartupScript => "", StartupParams => [ ] }, - "sandiashmem" => { Name => "Sandia-OpenSHMEM ", - DefaultInstall => $State_Install, - SrcDir => file_glob("./IntelOPA-OFA_DELTA.*"), - PreReq => " opa_stack intel_hfi ", CoReq => "", -# TBD - should IsOFA be 0? - Hidden => 0, Disabled => 0, IsOFA => 1, - KernelRpms => [ ], - FirmwareRpms => [ ], - UserRpms => [ "sandia-openshmem_gcc_hfi", - "sandia-openshmem_gcc_hfi-devel", - "sandia-openshmem_gcc_hfi-tests" - ], - DebugRpms => [ ], - HasStart => 0, HasFirmware => 0, DefaultStart => 0, - StartPreReq => "", - StartComponents => [ ], - StartupScript => "", - StartupParams => [ ] - }, "openmpi_gcc_cuda_hfi" =>{ Name => "OpenMPI (cuda,gcc)", DefaultInstall => $State_Install, SrcDir => file_glob ("./OFA_MPIS.*"), @@ -1042,7 +1025,6 @@ "rdma_ndd" => 0, "delta_srp" => 0, "delta_srpt" => 0, - "sandiashmem" => 0, ); # check whether we support HFI2 @@ -1140,6 +1122,14 @@ sub init_components %opa_stack_dev_comp_info, %opa_stack_rhel_comp_info, ); + } elsif ( "$CUR_VENDOR_VER" eq "ES77" ) { + @Components = ( @Components_rhel77 ); + @SubComponents = ( @SubComponents_newer ); + %ComponentInfo = ( %ComponentInfo, %ibacm_comp_info, + %intel_hfi_comp_info, + %opa_stack_dev_comp_info, + %opa_stack_rhel_comp_info, + ); } elsif ( "$CUR_VENDOR_VER" eq "ES8" ) { @Components = ( @Components_rhel8 ); @SubComponents = ( @SubComponents_newer ); @@ -1406,8 +1396,6 @@ sub translate_comp return ( "mvapich2_gcc_hfi","openmpi_gcc_hfi"); } elsif ("$arg" eq "psm_mpi"){ return ( "mvapich2_gcc_hfi","openmpi_gcc_hfi"); - } elsif ("$arg" eq "pgas"){ - return ( "sandiashmem" ); } elsif ("$arg" eq "delta_mpisrc"){ return ( "mpisrc" ); # legacy # no ibaccess argument equivalent for: diff --git a/CommonInstall/overrides_delta.pl b/CommonInstall/overrides_delta.pl index ef75a31..e7c6ceb 100644 --- a/CommonInstall/overrides_delta.pl +++ b/CommonInstall/overrides_delta.pl @@ -41,57 +41,50 @@ my @delta_Components_rhel72 = ( "opa_stack", "ibacm", "mpi_selector", "intel_hfi", "opa_stack_dev", "delta_ipoib", - "sandiashmem", "delta_debug", ); my @delta_Components_sles12_sp2 = ( "opa_stack", "intel_hfi", "opa_stack_dev", "delta_ipoib", - "sandiashmem", "delta_debug", ); my @delta_Components_rhel73 = ( "opa_stack", "mpi_selector", "intel_hfi", "opa_stack_dev", "delta_ipoib", - "sandiashmem", "delta_debug", ); my @delta_Components_sles12_sp3 = ( "opa_stack", "intel_hfi", "opa_stack_dev", "delta_ipoib", - "sandiashmem", "delta_debug", ); my @delta_Components_sles12_sp4 = ( "opa_stack", "intel_hfi", "opa_stack_dev", "delta_ipoib", - "sandiashmem", "delta_debug", ); my @delta_Components_rhel74 = ( "opa_stack", "mpi_selector", "intel_hfi", "opa_stack_dev", "delta_ipoib", - "sandiashmem", "delta_debug", ); my @delta_Components_rhel75 = ( "opa_stack", "mpi_selector", "intel_hfi", "opa_stack_dev", "delta_ipoib", - "sandiashmem", "delta_debug", ); my @delta_Components_rhel76 = ( "opa_stack", "mpi_selector", "intel_hfi", "opa_stack_dev", "delta_ipoib", - "sandiashmem", + "delta_debug", ); +my @delta_Components_rhel77 = ( "opa_stack", "mpi_selector", "intel_hfi", + "opa_stack_dev", + "delta_ipoib", "delta_debug", ); my @delta_Components_rhel8 = ( "opa_stack", "mpi_selector", "intel_hfi", "opa_stack_dev", "delta_ipoib", - "sandiashmem", "delta_debug", ); my @delta_Components_sles15 = ( "opa_stack", "intel_hfi", "opa_stack_dev", "delta_ipoib", - "sandiashmem", "delta_debug", ); my @delta_Components_sles15_sp1 = ( "opa_stack", "intel_hfi", "opa_stack_dev", "delta_ipoib", - "sandiashmem", "delta_debug", ); @Components = ( ); @@ -121,6 +114,8 @@ () @Components = ( @delta_Components_rhel75 ); } elsif ( "$CUR_VENDOR_VER" eq "ES76" ) { @Components = ( @delta_Components_rhel76 ); + } elsif ( "$CUR_VENDOR_VER" eq "ES77" ) { + @Components = ( @delta_Components_rhel77 ); } elsif ( "$CUR_VENDOR_VER" eq "ES8" ) { @Components = ( @delta_Components_rhel8 ); } elsif ( "$CUR_VENDOR_VER" eq "ES15" ) { diff --git a/CommonInstall/util_basicio.pl b/CommonInstall/util_basicio.pl index 116448f..7bcd513 100755 --- a/CommonInstall/util_basicio.pl +++ b/CommonInstall/util_basicio.pl @@ -188,7 +188,7 @@ ($$) my($answer) = 0; if ( $Default_Prompt ) { - NormalPrint "$Question -> $default\n"; + NormalPrint "$Question ->$default\n"; if ( "$default" eq "y") { return 1; } elsif ("$default" eq "n") { diff --git a/CommonInstall/util_configfile.pl b/CommonInstall/util_configfile.pl index 56d9312..8ed527a 100755 --- a/CommonInstall/util_configfile.pl +++ b/CommonInstall/util_configfile.pl @@ -541,7 +541,7 @@ ($$$$;$) } else { $prompt="$parameterDesc ($parameter)"; } - if (GetYesNo("Enable $prompt?", $default) == 1) { + if (GetYesNoWithMemory($parameter, 0, "Enable $prompt?", $default) == 1) { $value="yes"; $env_value=1; } else { diff --git a/CommonInstall/util_ifcfg.pl b/CommonInstall/util_ifcfg.pl index 403a083..d847b5e 100755 --- a/CommonInstall/util_ifcfg.pl +++ b/CommonInstall/util_ifcfg.pl @@ -348,12 +348,19 @@ ($$$) system $SysCmd; # SLES11 and newer have IPOIB_MODE option in ifcfg - $SysCmd = "echo \"IPOIB_MODE='connected'\" >> $target"; - DebugPrint("cmd '$SysCmd'\n"); - system $SysCmd; - $SysCmd = "echo \"MTU=65520\" >> $target"; - DebugPrint("cmd '$SysCmd'\n"); - system $SysCmd; + if ( "$CUR_VENDOR_VER" eq "ES123" ) { + $SysCmd = "echo \"IPOIB_MODE='connected'\" >> $target"; + DebugPrint("cmd '$SysCmd'\n"); + system $SysCmd; + $SysCmd = "echo \"MTU=65520\" >> $target"; + DebugPrint("cmd '$SysCmd'\n"); + system $SysCmd; + } else { + $SysCmd = "echo \"IPOIB_MODE='datagram'\" >> $target"; + DebugPrint("cmd '$SysCmd'\n"); + system $SysCmd; + NormalPrint "Note: IPoIB Mode is Datagram\n"; + } } else { # Append the device instance name $SysCmd = "echo DEVICE=$device > $target"; @@ -398,12 +405,13 @@ ($$$) DebugPrint("cmd '$SysCmd'\n"); system $SysCmd; - $SysCmd = "echo CONNECTED_MODE=yes >> $target"; - DebugPrint("cmd '$SysCmd'\n"); - system $SysCmd; - $SysCmd = "echo MTU=65520 >> $target"; + $SysCmd = "echo CONNECTED_MODE=no >> $target"; DebugPrint("cmd '$SysCmd'\n"); system $SysCmd; +# $SysCmd = "echo MTU=65520 >> $target"; +# DebugPrint("cmd '$SysCmd'\n"); +# system $SysCmd; + NormalPrint "Note: IPoIB Mode is Datagram\n"; } system "chown $OWNER $target"; diff --git a/CommonInstall/util_init.pl b/CommonInstall/util_init.pl index 9c329c2..7768ac4 100755 --- a/CommonInstall/util_init.pl +++ b/CommonInstall/util_init.pl @@ -219,7 +219,11 @@ ($) if (!system("grep -qi centos /etc/redhat-release")) { $rval = `cat /etc/redhat-release | cut -d' ' -f4`; $rval =~ m/(\d+).(\d+)/; - $rval="ES".$1.$2; + if ($2 eq "0") { + $rval="ES".$1; + } else { + $rval="ES".$1.$2; + } } } } elsif ($vendor eq "apple") { diff --git a/CommonInstall/util_linuxconfig.pl b/CommonInstall/util_linuxconfig.pl index 9f88250..e80ff0f 100755 --- a/CommonInstall/util_linuxconfig.pl +++ b/CommonInstall/util_linuxconfig.pl @@ -190,17 +190,21 @@ () if ( -d '/dev') { $cmd = $DRACUT_EXE_FILE; } - my $kver = `uname -r | xargs echo -n`; #name of initramfs may vary between distros, so need to get it from lsinitrd - my ($current_initrd) = `lsinitrd` =~ m/(?:Image: \/boot\/)((?:[0-9]|[a-z]|[\._\+\-])+)/o; - my $tmpfile = "/tmp/$current_initrd"; + my $current_initrd = `lsinitrd 2>&1 | head -n 1`; + my ($initrd_prefix) = $current_initrd =~ m/\/boot\/(\w+)-[\w\-\.]+.*/; + my $initrd_suffix = ""; + if ($current_initrd =~ m/\.img[':]/) { + $initrd_suffix = ".img"; + } + my $tmpfile = "/tmp/$initrd_prefix-$CUR_OS_VER$initrd_suffix"; if ( -e $cmd ) { do { - NormalPrint("Rebuilding boot image with \"$cmd -f\"..."); + NormalPrint("Rebuilding boot image with \"$cmd -f $tmpfile $CUR_OS_VER\"...\n"); # Try to build a temporary image first as a dry-run to make sure # a failed run will not destroy an existing image. - if (system("$cmd -f $tmpfile") == 0 && system("mv -f $tmpfile /boot/") == 0) { + if (system("$cmd -f $tmpfile $CUR_OS_VER") == 0 && system("mv -f $tmpfile /boot/") == 0) { NormalPrint("New initramfs installed in /boot.\n"); NormalPrint("done.\n"); return; diff --git a/Esm/ib/include/fm_xml.h b/Esm/ib/include/fm_xml.h index 53c699b..641d3a3 100644 --- a/Esm/ib/include/fm_xml.h +++ b/Esm/ib/include/fm_xml.h @@ -1136,6 +1136,12 @@ typedef struct _PmThresholdsExceededMsgLimitXmlConfig { uint32_t Routing; } PmThresholdsExceededMsgLimitXmlConfig_t; +typedef struct _PmSweepErrorInfoThresholds { + uint32_t Integrity; + uint32_t Security; + uint32_t Routing; +} PmSweepErrorInfoThresholds_t; + // Pm IntegrityWeights typedef struct _PmIntegrityWeightsXmlConfig { uint8_t LocalLinkIntegrityErrors; @@ -1187,6 +1193,7 @@ typedef struct _PMXmlConfig { uint8_t Clear8bit; uint8_t process_hfi_counters; uint8_t process_vl_counters; + uint8_t process_errorinfo; uint32_t MaxRetries; uint32_t RcvWaitInterval; uint32_t MinRcvWaitInterval; @@ -1239,6 +1246,8 @@ typedef struct _PMXmlConfig { PmThresholdsExceededMsgLimitXmlConfig_t thresholdsExceededMsgLimit; + PmSweepErrorInfoThresholds_t errorinfo_thresholds; + } PMXmlConfig_t; // FE configuration diff --git a/Esm/ib/include/hsm_com_srvr_api.h b/Esm/ib/include/hsm_com_srvr_api.h index 029899e..d241bb2 100644 --- a/Esm/ib/include/hsm_com_srvr_api.h +++ b/Esm/ib/include/hsm_com_srvr_api.h @@ -1,4 +1,4 @@ -/* BEGIN_ICS_COPYRIGHT2 **************************************** +/* BEGIN_ICS_COPYRIGHT2 **************************************** Copyright (c) 2015, Intel Corporation @@ -25,127 +25,127 @@ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * ** END_ICS_COPYRIGHT2 ****************************************/ - -#ifndef HSM_COM_SRVR_API -#define HSM_COM_SRVR_API - -/* TODO: - Define message structure? - Define callback - provide to server_init or server_start - Define error callback - ditto - Define error structure - -*/ - - - -#ifndef IN -#define IN -#endif /* #ifndef IN */ - -#ifndef OUT -#define OUT -#endif /* #ifndef OUT */ - -#ifndef OPTIONAL -#define OPTIONAL -#endif /* #ifndef OPTIONAL */ - -#define HSM_COM_API_MAX_DATA 1024 - - -// C++ wrapper -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -// Error codes -typedef enum{ - HSM_COM_ERR_LEN, - HSM_COM_ERR_VERSION, - HSM_COM_ERR_DISC, - HSM_COM_TEST = -1, - HSM_COM_OK = 0, - HSM_COM_ERROR = 1, - HSM_COM_NO_RESOURCES = 2, - HSM_COM_NO_MEM, - HSM_COM_PATH_ERR, - HSM_COM_BAD, - HSM_COM_BIND_ERR, - HSM_COM_SOCK_ERR, - HSM_COM_CHMOD_ERR, - HSM_COM_CONX_ERR, - HSM_COM_SEND_ERR, - HSM_COM_NOT_CONNECTED, - HSM_COM_LISTEN_ERR, - HSM_COM_MAX_ERROR_NUM -}hsm_com_errno_t; - - -typedef enum{ - HSM_METH_GET = 1, - HSM_METH_SET, - HSM_METH_RSP, -}hsm_com_method_t; - -// Session structures (opaque) -typedef struct _hsm_com_server_hdl *p_hsm_com_server_hdl_t; -typedef struct _hsm_com_client_hdl *p_hsm_com_client_hdl_t; -typedef struct _hsm_com_stream_hdl *p_hsm_com_stream_hdl_t; - -typedef struct hsm_com_datagram_s{ - int data_len; - int buf_size; - char *buf; -}hsm_com_datagram_t; - -// Server Data callback function -// Note: data is IN/OUT. -typedef hsm_com_errno_t (*hsm_com_callback_func)(hsm_com_datagram_t *data); - -// Server Error callback function -typedef void (*hsm_com_err_callback_func)(hsm_com_errno_t err); - - -hsm_com_errno_t -hcom_server_init -( - OUT p_hsm_com_server_hdl_t *p_hdl, - IN char *socket_path, - IN int max_conx, - IN int max_data_len, - IN hsm_com_callback_func callback -); - - -hsm_com_errno_t -hcom_server_terminate -( - IN p_hsm_com_server_hdl_t p_hdl -); - - - -hsm_com_errno_t -hcom_server_start -( - IN p_hsm_com_server_hdl_t p_hdl -); - - -hsm_com_errno_t -hcom_server_stop -( - IN p_hsm_com_server_hdl_t p_hdl -); - - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /*HSM_COM_SRVR_API*/ - + * ** END_ICS_COPYRIGHT2 ****************************************/ + +#ifndef HSM_COM_SRVR_API +#define HSM_COM_SRVR_API + +/* TODO: + Define message structure? + Define callback - provide to server_init or server_start + Define error callback - ditto + Define error structure + +*/ + + + +#ifndef IN +#define IN +#endif /* #ifndef IN */ + +#ifndef OUT +#define OUT +#endif /* #ifndef OUT */ + +#ifndef OPTIONAL +#define OPTIONAL +#endif /* #ifndef OPTIONAL */ + +#define HSM_COM_API_MAX_DATA 1024 + + +// C++ wrapper +#ifdef __cplusplus +extern "C" +{ +#endif /* __cplusplus */ + +// Error codes +typedef enum{ + HSM_COM_ERR_LEN, + HSM_COM_ERR_VERSION, + HSM_COM_ERR_DISC, + HSM_COM_TEST = -1, + HSM_COM_OK = 0, + HSM_COM_ERROR = 1, + HSM_COM_NO_RESOURCES = 2, + HSM_COM_NO_MEM, + HSM_COM_PATH_ERR, + HSM_COM_BAD, + HSM_COM_BIND_ERR, + HSM_COM_SOCK_ERR, + HSM_COM_CHMOD_ERR, + HSM_COM_CONX_ERR, + HSM_COM_SEND_ERR, + HSM_COM_NOT_CONNECTED, + HSM_COM_LISTEN_ERR, + HSM_COM_MAX_ERROR_NUM +}hsm_com_errno_t; + + +typedef enum{ + HSM_METH_GET = 1, + HSM_METH_SET, + HSM_METH_RSP, +}hsm_com_method_t; + +// Session structures (opaque) +typedef struct _hsm_com_server_hdl *p_hsm_com_server_hdl_t; +typedef struct _hsm_com_client_hdl *p_hsm_com_client_hdl_t; +typedef struct _hsm_com_stream_hdl *p_hsm_com_stream_hdl_t; + +typedef struct hsm_com_datagram_s{ + int data_len; + int buf_size; + char *buf; +}hsm_com_datagram_t; + +// Server Data callback function +// Note: data is IN/OUT. +typedef hsm_com_errno_t (*hsm_com_callback_func)(hsm_com_datagram_t *data); + +// Server Error callback function +typedef void (*hsm_com_err_callback_func)(hsm_com_errno_t err); + + +hsm_com_errno_t +hcom_server_init +( + OUT p_hsm_com_server_hdl_t *p_hdl, + IN char *socket_path, + IN int max_conx, + IN int max_data_len, + IN hsm_com_callback_func callback +); + + +hsm_com_errno_t +hcom_server_terminate +( + IN p_hsm_com_server_hdl_t p_hdl +); + + + +hsm_com_errno_t +hcom_server_start +( + IN p_hsm_com_server_hdl_t p_hdl +); + + +hsm_com_errno_t +hcom_server_stop +( + IN p_hsm_com_server_hdl_t p_hdl +); + + + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /*HSM_COM_SRVR_API*/ + diff --git a/Esm/ib/include/hsm_config_srvr_api.h b/Esm/ib/include/hsm_config_srvr_api.h index d14853c..1368061 100644 --- a/Esm/ib/include/hsm_config_srvr_api.h +++ b/Esm/ib/include/hsm_config_srvr_api.h @@ -27,686 +27,686 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * ** END_ICS_COPYRIGHT2 ****************************************/ -#ifndef HSM_CONFIG_SRVR_API -#define HSM_CONFIG_SRVR_API - -#include "hsm_com_srvr_api.h" -#ifdef __LINUX__ -#include -#include -#else -#ifndef uint64_t -#define uint64_t unsigned long long -#endif -#endif - -#ifndef IN -#define IN -#endif /* #ifndef IN */ - -#ifndef OUT -#define OUT -#endif /* #ifndef OUT */ - -#ifndef OPTIONAL -#define OPTIONAL -#endif /* #ifndef OPTIONAL */ - - - -typedef struct _fm_config_conx_hdl *p_fm_config_conx_hdlt; - - -typedef enum fm_mgr_type_s{ - FM_MGR_NONE = 0, - FM_MGR_SM = 0x0001, - FM_MGR_PM = 0x0002, - FM_MGR_FE = 0x0004, -}fm_mgr_type_t; - -typedef enum{ - FM_CONF_ERR_LEN = -4, - FM_CONF_ERR_VERSION = -3, - FM_CONF_ERR_DISC = -2, - FM_CONF_TEST = -1, - FM_CONF_OK = 0, - FM_CONF_ERROR = 1, - FM_CONF_NO_RESOURCES = 2, - FM_CONF_NO_MEM, - FM_CONF_PATH_ERR, - FM_CONF_BAD, - FM_CONF_BIND_ERR, - FM_CONF_SOCK_ERR, - FM_CONF_CHMOD_ERR, - FM_CONF_CONX_ERR, - FM_CONF_SEND_ERR, - FM_CONF_INIT_ERR, - FM_CONF_NO_RESP, - FM_CONF_ALLOC_ERR, - FM_CONF_MAX_ERROR_NUM -}fm_mgr_config_errno_t; - -typedef enum{ - FM_ACT_NONE = 0, - FM_ACT_GET, // Get selected attributes - FM_ACT_SET, // Set appropriate attributes - FM_ACT_RSP, // Response - FM_ACT_SUP_GET, // Query which attributes are supported - FM_ACT_SUP_SET, // Query which attributes are supported - FM_ACT_GET_NEXT // Get next logical row in table -}fm_mgr_action_t; - - -typedef enum{ - FM_RET_BAD_RET_LEN = -1, - FM_RET_OK = 0, - FM_RET_DT_NOT_SUPPORTED, // Datatype is not supported - FM_RET_ACT_NOT_SUPPORTED, // Action is not supported for this datatype - FM_RET_INVALID, // Data is invalid. - FM_RET_BAD_LEN, // Data is an invalid length - FM_RET_BUSY, // Server busy, try again later. - FM_RET_UNKNOWN_DT, // Data type is not recognized. - FM_RET_NOT_FOUND, // Object not found - FM_RET_NO_NEXT, // No next entry in table - FM_RET_NOT_MASTER, // SM is not master and cannot perform requested operation - FM_RET_NOSUCHOBJECT, - FM_RET_NOSUCHINSTANCE, - FM_RET_ENDOFMIBVIEW, - FM_RET_ERR_NOERROR, - FM_RET_ERR_TOOBIG, - FM_RET_ERR_NOSUCHNAME, - FM_RET_ERR_BADVALUE, - FM_RET_ERR_READONLY, - FM_RET_ERR_GENERR, - FM_RET_ERR_NOACCESS, - FM_RET_ERR_WRONGTYPE, - FM_RET_ERR_WRONGLENGTH, - FM_RET_ERR_WRONGENCODING, - FM_RET_ERR_WRONGVALUE, - FM_RET_ERR_NOCREATION, - FM_RET_ERR_INCONSISTENTVALUE, - FM_RET_ERR_RESOURCEUNAVAILABLE, - FM_RET_ERR_COMMITFAILED, - FM_RET_ERR_UNDOFAILED, - FM_RET_ERR_AUTHORIZATIONERROR, - FM_RET_ERR_NOTWRITABLE, - FM_RET_END_OF_TABLE, - FM_RET_INTERNAL_ERR, - FM_RET_CONX_CLOSED, - FM_RET_TIMEOUT -}fm_msg_ret_code_t; - - -typedef enum{ - FM_DT_NONE = 0, - FM_DT_COMMON, - FM_DT_BM_CFG, - FM_DT_PM_CFG, - FM_DT_FE_CFG, - FM_DT_SM_CFG, - FM_DT_SM_PKEY, - FM_DT_SM_MC, - FM_DT_SM_STATUS, - FM_DT_PM_STATUS, - FM_DT_BM_STATUS, - FM_DT_FE_STATUS, - FM_DT_SM_NODE_INFO, - FM_DT_SM_PORT_INFO, - FM_DT_SM_SWITCH_INFO, - FM_DT_SM_MCAST_GRP_INFO, - FM_DT_SM_MCAST_REC_INFO, - FM_DT_SM_SM_INFO, - FM_DT_SM_LINK_INFO, - FM_DT_SM_SERV_INFO, - FM_DT_SM_GUID_INFO, - FM_DT_LOG_LEVEL, - FM_DT_DEBUG_TOGGLE, - FM_DT_RMPP_DEBUG_TOGGLE, - FM_DT_FORCE_SWEEP, - FM_DT_SM_PERF_DEBUG_TOGGLE, - FM_DT_SA_PERF_DEBUG_TOGGLE, - FM_DT_SM_LOOP_TEST_FAST_MODE_START, - FM_DT_SM_LOOP_TEST_START, - FM_DT_SM_LOOP_TEST_STOP, - FM_DT_SM_LOOP_TEST_FAST, - FM_DT_SM_LOOP_TEST_INJECT_PACKETS, - FM_DT_SM_LOOP_TEST_INJECT_ATNODE, - FM_DT_SM_LOOP_TEST_INJECT_EACH_SWEEP, - FM_DT_SM_LOOP_TEST_PATH_LEN, - FM_DT_SM_LOOP_TEST_MIN_ISL_REDUNDANCY, - FM_DT_SM_LOOP_TEST_SHOW_PATHS, - FM_DT_SM_LOOP_TEST_SHOW_LFTS, - FM_DT_SM_LOOP_TEST_SHOW_TOPO, - FM_DT_SM_LOOP_TEST_SHOW_CONFIG, - FM_DT_SM_RESTORE_PRIORITY, - FM_DT_SM_GET_COUNTERS, - FM_DT_SM_RESET_COUNTERS, - FM_DT_SM_DUMP_STATE, - FM_DT_BM_RESTORE_PRIORITY, - FM_DT_PM_RESTORE_PRIORITY, - FM_DT_SM_FORCE_REBALANCE_TOGGLE, - FM_DT_PM_GET_COUNTERS, - FM_DT_PM_RESET_COUNTERS, - FM_DT_LOG_MODE, - FM_DT_LOG_MASK, - FM_DT_SM_BROADCAST_XML_CONFIG, - FM_DT_SM_GET_ADAPTIVE_ROUTING, - FM_DT_SM_SET_ADAPTIVE_ROUTING, - FM_DT_SM_FORCE_ATTRIBUTE_REWRITE, - FM_DT_SM_SKIP_ATTRIBUTE_WRITE, +#ifndef HSM_CONFIG_SRVR_API +#define HSM_CONFIG_SRVR_API + +#include "hsm_com_srvr_api.h" +#ifdef __LINUX__ +#include +#include +#else +#ifndef uint64_t +#define uint64_t unsigned long long +#endif +#endif + +#ifndef IN +#define IN +#endif /* #ifndef IN */ + +#ifndef OUT +#define OUT +#endif /* #ifndef OUT */ + +#ifndef OPTIONAL +#define OPTIONAL +#endif /* #ifndef OPTIONAL */ + + + +typedef struct _fm_config_conx_hdl *p_fm_config_conx_hdlt; + + +typedef enum fm_mgr_type_s{ + FM_MGR_NONE = 0, + FM_MGR_SM = 0x0001, + FM_MGR_PM = 0x0002, + FM_MGR_FE = 0x0004, +}fm_mgr_type_t; + +typedef enum{ + FM_CONF_ERR_LEN = -4, + FM_CONF_ERR_VERSION = -3, + FM_CONF_ERR_DISC = -2, + FM_CONF_TEST = -1, + FM_CONF_OK = 0, + FM_CONF_ERROR = 1, + FM_CONF_NO_RESOURCES = 2, + FM_CONF_NO_MEM, + FM_CONF_PATH_ERR, + FM_CONF_BAD, + FM_CONF_BIND_ERR, + FM_CONF_SOCK_ERR, + FM_CONF_CHMOD_ERR, + FM_CONF_CONX_ERR, + FM_CONF_SEND_ERR, + FM_CONF_INIT_ERR, + FM_CONF_NO_RESP, + FM_CONF_ALLOC_ERR, + FM_CONF_MAX_ERROR_NUM +}fm_mgr_config_errno_t; + +typedef enum{ + FM_ACT_NONE = 0, + FM_ACT_GET, // Get selected attributes + FM_ACT_SET, // Set appropriate attributes + FM_ACT_RSP, // Response + FM_ACT_SUP_GET, // Query which attributes are supported + FM_ACT_SUP_SET, // Query which attributes are supported + FM_ACT_GET_NEXT // Get next logical row in table +}fm_mgr_action_t; + + +typedef enum{ + FM_RET_BAD_RET_LEN = -1, + FM_RET_OK = 0, + FM_RET_DT_NOT_SUPPORTED, // Datatype is not supported + FM_RET_ACT_NOT_SUPPORTED, // Action is not supported for this datatype + FM_RET_INVALID, // Data is invalid. + FM_RET_BAD_LEN, // Data is an invalid length + FM_RET_BUSY, // Server busy, try again later. + FM_RET_UNKNOWN_DT, // Data type is not recognized. + FM_RET_NOT_FOUND, // Object not found + FM_RET_NO_NEXT, // No next entry in table + FM_RET_NOT_MASTER, // SM is not master and cannot perform requested operation + FM_RET_NOSUCHOBJECT, + FM_RET_NOSUCHINSTANCE, + FM_RET_ENDOFMIBVIEW, + FM_RET_ERR_NOERROR, + FM_RET_ERR_TOOBIG, + FM_RET_ERR_NOSUCHNAME, + FM_RET_ERR_BADVALUE, + FM_RET_ERR_READONLY, + FM_RET_ERR_GENERR, + FM_RET_ERR_NOACCESS, + FM_RET_ERR_WRONGTYPE, + FM_RET_ERR_WRONGLENGTH, + FM_RET_ERR_WRONGENCODING, + FM_RET_ERR_WRONGVALUE, + FM_RET_ERR_NOCREATION, + FM_RET_ERR_INCONSISTENTVALUE, + FM_RET_ERR_RESOURCEUNAVAILABLE, + FM_RET_ERR_COMMITFAILED, + FM_RET_ERR_UNDOFAILED, + FM_RET_ERR_AUTHORIZATIONERROR, + FM_RET_ERR_NOTWRITABLE, + FM_RET_END_OF_TABLE, + FM_RET_INTERNAL_ERR, + FM_RET_CONX_CLOSED, + FM_RET_TIMEOUT +}fm_msg_ret_code_t; + + +typedef enum{ + FM_DT_NONE = 0, + FM_DT_COMMON, + FM_DT_BM_CFG, + FM_DT_PM_CFG, + FM_DT_FE_CFG, + FM_DT_SM_CFG, + FM_DT_SM_PKEY, + FM_DT_SM_MC, + FM_DT_SM_STATUS, + FM_DT_PM_STATUS, + FM_DT_BM_STATUS, + FM_DT_FE_STATUS, + FM_DT_SM_NODE_INFO, + FM_DT_SM_PORT_INFO, + FM_DT_SM_SWITCH_INFO, + FM_DT_SM_MCAST_GRP_INFO, + FM_DT_SM_MCAST_REC_INFO, + FM_DT_SM_SM_INFO, + FM_DT_SM_LINK_INFO, + FM_DT_SM_SERV_INFO, + FM_DT_SM_GUID_INFO, + FM_DT_LOG_LEVEL, + FM_DT_DEBUG_TOGGLE, + FM_DT_RMPP_DEBUG_TOGGLE, + FM_DT_FORCE_SWEEP, + FM_DT_SM_PERF_DEBUG_TOGGLE, + FM_DT_SA_PERF_DEBUG_TOGGLE, + FM_DT_SM_LOOP_TEST_FAST_MODE_START, + FM_DT_SM_LOOP_TEST_START, + FM_DT_SM_LOOP_TEST_STOP, + FM_DT_SM_LOOP_TEST_FAST, + FM_DT_SM_LOOP_TEST_INJECT_PACKETS, + FM_DT_SM_LOOP_TEST_INJECT_ATNODE, + FM_DT_SM_LOOP_TEST_INJECT_EACH_SWEEP, + FM_DT_SM_LOOP_TEST_PATH_LEN, + FM_DT_SM_LOOP_TEST_MIN_ISL_REDUNDANCY, + FM_DT_SM_LOOP_TEST_SHOW_PATHS, + FM_DT_SM_LOOP_TEST_SHOW_LFTS, + FM_DT_SM_LOOP_TEST_SHOW_TOPO, + FM_DT_SM_LOOP_TEST_SHOW_CONFIG, + FM_DT_SM_RESTORE_PRIORITY, + FM_DT_SM_GET_COUNTERS, + FM_DT_SM_RESET_COUNTERS, + FM_DT_SM_DUMP_STATE, + FM_DT_BM_RESTORE_PRIORITY, + FM_DT_PM_RESTORE_PRIORITY, + FM_DT_SM_FORCE_REBALANCE_TOGGLE, + FM_DT_PM_GET_COUNTERS, + FM_DT_PM_RESET_COUNTERS, + FM_DT_LOG_MODE, + FM_DT_LOG_MASK, + FM_DT_SM_BROADCAST_XML_CONFIG, + FM_DT_SM_GET_ADAPTIVE_ROUTING, + FM_DT_SM_SET_ADAPTIVE_ROUTING, + FM_DT_SM_FORCE_ATTRIBUTE_REWRITE, + FM_DT_SM_SKIP_ATTRIBUTE_WRITE, FM_DT_PAUSE_SWEEPS, FM_DT_RESUME_SWEEPS, -}fm_datatype_t; - -typedef struct fm_error_map_s{ - int err_set; - fm_msg_ret_code_t map[64]; -}fm_error_map_t; - - -/* The current error map is copied to the pointer provided */ -fm_mgr_config_errno_t -fm_mgr_config_get_error_map -( - IN p_fm_config_conx_hdlt hdl, - OUT fm_error_map_t *error_map -); - -fm_mgr_config_errno_t -fm_mgr_config_clear_error_map -( - IN p_fm_config_conx_hdlt hdl -); - - -fm_mgr_config_errno_t -fm_mgr_config_get_error_map_entry -( - IN p_fm_config_conx_hdlt hdl, - IN uint64_t mask, - OUT fm_mgr_config_errno_t *error_code -); - -fm_mgr_config_errno_t -fm_mgr_config_set_error_map_entry -( - IN p_fm_config_conx_hdlt hdl, - IN uint64_t mask, - IN fm_mgr_config_errno_t error_code -); - - - - - - -#define CFG_COM_SEL_DEVICE 0x0001 -#define CFG_COM_SEL_PORT 0x0002 -#define CFG_COM_SEL_DEBUG 0x0004 -#define CFG_COM_SEL_POOL_SIZE 0x0008 -#define CFG_COM_SEL_NODAEMON 0x0010 -#define CFG_COM_SEL_LOG_LEVEL 0x0020 -#define CFG_COM_SEL_DBG_RMPP 0x0040 -#define CFG_COM_SEL_LOG_FILTER 0x0080 -#define CFG_COM_SEL_LOG_MASK 0x0100 -#define CFG_COM_SEL_LOG_FILE 0x0200 - -#define CFG_COM_SEL_ALL 0xFFFF - -// Common query routines. -typedef struct fm_config_common_s{ - uint64_t select_mask; - int32_t device; - int32_t port; - int debug; - unsigned long pool_size; - int nodaemon; // NOTE: READ-ONLY - int log_level; - int debug_rmpp; - int log_filter; - int log_mask; - char log_file[256]; -}fm_config_common_t; - -#define CFG_BM_SEL_BKEY 0x0001 -#define CFG_BM_SEL_BKEY_LEASE 0x0002 -#define CFG_BM_SEL_PRIORITY 0x0004 -#define CFG_BM_SEL_TIMER 0x0008 - -#define CFG_BM_SEL_ALL 0xFFFF - -typedef struct bm_config_s{ - uint64_t select_mask; - unsigned char bkey[8]; - int32_t bkey_lease; - unsigned priority; - unsigned timer; -}bm_config_t; - - -#define CFG_FE_SEL_LISTEN 0x0001 -#define CFG_FE_SEL_LOGIN 0x0002 -#define CFG_FE_SEL_PRIORITY 0x0004 - -#define CFG_FE_SEL_ALL 0xFFFF - -typedef struct fe_config_s{ - uint64_t select_mask; - unsigned listen; - unsigned login; - unsigned priority; -}fe_config_t; - - -#define CFG_PM_SEL_PRIORITY 0x0001 -#define CFG_PM_SEL_TIMER 0x0002 - -#define CFG_PM_SEL_ALL 0xFFFF - - -typedef struct pm_config_s{ - uint64_t select_mask; - int32_t priority; - unsigned timer; -}pm_config_t; - -#define CFG_SM_SEL_KEY 0x0001 -#define CFG_SM_SEL_PRIORITY 0x0002 -#define CFG_SM_SEL_TIMER 0x0004 -#define CFG_SM_SEL_MAX_RETRY 0x0008 -#define CFG_SM_SEL_RCV_WAIT_MSEC 0x0010 -#define CFG_SM_SEL_SW_LFTIME 0x0020 -#define CFG_SM_SEL_HOQ_LIFE 0x0040 -#define CFG_SM_SEL_VL_STALL 0x0080 -#define CFG_SM_SEL_SA_RESP_TIME 0x0100 -#define CFG_SM_SEL_SA_PKT_LIFETIME 0x0200 -#define CFG_SM_SEL_LID 0x0400 -#define CFG_SM_SEL_LMC 0x0800 -#define CFG_SM_SEL_PKEY_SUPPORT 0x1000 -#define CFG_SM_SEL_MKEY 0x2000 - -#define CFG_SM_SEL_ALL 0xFFFF - - -typedef struct sm_config_s{ - uint64_t select_mask; - unsigned char key[8]; - int32_t priority; - unsigned timer; - unsigned max_retries; - unsigned rcv_wait_msec; - unsigned switch_lifetime; - unsigned hoq_life; - unsigned vl_stall; - unsigned sa_resp_time; - unsigned sa_packet_lifetime; - unsigned lid; - unsigned lmc; - unsigned pkey_support; - unsigned char mkey[8]; -}sm_config_t; - -// Note: Select mask here indicates the pkey index. -typedef struct sm_pkey_s{ - uint64_t select_mask; - unsigned long pkey[32]; -}sm_pkey_t; - -#define CFG_SM_MC_SEL_CREATE 0x0001 -#define CFG_SM_MC_SEL_PKEY 0x0002 -#define CFG_SM_MC_SEL_MTU 0x0004 -#define CFG_SM_MC_SEL_RATE 0x0008 -#define CFG_SM_MC_SEL_SL 0x0010 - -#define CFG_SM_MC_SEL_ALL 0xFFFF - -typedef struct sm_mc_group_s{ - uint64_t select_mask; - unsigned create; - unsigned pkey; - unsigned mtu; - unsigned rate; - unsigned sl; -}sm_mc_group_t; - - -#define CFG_SM_STATUS_STATE 0x0001 -#define CFG_SM_STATUS_UPTIME 0x0002 -#define CFG_SM_STATUS_MASTER 0x0004 - -#define CFG_SM_STATUS_SEL_ALL 0xFFFF - -typedef struct fm_sm_status_s{ - uint64_t select_mask; - unsigned status; - int32_t uptime; - unsigned master; -}fm_sm_status_t; - -#define CFG_PM_STATUS_STATE 0x0001 -#define CFG_PM_STATUS_UPTIME 0x0002 -#define CFG_PM_STATUS_MASTER 0x0004 - -#define CFG_PM_STATUS_SEL_ALL 0xFFFF - -typedef struct fm_pm_status_s{ - uint64_t select_mask; - unsigned status; - unsigned long uptime; - unsigned master; -}fm_pm_status_t; - -#define CFG_FE_STATUS_STATE 0x0001 -#define CFG_FE_STATUS_UPTIME 0x0002 -#define CFG_FE_STATUS_MASTER 0x0004 - -#define CFG_FE_STATUS_SEL_ALL 0xFFFF - -typedef struct fm_fe_status_s{ - uint64_t select_mask; - unsigned status; - unsigned long uptime; - unsigned master; -}fm_fe_status_t; - -#define CFG_BM_STATUS_STATE 0x0001 -#define CFG_BM_STATUS_UPTIME 0x0002 -#define CFG_BM_STATUS_MASTER 0x0004 - -#define CFG_BM_STATUS_SEL_ALL 0xFFFF - -typedef struct fm_bm_status_s{ - uint64_t select_mask; - unsigned status; - unsigned long uptime; - unsigned master; -}fm_bm_status_t; - -typedef struct fm_sm_node_info_s{ - uint64_t select_mask; - unsigned char ibSmNodeInfoSubnetPrefix[8]; - unsigned char ibSmNodeInfoNodeGUID[8]; - unsigned long ibSmNodeInfoBaseVersion; - unsigned long ibSmNodeInfoClassVersion; - long ibSmNodeInfoType; - unsigned long ibSmNodeInfoNumPorts; - unsigned char ibSmNodeInfoSystemImageGUID[8]; - unsigned long ibSmNodeInfoPartitionCap; - unsigned char ibSmNodeInfoDeviceID[2]; - unsigned char ibSmNodeInfoRevision[4]; - unsigned char ibSmNodeInfoVendorID[3]; - char ibSmNodeInfoDescription[256]; -}fm_sm_node_info_t; - - -typedef struct fm_sm_port_info_s{ - uint64_t select_mask; - char ibSmPortInfoSubnetPrefix[8]; - char ibSmPortInfoNodeGUID[8]; - unsigned long ibSmPortInfoLocalPortNum; - char ibSmPortInfoMKey[8]; - char ibSmPortInfoGIDPrefix[8]; - unsigned long ibSmPortInfoLID; - unsigned long ibSmPortInfoMasterSmLID; - char ibSmPortInfoCapMask[4]; - char ibSmPortInfoDiagCode[2]; - unsigned long ibSmPortInfoMKeyLeasePeriod; - unsigned long ibSmPortInfoLinkWidthEnabled; - unsigned long ibSmPortInfoLinkWidthSupported; - unsigned long ibSmPortInfoLinkWidthActive; - unsigned long ibSmPortInfoLinkSpeedSupported; - unsigned long ibSmPortInfoState; - unsigned long ibSmPortInfoPhyState; - unsigned long ibSmPortInfoLinkDownDefState; - unsigned long ibSmPortInfoMKeyProtBits; - unsigned long ibSmPortInfoLMC; - unsigned long ibSmPortInfoLinkSpeedActive; - unsigned long ibSmPortInfoLinkSpeedEnabled; - long ibSmPortInfoNeighborMTU; - unsigned long ibSmPortInfoMasterSmSL; - unsigned long ibSmPortInfoVLCap; - unsigned long ibSmPortInfoVLHighLimit; - unsigned long ibSmPortInfoVLArbHighCap; - unsigned long ibSmPortInfoVLArbLowCap; - long ibSmPortInfoMTUCap; - unsigned long ibSmPortInfoVLStallCount; - unsigned long ibSmPortInfoHOQLife; - unsigned long ibSmPortInfoOperVL; - long ibSmPortInfoInPartEnforce; - long ibSmPortInfoOutPartEnforce; - long ibSmPortInfoInFilterRawPktEnf; - long ibSmPortInfoOutFilterRawPktEnf; - unsigned long ibSmPortInfoMKeyViolation; - unsigned long ibSmPortInfoPKeyViolation; - unsigned long ibSmPortInfoQKeyViolation; - unsigned long ibSmPortInfoGUIDCap; - unsigned long ibSmPortInfoSubnetTimeout; - unsigned long ibSmPortInfoRespTime; - unsigned long ibSmPortInfoLocalPhyError; - unsigned long ibSmPortInfoOverrunError; - char ibSmPortInfoInitType; - char ibSmPortInfoInitTypeReply; -}fm_sm_port_info_t; - -typedef struct fm_sm_switch_info_s{ - uint64_t select_mask; - char ibSmSwitchInfoSubnetPrefix[8]; - char ibSmSwitchInfoNodeGUID[8]; - unsigned long ibSmSwitchInfoLinearFdbCap; - unsigned long ibSmSwitchInfoRandomFdbCap; - unsigned long ibSmSwitchInfoMcastFdbCap; - unsigned long ibSmSwitchInfoLinearFdbTop; - unsigned long ibSmSwitchInfoDefaultPort; - unsigned long ibSmSwitchInfoDefPriMcastPort; - unsigned long ibSmSwitchInfoDefNonPriMcastPort; - unsigned long ibSmSwitchInfoLifeTimeValue; - unsigned long ibSmSwitchInfoPortStateChange; - unsigned long ibSmSwitchInfoLIDsPerPort; - unsigned long ibSmSwitchInfoPartitionEnfCap; - long ibSmSwitchInfoInEnfCap; - long ibSmSwitchInfoOutEnfCap; - long ibSmSwitchInfoInFilterRawPktCap; - long ibSmSwitchInfoOutFilterRawPktCap; - long ibSmSwitchInfoEnhanced0; -}fm_sm_switch_info_t; - -typedef struct fm_sm_guid_info_s{ - uint64_t select_mask; - char ibSmGUIDInfoSubnetPrefix[8]; - char ibSmGUIDInfoNodeGUID[8]; - unsigned long ibSmGUIDInfoPortNum; - unsigned long ibSmGUIDInfoBlockNum; - char ibSmGUIDInfoBlock[255]; - -}fm_sm_guid_info_t; - -typedef struct fm_sm_link_info_s{ - uint64_t select_mask; - char ibSmLinkSubnetPrefix[8]; - char ibSmLinkFromNodeGUID[8]; - unsigned long ibSmLinkFromPortNum; - char ibSmLinkToNodeGUID[8]; - unsigned long ibSmLinkToPortNum; -}fm_sm_link_info_t; - -typedef struct fm_sm_mcast_group_info_s{ - uint64_t select_mask; - unsigned char ibSmMcastGroupSubnetPrefix[8]; - unsigned char ibSmMcastGroupMGID[16]; - unsigned char ibSmMcastGroupQKey[2]; - unsigned long ibSmMcastGroupMLID; - long ibSmMcastGroupMTU; - unsigned long ibSmMcastGroupTClass; - unsigned long ibSmMcastGroupPKey; - unsigned long ibSmMcastGroupRate; - unsigned long ibSmMcastGroupPacketLifeTime; - unsigned long ibSmMcastGroupSL; - unsigned char ibSmMcastGroupFlowLabel[3]; - unsigned long ibSmMcastGroupHopLimit; - unsigned long ibSmMcastGroupScope; -}fm_sm_mcast_group_info_t; - -typedef struct fm_sm_mcast_member_info_s{ - uint64_t select_mask; - char ibSmMcastMemberSubnetPrefix[8]; - char ibSmMcastMemberMGID[16]; - long ibSmMcastMemberVectorIndex; - char ibSmMcastMemberVector[255]; - long ibSmMcastMemberVectorSize; - long ibSmMcastMemberVectorElementSize; - unsigned long ibSmMcastMemberLastChange; - -}fm_sm_mcast_member_info_t; - -typedef struct fm_sm_service_info_s{ - uint64_t select_mask; - unsigned char ibSmServiceSubnetPrefix[8]; - unsigned char ibSmServiceID[8]; - unsigned char ibSmServiceGID[16]; - unsigned long ibSmServicePKey; - unsigned long ibSmServiceLease; - unsigned char ibSmServiceKey[16]; - char ibSmServiceName[256]; - unsigned char ibSmServiceData[128]; -}fm_sm_service_info_t; - - -fm_mgr_config_errno_t -fm_mgr_simple_query -( - IN p_fm_config_conx_hdlt hdl, - IN fm_mgr_action_t action, - IN fm_datatype_t data_type_id, - IN fm_mgr_type_t mgr, - IN int data_len, - OUT void *data, - OUT fm_msg_ret_code_t *ret_code -); - -// init -fm_mgr_config_errno_t -fm_mgr_config_init -( - OUT p_fm_config_conx_hdlt *p_hdl, - IN int instance, - OPTIONAL IN char *rem_address, - OPTIONAL IN char *community -); - - -// connect -fm_mgr_config_errno_t -fm_mgr_config_connect -( - IN p_fm_config_conx_hdlt p_hdl -); - - -fm_mgr_config_errno_t -fm_mgr_commong_cfg_query -( - IN p_fm_config_conx_hdlt hdl, - IN fm_mgr_type_t mgr, - IN fm_mgr_action_t action, - OUT fm_config_common_t *info, - OUT fm_msg_ret_code_t *ret_code -); - - -fm_mgr_config_errno_t -fm_mgr_bm_cfg_query -( - IN p_fm_config_conx_hdlt hdl, - IN fm_mgr_action_t action, - OUT bm_config_t *info, - OUT fm_msg_ret_code_t *ret_code -); - - -fm_mgr_config_errno_t -fm_mgr_fe_cfg_query -( - IN p_fm_config_conx_hdlt hdl, - IN fm_mgr_action_t action, - OUT fe_config_t *info, - OUT fm_msg_ret_code_t *ret_code -); - -fm_mgr_config_errno_t -fm_mgr_pm_cfg_query -( - IN p_fm_config_conx_hdlt hdl, - IN fm_mgr_action_t action, - OUT pm_config_t *info, - OUT fm_msg_ret_code_t *ret_code -); - - - -fm_mgr_config_errno_t -fm_mgr_sm_cfg_query -( - IN p_fm_config_conx_hdlt hdl, - IN fm_mgr_action_t action, - OUT sm_config_t *info, - OUT fm_msg_ret_code_t *ret_code -); - -fm_mgr_config_errno_t -fm_sm_status_query -( - IN p_fm_config_conx_hdlt hdl, - IN fm_mgr_action_t action, - OUT fm_sm_status_t *info, - OUT fm_msg_ret_code_t *ret_code -); - -fm_mgr_config_errno_t -fm_pm_status_query -( - IN p_fm_config_conx_hdlt hdl, - IN fm_mgr_action_t action, - OUT fm_pm_status_t *info, - OUT fm_msg_ret_code_t *ret_code -); - -fm_mgr_config_errno_t -fm_bm_status_query -( - IN p_fm_config_conx_hdlt hdl, - IN fm_mgr_action_t action, - OUT fm_bm_status_t *info, - OUT fm_msg_ret_code_t *ret_code -); - -fm_mgr_config_errno_t -fm_fe_status_query -( - IN p_fm_config_conx_hdlt hdl, - IN fm_mgr_action_t action, - OUT fm_fe_status_t *info, - OUT fm_msg_ret_code_t *ret_code -); - -const char* -fm_mgr_get_error_str -( - IN fm_mgr_config_errno_t err -); - -const char* -fm_mgr_get_resp_error_str -( - IN fm_msg_ret_code_t err -); - - - - - - - - - - -#endif +}fm_datatype_t; + +typedef struct fm_error_map_s{ + int err_set; + fm_msg_ret_code_t map[64]; +}fm_error_map_t; + + +/* The current error map is copied to the pointer provided */ +fm_mgr_config_errno_t +fm_mgr_config_get_error_map +( + IN p_fm_config_conx_hdlt hdl, + OUT fm_error_map_t *error_map +); + +fm_mgr_config_errno_t +fm_mgr_config_clear_error_map +( + IN p_fm_config_conx_hdlt hdl +); + + +fm_mgr_config_errno_t +fm_mgr_config_get_error_map_entry +( + IN p_fm_config_conx_hdlt hdl, + IN uint64_t mask, + OUT fm_mgr_config_errno_t *error_code +); + +fm_mgr_config_errno_t +fm_mgr_config_set_error_map_entry +( + IN p_fm_config_conx_hdlt hdl, + IN uint64_t mask, + IN fm_mgr_config_errno_t error_code +); + + + + + + +#define CFG_COM_SEL_DEVICE 0x0001 +#define CFG_COM_SEL_PORT 0x0002 +#define CFG_COM_SEL_DEBUG 0x0004 +#define CFG_COM_SEL_POOL_SIZE 0x0008 +#define CFG_COM_SEL_NODAEMON 0x0010 +#define CFG_COM_SEL_LOG_LEVEL 0x0020 +#define CFG_COM_SEL_DBG_RMPP 0x0040 +#define CFG_COM_SEL_LOG_FILTER 0x0080 +#define CFG_COM_SEL_LOG_MASK 0x0100 +#define CFG_COM_SEL_LOG_FILE 0x0200 + +#define CFG_COM_SEL_ALL 0xFFFF + +// Common query routines. +typedef struct fm_config_common_s{ + uint64_t select_mask; + int32_t device; + int32_t port; + int debug; + unsigned long pool_size; + int nodaemon; // NOTE: READ-ONLY + int log_level; + int debug_rmpp; + int log_filter; + int log_mask; + char log_file[256]; +}fm_config_common_t; + +#define CFG_BM_SEL_BKEY 0x0001 +#define CFG_BM_SEL_BKEY_LEASE 0x0002 +#define CFG_BM_SEL_PRIORITY 0x0004 +#define CFG_BM_SEL_TIMER 0x0008 + +#define CFG_BM_SEL_ALL 0xFFFF + +typedef struct bm_config_s{ + uint64_t select_mask; + unsigned char bkey[8]; + int32_t bkey_lease; + unsigned priority; + unsigned timer; +}bm_config_t; + + +#define CFG_FE_SEL_LISTEN 0x0001 +#define CFG_FE_SEL_LOGIN 0x0002 +#define CFG_FE_SEL_PRIORITY 0x0004 + +#define CFG_FE_SEL_ALL 0xFFFF + +typedef struct fe_config_s{ + uint64_t select_mask; + unsigned listen; + unsigned login; + unsigned priority; +}fe_config_t; + + +#define CFG_PM_SEL_PRIORITY 0x0001 +#define CFG_PM_SEL_TIMER 0x0002 + +#define CFG_PM_SEL_ALL 0xFFFF + + +typedef struct pm_config_s{ + uint64_t select_mask; + int32_t priority; + unsigned timer; +}pm_config_t; + +#define CFG_SM_SEL_KEY 0x0001 +#define CFG_SM_SEL_PRIORITY 0x0002 +#define CFG_SM_SEL_TIMER 0x0004 +#define CFG_SM_SEL_MAX_RETRY 0x0008 +#define CFG_SM_SEL_RCV_WAIT_MSEC 0x0010 +#define CFG_SM_SEL_SW_LFTIME 0x0020 +#define CFG_SM_SEL_HOQ_LIFE 0x0040 +#define CFG_SM_SEL_VL_STALL 0x0080 +#define CFG_SM_SEL_SA_RESP_TIME 0x0100 +#define CFG_SM_SEL_SA_PKT_LIFETIME 0x0200 +#define CFG_SM_SEL_LID 0x0400 +#define CFG_SM_SEL_LMC 0x0800 +#define CFG_SM_SEL_PKEY_SUPPORT 0x1000 +#define CFG_SM_SEL_MKEY 0x2000 + +#define CFG_SM_SEL_ALL 0xFFFF + + +typedef struct sm_config_s{ + uint64_t select_mask; + unsigned char key[8]; + int32_t priority; + unsigned timer; + unsigned max_retries; + unsigned rcv_wait_msec; + unsigned switch_lifetime; + unsigned hoq_life; + unsigned vl_stall; + unsigned sa_resp_time; + unsigned sa_packet_lifetime; + unsigned lid; + unsigned lmc; + unsigned pkey_support; + unsigned char mkey[8]; +}sm_config_t; + +// Note: Select mask here indicates the pkey index. +typedef struct sm_pkey_s{ + uint64_t select_mask; + unsigned long pkey[32]; +}sm_pkey_t; + +#define CFG_SM_MC_SEL_CREATE 0x0001 +#define CFG_SM_MC_SEL_PKEY 0x0002 +#define CFG_SM_MC_SEL_MTU 0x0004 +#define CFG_SM_MC_SEL_RATE 0x0008 +#define CFG_SM_MC_SEL_SL 0x0010 + +#define CFG_SM_MC_SEL_ALL 0xFFFF + +typedef struct sm_mc_group_s{ + uint64_t select_mask; + unsigned create; + unsigned pkey; + unsigned mtu; + unsigned rate; + unsigned sl; +}sm_mc_group_t; + + +#define CFG_SM_STATUS_STATE 0x0001 +#define CFG_SM_STATUS_UPTIME 0x0002 +#define CFG_SM_STATUS_MASTER 0x0004 + +#define CFG_SM_STATUS_SEL_ALL 0xFFFF + +typedef struct fm_sm_status_s{ + uint64_t select_mask; + unsigned status; + int32_t uptime; + unsigned master; +}fm_sm_status_t; + +#define CFG_PM_STATUS_STATE 0x0001 +#define CFG_PM_STATUS_UPTIME 0x0002 +#define CFG_PM_STATUS_MASTER 0x0004 + +#define CFG_PM_STATUS_SEL_ALL 0xFFFF + +typedef struct fm_pm_status_s{ + uint64_t select_mask; + unsigned status; + unsigned long uptime; + unsigned master; +}fm_pm_status_t; + +#define CFG_FE_STATUS_STATE 0x0001 +#define CFG_FE_STATUS_UPTIME 0x0002 +#define CFG_FE_STATUS_MASTER 0x0004 + +#define CFG_FE_STATUS_SEL_ALL 0xFFFF + +typedef struct fm_fe_status_s{ + uint64_t select_mask; + unsigned status; + unsigned long uptime; + unsigned master; +}fm_fe_status_t; + +#define CFG_BM_STATUS_STATE 0x0001 +#define CFG_BM_STATUS_UPTIME 0x0002 +#define CFG_BM_STATUS_MASTER 0x0004 + +#define CFG_BM_STATUS_SEL_ALL 0xFFFF + +typedef struct fm_bm_status_s{ + uint64_t select_mask; + unsigned status; + unsigned long uptime; + unsigned master; +}fm_bm_status_t; + +typedef struct fm_sm_node_info_s{ + uint64_t select_mask; + unsigned char ibSmNodeInfoSubnetPrefix[8]; + unsigned char ibSmNodeInfoNodeGUID[8]; + unsigned long ibSmNodeInfoBaseVersion; + unsigned long ibSmNodeInfoClassVersion; + long ibSmNodeInfoType; + unsigned long ibSmNodeInfoNumPorts; + unsigned char ibSmNodeInfoSystemImageGUID[8]; + unsigned long ibSmNodeInfoPartitionCap; + unsigned char ibSmNodeInfoDeviceID[2]; + unsigned char ibSmNodeInfoRevision[4]; + unsigned char ibSmNodeInfoVendorID[3]; + char ibSmNodeInfoDescription[256]; +}fm_sm_node_info_t; + + +typedef struct fm_sm_port_info_s{ + uint64_t select_mask; + char ibSmPortInfoSubnetPrefix[8]; + char ibSmPortInfoNodeGUID[8]; + unsigned long ibSmPortInfoLocalPortNum; + char ibSmPortInfoMKey[8]; + char ibSmPortInfoGIDPrefix[8]; + unsigned long ibSmPortInfoLID; + unsigned long ibSmPortInfoMasterSmLID; + char ibSmPortInfoCapMask[4]; + char ibSmPortInfoDiagCode[2]; + unsigned long ibSmPortInfoMKeyLeasePeriod; + unsigned long ibSmPortInfoLinkWidthEnabled; + unsigned long ibSmPortInfoLinkWidthSupported; + unsigned long ibSmPortInfoLinkWidthActive; + unsigned long ibSmPortInfoLinkSpeedSupported; + unsigned long ibSmPortInfoState; + unsigned long ibSmPortInfoPhyState; + unsigned long ibSmPortInfoLinkDownDefState; + unsigned long ibSmPortInfoMKeyProtBits; + unsigned long ibSmPortInfoLMC; + unsigned long ibSmPortInfoLinkSpeedActive; + unsigned long ibSmPortInfoLinkSpeedEnabled; + long ibSmPortInfoNeighborMTU; + unsigned long ibSmPortInfoMasterSmSL; + unsigned long ibSmPortInfoVLCap; + unsigned long ibSmPortInfoVLHighLimit; + unsigned long ibSmPortInfoVLArbHighCap; + unsigned long ibSmPortInfoVLArbLowCap; + long ibSmPortInfoMTUCap; + unsigned long ibSmPortInfoVLStallCount; + unsigned long ibSmPortInfoHOQLife; + unsigned long ibSmPortInfoOperVL; + long ibSmPortInfoInPartEnforce; + long ibSmPortInfoOutPartEnforce; + long ibSmPortInfoInFilterRawPktEnf; + long ibSmPortInfoOutFilterRawPktEnf; + unsigned long ibSmPortInfoMKeyViolation; + unsigned long ibSmPortInfoPKeyViolation; + unsigned long ibSmPortInfoQKeyViolation; + unsigned long ibSmPortInfoGUIDCap; + unsigned long ibSmPortInfoSubnetTimeout; + unsigned long ibSmPortInfoRespTime; + unsigned long ibSmPortInfoLocalPhyError; + unsigned long ibSmPortInfoOverrunError; + char ibSmPortInfoInitType; + char ibSmPortInfoInitTypeReply; +}fm_sm_port_info_t; + +typedef struct fm_sm_switch_info_s{ + uint64_t select_mask; + char ibSmSwitchInfoSubnetPrefix[8]; + char ibSmSwitchInfoNodeGUID[8]; + unsigned long ibSmSwitchInfoLinearFdbCap; + unsigned long ibSmSwitchInfoRandomFdbCap; + unsigned long ibSmSwitchInfoMcastFdbCap; + unsigned long ibSmSwitchInfoLinearFdbTop; + unsigned long ibSmSwitchInfoDefaultPort; + unsigned long ibSmSwitchInfoDefPriMcastPort; + unsigned long ibSmSwitchInfoDefNonPriMcastPort; + unsigned long ibSmSwitchInfoLifeTimeValue; + unsigned long ibSmSwitchInfoPortStateChange; + unsigned long ibSmSwitchInfoLIDsPerPort; + unsigned long ibSmSwitchInfoPartitionEnfCap; + long ibSmSwitchInfoInEnfCap; + long ibSmSwitchInfoOutEnfCap; + long ibSmSwitchInfoInFilterRawPktCap; + long ibSmSwitchInfoOutFilterRawPktCap; + long ibSmSwitchInfoEnhanced0; +}fm_sm_switch_info_t; + +typedef struct fm_sm_guid_info_s{ + uint64_t select_mask; + char ibSmGUIDInfoSubnetPrefix[8]; + char ibSmGUIDInfoNodeGUID[8]; + unsigned long ibSmGUIDInfoPortNum; + unsigned long ibSmGUIDInfoBlockNum; + char ibSmGUIDInfoBlock[255]; + +}fm_sm_guid_info_t; + +typedef struct fm_sm_link_info_s{ + uint64_t select_mask; + char ibSmLinkSubnetPrefix[8]; + char ibSmLinkFromNodeGUID[8]; + unsigned long ibSmLinkFromPortNum; + char ibSmLinkToNodeGUID[8]; + unsigned long ibSmLinkToPortNum; +}fm_sm_link_info_t; + +typedef struct fm_sm_mcast_group_info_s{ + uint64_t select_mask; + unsigned char ibSmMcastGroupSubnetPrefix[8]; + unsigned char ibSmMcastGroupMGID[16]; + unsigned char ibSmMcastGroupQKey[2]; + unsigned long ibSmMcastGroupMLID; + long ibSmMcastGroupMTU; + unsigned long ibSmMcastGroupTClass; + unsigned long ibSmMcastGroupPKey; + unsigned long ibSmMcastGroupRate; + unsigned long ibSmMcastGroupPacketLifeTime; + unsigned long ibSmMcastGroupSL; + unsigned char ibSmMcastGroupFlowLabel[3]; + unsigned long ibSmMcastGroupHopLimit; + unsigned long ibSmMcastGroupScope; +}fm_sm_mcast_group_info_t; + +typedef struct fm_sm_mcast_member_info_s{ + uint64_t select_mask; + char ibSmMcastMemberSubnetPrefix[8]; + char ibSmMcastMemberMGID[16]; + long ibSmMcastMemberVectorIndex; + char ibSmMcastMemberVector[255]; + long ibSmMcastMemberVectorSize; + long ibSmMcastMemberVectorElementSize; + unsigned long ibSmMcastMemberLastChange; + +}fm_sm_mcast_member_info_t; + +typedef struct fm_sm_service_info_s{ + uint64_t select_mask; + unsigned char ibSmServiceSubnetPrefix[8]; + unsigned char ibSmServiceID[8]; + unsigned char ibSmServiceGID[16]; + unsigned long ibSmServicePKey; + unsigned long ibSmServiceLease; + unsigned char ibSmServiceKey[16]; + char ibSmServiceName[256]; + unsigned char ibSmServiceData[128]; +}fm_sm_service_info_t; + + +fm_mgr_config_errno_t +fm_mgr_simple_query +( + IN p_fm_config_conx_hdlt hdl, + IN fm_mgr_action_t action, + IN fm_datatype_t data_type_id, + IN fm_mgr_type_t mgr, + IN int data_len, + OUT void *data, + OUT fm_msg_ret_code_t *ret_code +); + +// init +fm_mgr_config_errno_t +fm_mgr_config_init +( + OUT p_fm_config_conx_hdlt *p_hdl, + IN int instance, + OPTIONAL IN char *rem_address, + OPTIONAL IN char *community +); + + +// connect +fm_mgr_config_errno_t +fm_mgr_config_connect +( + IN p_fm_config_conx_hdlt p_hdl +); + + +fm_mgr_config_errno_t +fm_mgr_commong_cfg_query +( + IN p_fm_config_conx_hdlt hdl, + IN fm_mgr_type_t mgr, + IN fm_mgr_action_t action, + OUT fm_config_common_t *info, + OUT fm_msg_ret_code_t *ret_code +); + + +fm_mgr_config_errno_t +fm_mgr_bm_cfg_query +( + IN p_fm_config_conx_hdlt hdl, + IN fm_mgr_action_t action, + OUT bm_config_t *info, + OUT fm_msg_ret_code_t *ret_code +); + + +fm_mgr_config_errno_t +fm_mgr_fe_cfg_query +( + IN p_fm_config_conx_hdlt hdl, + IN fm_mgr_action_t action, + OUT fe_config_t *info, + OUT fm_msg_ret_code_t *ret_code +); + +fm_mgr_config_errno_t +fm_mgr_pm_cfg_query +( + IN p_fm_config_conx_hdlt hdl, + IN fm_mgr_action_t action, + OUT pm_config_t *info, + OUT fm_msg_ret_code_t *ret_code +); + + + +fm_mgr_config_errno_t +fm_mgr_sm_cfg_query +( + IN p_fm_config_conx_hdlt hdl, + IN fm_mgr_action_t action, + OUT sm_config_t *info, + OUT fm_msg_ret_code_t *ret_code +); + +fm_mgr_config_errno_t +fm_sm_status_query +( + IN p_fm_config_conx_hdlt hdl, + IN fm_mgr_action_t action, + OUT fm_sm_status_t *info, + OUT fm_msg_ret_code_t *ret_code +); + +fm_mgr_config_errno_t +fm_pm_status_query +( + IN p_fm_config_conx_hdlt hdl, + IN fm_mgr_action_t action, + OUT fm_pm_status_t *info, + OUT fm_msg_ret_code_t *ret_code +); + +fm_mgr_config_errno_t +fm_bm_status_query +( + IN p_fm_config_conx_hdlt hdl, + IN fm_mgr_action_t action, + OUT fm_bm_status_t *info, + OUT fm_msg_ret_code_t *ret_code +); + +fm_mgr_config_errno_t +fm_fe_status_query +( + IN p_fm_config_conx_hdlt hdl, + IN fm_mgr_action_t action, + OUT fm_fe_status_t *info, + OUT fm_msg_ret_code_t *ret_code +); + +const char* +fm_mgr_get_error_str +( + IN fm_mgr_config_errno_t err +); + +const char* +fm_mgr_get_resp_error_str +( + IN fm_msg_ret_code_t err +); + + + + + + + + + + +#endif diff --git a/Esm/ib/include/hsm_config_srvr_data.h b/Esm/ib/include/hsm_config_srvr_data.h index 2cf3477..6d6c581 100644 --- a/Esm/ib/include/hsm_config_srvr_data.h +++ b/Esm/ib/include/hsm_config_srvr_data.h @@ -1,4 +1,4 @@ -/* BEGIN_ICS_COPYRIGHT2 **************************************** +/* BEGIN_ICS_COPYRIGHT2 **************************************** Copyright (c) 2015-2017, Intel Corporation @@ -25,63 +25,63 @@ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * ** END_ICS_COPYRIGHT2 ****************************************/ - -#ifndef HSM_CONFIG_SRVR_DATA -#define HSM_CONFIG_SRVR_DATA - -#include "hsm_config_srvr_api.h" - -#define HSM_FM_SCK_PREFIX "/var/lib/opa-fm/" -#define HSM_FM_SCK_SM "sm_" -#define HSM_FM_SCK_PM "pm_" -#define HSM_FM_SCK_FE "fe_" - -typedef struct _fm_config_conx_hdl{ - unsigned instance; - unsigned conx_mask; // Mask to store which services are currently connected. - p_hsm_com_client_hdl_t sm_hdl; - p_hsm_com_client_hdl_t pm_hdl; - p_hsm_com_client_hdl_t bm_hdl; - p_hsm_com_client_hdl_t fe_hdl; - uint32_t index_len; - fm_error_map_t error_map; -}fm_config_conx_hdl; - -typedef struct fm_config_datagram_header_s{ - fm_msg_ret_code_t ret_code; - unsigned long action; - unsigned long data_id; - unsigned long data_len; -}fm_config_datagram_header_t; - -typedef struct fm_config_status_header_s{ - fm_msg_ret_code_t ret_code; - uint32_t run_status; - uint32_t uptime; - uint32_t master; -}fm_config_status_header_t; - -typedef struct fm_config_datagram_s{ - fm_config_datagram_header_t header; - char data[1]; // Storage for the first data byte. -}fm_config_datagram_t; - -#define FM_CONFIG_INTERMEDIATE_SIZE 10000 -#define FM_CONFIG_INTERMEDIATE_BUFF 10032 - -typedef struct fm_config_interation_data_s { - int index; - int offset; - int more; - int start; - int done; - int largeLength; - char *largeBuffer; - int intermediateLength; - char intermediateBuffer[FM_CONFIG_INTERMEDIATE_BUFF]; -}fm_config_interation_data_t; - - - -#endif /* HSM_CONFIG_SRVR_DATA */ + * ** END_ICS_COPYRIGHT2 ****************************************/ + +#ifndef HSM_CONFIG_SRVR_DATA +#define HSM_CONFIG_SRVR_DATA + +#include "hsm_config_srvr_api.h" + +#define HSM_FM_SCK_PREFIX "/var/lib/opa-fm/" +#define HSM_FM_SCK_SM "sm_" +#define HSM_FM_SCK_PM "pm_" +#define HSM_FM_SCK_FE "fe_" + +typedef struct _fm_config_conx_hdl{ + unsigned instance; + unsigned conx_mask; // Mask to store which services are currently connected. + p_hsm_com_client_hdl_t sm_hdl; + p_hsm_com_client_hdl_t pm_hdl; + p_hsm_com_client_hdl_t bm_hdl; + p_hsm_com_client_hdl_t fe_hdl; + uint32_t index_len; + fm_error_map_t error_map; +}fm_config_conx_hdl; + +typedef struct fm_config_datagram_header_s{ + fm_msg_ret_code_t ret_code; + unsigned long action; + unsigned long data_id; + unsigned long data_len; +}fm_config_datagram_header_t; + +typedef struct fm_config_status_header_s{ + fm_msg_ret_code_t ret_code; + uint32_t run_status; + uint32_t uptime; + uint32_t master; +}fm_config_status_header_t; + +typedef struct fm_config_datagram_s{ + fm_config_datagram_header_t header; + char data[1]; // Storage for the first data byte. +}fm_config_datagram_t; + +#define FM_CONFIG_INTERMEDIATE_SIZE 10000 +#define FM_CONFIG_INTERMEDIATE_BUFF 10032 + +typedef struct fm_config_interation_data_s { + int index; + int offset; + int more; + int start; + int done; + int largeLength; + char *largeBuffer; + int intermediateLength; + char intermediateBuffer[FM_CONFIG_INTERMEDIATE_BUFF]; +}fm_config_interation_data_t; + + + +#endif /* HSM_CONFIG_SRVR_DATA */ diff --git a/Esm/ib/src/config/fm_xml.c b/Esm/ib/src/config/fm_xml.c index 6cd1b7c..3acb6b1 100644 --- a/Esm/ib/src/config/fm_xml.c +++ b/Esm/ib/src/config/fm_xml.c @@ -1253,6 +1253,7 @@ boolean pmInitConfig(PMXmlConfig_t *pmp) DEFAULT_AND_CKSUM_INT(pmp->Clear8bit, 1, CKSUM_OVERALL_DISRUPT_CONSIST); DEFAULT_AND_CKSUM_INT(pmp->process_hfi_counters, 1, CKSUM_OVERALL_DISRUPT_CONSIST); DEFAULT_AND_CKSUM_INT(pmp->process_vl_counters, 1, CKSUM_OVERALL_DISRUPT_CONSIST); + DEFAULT_AND_CKSUM_INT(pmp->process_errorinfo, 1, CKSUM_OVERALL_DISRUPT_CONSIST); DEFAULT_AND_CKSUM_INT(pmp->MaxRetries, PM_DEFAULT_MAX_ATTEMPTS, CKSUM_OVERALL_DISRUPT_CONSIST); DEFAULT_AND_CKSUM_INT(pmp->RcvWaitInterval, PM_DEFAULT_RESP_TIMEOUT, CKSUM_OVERALL_DISRUPT_CONSIST); @@ -1267,12 +1268,12 @@ boolean pmInitConfig(PMXmlConfig_t *pmp) DEFAULT_AND_CKSUM_INT(pmp->total_images, MAX(pmp->freeze_frame_images + 2, PM_DEFAULT_TOTAL_IMAGES), CKSUM_OVERALL_DISRUPT_CONSIST); DEFAULT_INT(pmp->image_update_interval, pmp->sweep_interval < 2 ? (pmp->sweep_interval + 1) / 2 : pmp->sweep_interval / 2); - DEFAULT_AND_CKSUM_INT(pmp->thresholds.Integrity, 100, CKSUM_OVERALL_DISRUPT_CONSIST); - DEFAULT_AND_CKSUM_INT(pmp->thresholds.Congestion, 100, CKSUM_OVERALL_DISRUPT_CONSIST); - DEFAULT_AND_CKSUM_INT(pmp->thresholds.SmaCongestion, 100, CKSUM_OVERALL_DISRUPT_CONSIST); - DEFAULT_AND_CKSUM_INT(pmp->thresholds.Bubble, 100, CKSUM_OVERALL_DISRUPT_CONSIST); - DEFAULT_AND_CKSUM_INT(pmp->thresholds.Security, 10, CKSUM_OVERALL_DISRUPT_CONSIST); - DEFAULT_AND_CKSUM_INT(pmp->thresholds.Routing, 100, CKSUM_OVERALL_DISRUPT_CONSIST); + DEFAULT_AND_CKSUM_INT(pmp->thresholds.Integrity, 100, CKSUM_OVERALL_CONSIST); + DEFAULT_AND_CKSUM_INT(pmp->thresholds.Congestion, 100, CKSUM_OVERALL_CONSIST); + DEFAULT_AND_CKSUM_INT(pmp->thresholds.SmaCongestion, 100, CKSUM_OVERALL_CONSIST); + DEFAULT_AND_CKSUM_INT(pmp->thresholds.Bubble, 100, CKSUM_OVERALL_CONSIST); + DEFAULT_AND_CKSUM_INT(pmp->thresholds.Security, 10, CKSUM_OVERALL_CONSIST); + DEFAULT_AND_CKSUM_INT(pmp->thresholds.Routing, 100, CKSUM_OVERALL_CONSIST); DEFAULT_AND_CKSUM_INT(pmp->thresholdsExceededMsgLimit.Integrity, 10, CKSUM_OVERALL_DISRUPT); DEFAULT_AND_CKSUM_INT(pmp->thresholdsExceededMsgLimit.Congestion, 0, CKSUM_OVERALL_DISRUPT); @@ -1281,30 +1282,34 @@ boolean pmInitConfig(PMXmlConfig_t *pmp) DEFAULT_AND_CKSUM_INT(pmp->thresholdsExceededMsgLimit.Security, 10, CKSUM_OVERALL_DISRUPT); DEFAULT_AND_CKSUM_INT(pmp->thresholdsExceededMsgLimit.Routing, 10, CKSUM_OVERALL_DISRUPT); - DEFAULT_AND_CKSUM_INT(pmp->integrityWeights.LocalLinkIntegrityErrors, 0, CKSUM_OVERALL_DISRUPT_CONSIST); - DEFAULT_AND_CKSUM_INT(pmp->integrityWeights.PortRcvErrors, 100, CKSUM_OVERALL_DISRUPT_CONSIST); - DEFAULT_AND_CKSUM_INT(pmp->integrityWeights.ExcessiveBufferOverruns, 100, CKSUM_OVERALL_DISRUPT_CONSIST); - DEFAULT_AND_CKSUM_INT(pmp->integrityWeights.LinkErrorRecovery, 0, CKSUM_OVERALL_DISRUPT_CONSIST); - DEFAULT_AND_CKSUM_INT(pmp->integrityWeights.LinkDowned, 25, CKSUM_OVERALL_DISRUPT_CONSIST); - DEFAULT_AND_CKSUM_INT(pmp->integrityWeights.UncorrectableErrors, 100, CKSUM_OVERALL_DISRUPT_CONSIST); - DEFAULT_AND_CKSUM_INT(pmp->integrityWeights.FMConfigErrors, 100, CKSUM_OVERALL_DISRUPT_CONSIST); - DEFAULT_AND_CKSUM_INT(pmp->integrityWeights.LinkQualityIndicator, 40, CKSUM_OVERALL_DISRUPT_CONSIST); - DEFAULT_AND_CKSUM_INT(pmp->integrityWeights.LinkWidthDowngrade, 100, CKSUM_OVERALL_DISRUPT_CONSIST); - - DEFAULT_AND_CKSUM_INT(pmp->congestionWeights.PortXmitWait, 10, CKSUM_OVERALL_DISRUPT_CONSIST); - DEFAULT_AND_CKSUM_INT(pmp->congestionWeights.SwPortCongestion, 100, CKSUM_OVERALL_DISRUPT_CONSIST); - DEFAULT_AND_CKSUM_INT(pmp->congestionWeights.PortRcvFECN, 5, CKSUM_OVERALL_DISRUPT_CONSIST); - DEFAULT_AND_CKSUM_INT(pmp->congestionWeights.PortRcvBECN, 1, CKSUM_OVERALL_DISRUPT_CONSIST); - DEFAULT_AND_CKSUM_INT(pmp->congestionWeights.PortXmitTimeCong, 25, CKSUM_OVERALL_DISRUPT_CONSIST); - DEFAULT_AND_CKSUM_INT(pmp->congestionWeights.PortMarkFECN, 25, CKSUM_OVERALL_DISRUPT_CONSIST); + DEFAULT_AND_CKSUM_INT(pmp->integrityWeights.LocalLinkIntegrityErrors, 0, CKSUM_OVERALL_CONSIST); + DEFAULT_AND_CKSUM_INT(pmp->integrityWeights.PortRcvErrors, 100, CKSUM_OVERALL_CONSIST); + DEFAULT_AND_CKSUM_INT(pmp->integrityWeights.ExcessiveBufferOverruns, 100, CKSUM_OVERALL_CONSIST); + DEFAULT_AND_CKSUM_INT(pmp->integrityWeights.LinkErrorRecovery, 0, CKSUM_OVERALL_CONSIST); + DEFAULT_AND_CKSUM_INT(pmp->integrityWeights.LinkDowned, 25, CKSUM_OVERALL_CONSIST); + DEFAULT_AND_CKSUM_INT(pmp->integrityWeights.UncorrectableErrors, 100, CKSUM_OVERALL_CONSIST); + DEFAULT_AND_CKSUM_INT(pmp->integrityWeights.FMConfigErrors, 100, CKSUM_OVERALL_CONSIST); + DEFAULT_AND_CKSUM_INT(pmp->integrityWeights.LinkQualityIndicator, 40, CKSUM_OVERALL_CONSIST); + DEFAULT_AND_CKSUM_INT(pmp->integrityWeights.LinkWidthDowngrade, 100, CKSUM_OVERALL_CONSIST); + + DEFAULT_AND_CKSUM_INT(pmp->congestionWeights.PortXmitWait, 10, CKSUM_OVERALL_CONSIST); + DEFAULT_AND_CKSUM_INT(pmp->congestionWeights.SwPortCongestion, 100, CKSUM_OVERALL_CONSIST); + DEFAULT_AND_CKSUM_INT(pmp->congestionWeights.PortRcvFECN, 5, CKSUM_OVERALL_CONSIST); + DEFAULT_AND_CKSUM_INT(pmp->congestionWeights.PortRcvBECN, 1, CKSUM_OVERALL_CONSIST); + DEFAULT_AND_CKSUM_INT(pmp->congestionWeights.PortXmitTimeCong, 25, CKSUM_OVERALL_CONSIST); + DEFAULT_AND_CKSUM_INT(pmp->congestionWeights.PortMarkFECN, 25, CKSUM_OVERALL_CONSIST); DEFAULT_AND_CKSUM_INT(pmp->resolution.LocalLinkIntegrity, 8000000, CKSUM_OVERALL_DISRUPT_CONSIST); DEFAULT_AND_CKSUM_INT(pmp->resolution.LinkErrorRecovery, 100000, CKSUM_OVERALL_DISRUPT_CONSIST); + DEFAULT_AND_CKSUM_INT(pmp->errorinfo_thresholds.Integrity, UNDEFINED_XML16, CKSUM_OVERALL_DISRUPT); + DEFAULT_AND_CKSUM_INT(pmp->errorinfo_thresholds.Security, 10, CKSUM_OVERALL_DISRUPT); + DEFAULT_AND_CKSUM_INT(pmp->errorinfo_thresholds.Routing, 10, CKSUM_OVERALL_DISRUPT); + for (i = 0; i < pmp->number_of_pm_groups; i++) { if (pmp->pm_portgroups[i].Enabled) { - CKSUM_STR(pmp->pm_portgroups[i].Name, CKSUM_OVERALL_DISRUPT_CONSIST); - CKSUM_DATA(pmp->pm_portgroups[i].Monitors, CKSUM_OVERALL_DISRUPT_CONSIST); + CKSUM_STR(pmp->pm_portgroups[i].Name, CKSUM_OVERALL_CONSIST); + CKSUM_DATA(pmp->pm_portgroups[i].Monitors, CKSUM_OVERALL_CONSIST); } } @@ -1409,6 +1414,7 @@ void pmShowConfig(PMXmlConfig_t *pmp) printf("XML - Clear8bit %u\n", (unsigned int)pmp->Clear8bit); printf("XML - process_hfi_counters %u\n", (unsigned int)pmp->process_hfi_counters); printf("XML - process_vl_counters %u\n", (unsigned int)pmp->process_vl_counters); + printf("XML - process_errorinfo %u\n", (unsigned int)pmp->process_errorinfo); printf("XML - MaxRetries %u\n", (unsigned int)pmp->MaxRetries); printf("XML - RcvWaitInterval %u\n", (unsigned int)pmp->RcvWaitInterval); @@ -1456,6 +1462,10 @@ void pmShowConfig(PMXmlConfig_t *pmp) printf("XML - resolution.LocalLinkIntegrity %u\n", (unsigned int)pmp->resolution.LocalLinkIntegrity); printf("XML - resolution.LinkErrorRecovery %u\n", (unsigned int)pmp->resolution.LinkErrorRecovery); + printf("XML - errorinfo_thresholds.Integrity %u\n", (unsigned int)pmp->errorinfo_thresholds.Integrity); + printf("XML - errorinfo_thresholds.Security %u\n", (unsigned int)pmp->errorinfo_thresholds.Security); + printf("XML - errorinfo_thresholds.Routing %u\n", (unsigned int)pmp->errorinfo_thresholds.Routing); + printf("XML - number_of_pm_groups %u\n", (unsigned int)pmp->number_of_pm_groups); for (i = 0; i < pmp->number_of_pm_groups; i++) { printf("XML - pm_portgroups[%d].Enabled %u\n", i, pmp->pm_portgroups[i].Enabled); @@ -6948,6 +6958,35 @@ static void PmSweepIntervalParserEnd(IXmlParserState_t *state, *(uint16 *)IXmlParserGetField(field, object) = SweepInterval; } +static void PmSweepErrorInfoThresholdsParserEnd(IXmlParserState_t *state, + const IXML_FIELD *field, void *object, void *parent, XML_Char *content, + unsigned len, boolean valid) +{ + uint32 threshold = 0; + if (!strcasecmp(content, "Unlimited")) { + threshold = UNDEFINED_XML32; + } else if (!IXmlParseUint32(state, content, len, &threshold)) { + return; + } + + *(uint32 *)IXmlParserGetField(field, object) = threshold; +} + + +static void* PmSweepErrorInfoThresholdsXmlParserStart(IXmlParserState_t *state, void *parent, const char **attr) +{ + return &((PMXmlConfig_t *)parent)->errorinfo_thresholds; +} + +// SweepErrorInfoLogThresholds +static IXML_FIELD PmSweepErrorInfoThresholds[] = { + { tag:"Integrity", format:'u', IXML_FIELD_INFO(PmSweepErrorInfoThresholds_t, Integrity), end_func:PmSweepErrorInfoThresholdsParserEnd }, + { tag:"Security", format:'u', IXML_FIELD_INFO(PmSweepErrorInfoThresholds_t, Security), end_func:PmSweepErrorInfoThresholdsParserEnd }, + { tag:"Routing", format:'u', IXML_FIELD_INFO(PmSweepErrorInfoThresholds_t, Routing), end_func:PmSweepErrorInfoThresholdsParserEnd }, + { NULL } +}; + + // fields within "Pm/Thresholds" tag static IXML_FIELD PmThresholdsFields[] = { { tag:"Integrity", format:'u', IXML_FIELD_INFO(PmThresholdsXmlConfig_t, Integrity) }, @@ -7096,6 +7135,7 @@ static IXML_FIELD PmFields[] = { { tag:"Clear8bit", format:'u', IXML_FIELD_INFO(PMXmlConfig_t, Clear8bit) }, { tag:"ProcessVLCounters", format:'u', IXML_FIELD_INFO(PMXmlConfig_t, process_vl_counters) }, { tag:"ProcessHFICounters", format:'u', IXML_FIELD_INFO(PMXmlConfig_t, process_hfi_counters) }, + { tag:"ProcessErrorInfo", format:'u', IXML_FIELD_INFO(PMXmlConfig_t, process_errorinfo) }, { tag:"MaxAttempts", format:'u', IXML_FIELD_INFO(PMXmlConfig_t, MaxRetries) }, { tag:"RespTimeout", format:'u', IXML_FIELD_INFO(PMXmlConfig_t, RcvWaitInterval) }, { tag:"MinRespTimeout", format:'u', IXML_FIELD_INFO(PMXmlConfig_t, MinRcvWaitInterval) }, @@ -7112,6 +7152,7 @@ static IXML_FIELD PmFields[] = { { tag:"IntegrityWeights", format:'k', subfields:PmIntegrityWeightsFields, start_func:PmIntegrityWeightsXmlParserStart }, { tag:"CongestionWeights", format:'k', subfields:PmCongestionWeightsFields, start_func:PmCongestionWeightsXmlParserStart }, { tag:"Resolution", format:'k', subfields:PmResolutionFields, start_func:PmResolutionXmlParserStart }, + { tag:"SweepErrorInfoLogThresholds", format:'k', subfields:PmSweepErrorInfoThresholds, start_func:PmSweepErrorInfoThresholdsXmlParserStart }, { tag:"Debug", format:'u', IXML_FIELD_INFO(PMXmlConfig_t, debug) }, { tag:"RmppDebug", format:'u', IXML_FIELD_INFO(PMXmlConfig_t, debug_rmpp) }, { tag:"PmPerfDebug", format:'u', IXML_FIELD_INFO(PMXmlConfig_t, pm_debug_perf) }, diff --git a/Esm/ib/src/pm/include/pa_access.h b/Esm/ib/src/pm/include/pa_access.h index 1149d6d..e610981 100644 --- a/Esm/ib/src/pm/include/pa_access.h +++ b/Esm/ib/src/pm/include/pa_access.h @@ -233,6 +233,7 @@ FSTATUS FindPmImage(const char *func, Pm_t *pm, STL_PA_IMAGE_ID_DATA req_img, STL_PA_IMAGE_ID_DATA *rsp_img, PmImage_t **pm_image, uint32 *imageIndex, boolean *requiresLock); +int getCachedCimgIdx(Pm_t *pm, PmCompositeImage_t *cimg); uint64 BuildFreezeFrameImageId(Pm_t *pm, uint32 freezeIndex, uint8 clientId, uint32 *imageTime); FSTATUS LocateGroup(PmImage_t *pmimagep, const char *groupName, int *groupIndex); FSTATUS LocateVF(PmImage_t *pmimagep, const char *vfName, int *vfIdx); @@ -362,25 +363,15 @@ static inline uint8_t pa_get_port_status(PmPort_t *pmportp, uint32_t imageIndex) return STL_PA_FOCUS_STATUS_OK; } -/* MACROs for loops */ -#define for_some_pmnodes(PMIMAGE, PMNODE, LID, START, END) \ - for (LID = START, PMNODE = (PMIMAGE)->LidMap[LID]; LID <= END; ++LID, PMNODE = (PMIMAGE)->LidMap[LID]) \ - if (PMNODE) - -#define for_all_pmnodes(PMIMAGE, PMNODE, LID) \ - for_some_pmnodes(PMIMAGE, PMNODE, LID, 1, (PMIMAGE)->maxLid) - -#define pm_get_port(PMNODE, PORTNUM) ((PMNODE)->nodeType == STL_NODE_SW ? (PMNODE)->up.swPorts[PORTNUM] : (PMNODE)->up.caPortp) -#define pm_get_port_idx(PMNODE) ((PMNODE)->nodeType == STL_NODE_SW ? 0 : 1) - -#define for_some_pmports(PMNODE, PMPORT, PORTNUM, START, END, STH_BOOL) \ +/* PA STH MACROs for loops */ +#define for_some_pmports_sth(PMNODE, PMPORT, PORTNUM, START, END, STH_BOOL) \ for (PORTNUM = START, PMPORT = pm_get_port(PMNODE, PORTNUM); \ PORTNUM <= END; \ ++PORTNUM, PMPORT = pm_get_port(PMNODE, PORTNUM)) \ if (pa_valid_port(PMPORT, STH_BOOL)) -#define for_all_pmports(PMNODE, PMPORT, PORTNUM, STH_BOOL) \ - for_some_pmports(PMNODE, PMPORT, PORTNUM, pm_get_port_idx(PMNODE), (PMNODE)->numPorts, STH_BOOL) +#define for_all_pmports_sth(PMNODE, PMPORT, PORTNUM, STH_BOOL) \ + for_some_pmports_sth(PMNODE, PMPORT, PORTNUM, pm_get_port_idx(PMNODE), (PMNODE)->numPorts, STH_BOOL) /** Example usage: * diff --git a/Esm/ib/src/pm/include/pm_counters.h b/Esm/ib/src/pm/include/pm_counters.h index 674d67c..59bf7e1 100644 --- a/Esm/ib/src/pm/include/pm_counters.h +++ b/Esm/ib/src/pm/include/pm_counters.h @@ -81,6 +81,7 @@ typedef enum _pmCounters { pmCounterGetDataPortCounters, // Get(DataPortCounters) pmCounterGetErrorPortCounters, // Get(ErrorPortCounters) pmCounterGetErrorInfo, // Get(ErrorInfo) + pmCounterSetErrorInfo, // Set(ErrorInfo) pmCounterRxGetResp, diff --git a/Esm/ib/src/pm/include/pm_l.h b/Esm/ib/src/pm/include/pm_l.h index 7a0780c..b12cfbf 100644 --- a/Esm/ib/src/pm/include/pm_l.h +++ b/Esm/ib/src/pm/include/pm_l.h @@ -36,6 +36,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include "iquickmap.h" #include "pm_counters.h" +#include "fm_xml.h" // 200 bytes per port is more than our current data structures need by a // reasonable margin (approx 1k for 24 ports). @@ -66,4 +67,6 @@ extern void PmEngineStart(void); extern void PmEngineStop(void); extern boolean PmEngineRunning(void); +extern void pm_update_dyn_config(PMXmlConfig_t *new_pm_config); + #endif diff --git a/Esm/ib/src/pm/include/pm_topology.h b/Esm/ib/src/pm/include/pm_topology.h index 84a8f96..1564174 100644 --- a/Esm/ib/src/pm/include/pm_topology.h +++ b/Esm/ib/src/pm/include/pm_topology.h @@ -56,11 +56,6 @@ extern "C" { #include "iba/public/ipackon.h" -// if 1, we compress groups such no gaps in portImage->groups -// this speeds up PM sweeps -// if 0, we can have gaps, this speeds up Removing groups -#define PM_COMPRESS_GROUPS 1 - // used to mark unused entries in history and freezeFrame // also used in LastSweepIndex to indicate no sweeps done yet #define PM_IMAGE_INDEX_INVALID 0xffffffff @@ -70,7 +65,7 @@ extern "C" { #define PA_ALL_GROUP_NAME "All" // special ImageId of 0 is used to access live data -// -1 is used to request Images by time +// -1 is used to request Images by time // other non-zero values are of the format below // This is an opaque format, the only user known ImageIds are 0 to access // live data and -1 (0xffffffffffffffff) for images by time @@ -85,7 +80,7 @@ extern "C" { #define IMAGEID_TYPE_HISTORY_DISK 3 // Recent history *disk only* #define IMAGEID_MAX_INSTANCE_ID 256 // 8 bit field - + typedef union { uint64_t AsReg64; struct { @@ -186,6 +181,8 @@ typedef struct PmCompositeVfvlmap_s { uint32 VF; //index into vf array } PmCompositeVfvlmap_t; +typedef struct _port_error_info PmCompositeErrorInfo_t; + #define UPDATE_MAX(max, cnt) do { if (cnt > max) max = cnt; } while (0) #define UPDATE_MIN(min, cnt) do { if (cnt < min) min = cnt; } while (0) @@ -320,7 +317,8 @@ typedef struct PmErrStats_s { } PACK_SUFFIX PmErrStats_t; struct PmPort_s; -typedef boolean (*PmComparePortFunc_t)(struct PmPort_s *pmportp, char *groupName); +struct PmImage_s; +typedef boolean (*PmComparePortFunc_t)(struct PmImage_s *pmimagep, struct PmPort_s *pmportp, char *groupName); // a group is a set of ports. A given link can be: // in-group - both ports are within the same group @@ -340,8 +338,13 @@ typedef boolean (*PmComparePortFunc_t)(struct PmPort_s *pmportp, char *groupName typedef struct PmGroup_s { // configuration - unchanging, no lock needed char Name[STL_PM_GROUPNAMELEN]; // \0 terminated + uint32_t pg_index; // index into PmImage_t.Groups[] + // function to decide if new ports in topology should be added to group PmComparePortFunc_t ComparePortFunc; + + // dg_index from pm_config + uint16 dg_index[STL_PM_MAX_DG_PER_PMPG]; // (-1)0xFFFF = not used } PmGroup_t; typedef struct PmGroupImage_s { @@ -502,7 +505,7 @@ typedef struct PmPort_s { struct PmPortImage_s { union { uint32 AsReg32; - struct { IB_BITFIELD11(uint32, + struct { IB_BITFIELD12(uint32, active:1, // is port IB_PORT_ACTIVE (SW port 0 fixed up) mtu:4, // enum IB_MTU - due to actual range, 3 bits txActiveWidth:4, // LinkWidthDowngrade.txActive @@ -513,7 +516,8 @@ typedef struct PmPort_s { UnexpectedClear:1, // PMA Counters unexpectedly cleared gotDataCntrs:1, // Were Data Counters updated gotErrorCntrs:1, // Were Error Counters updated - Reserved:10) + gotErrorInfo:1, // Was Error Info captured + Reserved:9) } s; } u; struct PmPort_s *neighbor; // Pointer to Neighbor Port @@ -535,23 +539,26 @@ typedef struct PmPort_s { PmCompositePortCounters_t DeltaStlPortCounters; // Port Level Counters PmCompositeVLCounters_t DeltaStlVLPortCounters[MAX_PM_VLS]; // VL Level Counters + PmCompositeErrorInfo_t ErrorInfo; } Image[1]; // sized when allocate PmPort_t } PmPort_t; -#define PM_PORT_ERROR_SUMMARY(portImage, lli, ler) ((portImage)->StlPortCounters.PortRcvConstraintErrors + \ - (portImage)->StlPortCounters.PortRcvSwitchRelayErrors + \ - (portImage)->StlPortCounters.PortRcvSwitchRelayErrors + \ - (portImage)->StlPortCounters.PortXmitDiscards + \ - (portImage)->StlPortCounters.PortXmitConstraintErrors + \ - (portImage)->StlPortCounters.PortRcvRemotePhysicalErrors + \ - ((portImage)->StlPortCounters.LocalLinkIntegrityErrors >> (lli?(lli + RES_ADDER_LLI):0)) + \ - (portImage)->StlPortCounters.PortRcvErrors + \ - (portImage)->StlPortCounters.ExcessiveBufferOverruns + \ - (portImage)->StlPortCounters.FMConfigErrors + \ - ((portImage)->StlPortCounters.LinkErrorRecovery >> (ler?(ler + RES_ADDER_LER):0)) + \ - (portImage)->StlPortCounters.LinkDowned + \ - (portImage)->StlPortCounters.UncorrectableErrors) +#define PM_PORT_ERROR_SUMMARY(portImage, lli, ler) \ + ((portImage)->StlPortCounters.PortRcvConstraintErrors + \ + (portImage)->StlPortCounters.PortRcvSwitchRelayErrors + \ + (portImage)->StlPortCounters.PortRcvSwitchRelayErrors + \ + (portImage)->StlPortCounters.PortXmitDiscards + \ + (portImage)->StlPortCounters.PortXmitConstraintErrors + \ + (portImage)->StlPortCounters.PortRcvRemotePhysicalErrors + \ + ((portImage)->StlPortCounters.LocalLinkIntegrityErrors >> (lli?(lli + RES_ADDER_LLI):0)) + \ + (portImage)->StlPortCounters.PortRcvErrors + \ + (portImage)->StlPortCounters.ExcessiveBufferOverruns + \ + (portImage)->StlPortCounters.FMConfigErrors + \ + ((portImage)->StlPortCounters.LinkErrorRecovery >> (ler?(ler + RES_ADDER_LER):0)) + \ + (portImage)->StlPortCounters.LinkDowned + \ + (portImage)->StlPortCounters.UncorrectableErrors) + typedef struct PmPortImage_s PmPortImage_t; @@ -599,7 +606,7 @@ typedef struct PmDispatcherPacket_s { uint8 numPorts; uint8 numVLs; struct PmDispatcherNode_s *dispnode; // setup once at boot - PmDispatcherPort_t *DispPorts; + PmDispatcherPort_t *DispPorts; } PmDispatcherPacket_t; typedef enum { @@ -609,7 +616,9 @@ typedef enum { PM_DISP_NODE_GET_DATACOUNTERS = 2, // Getting Data Counters for Ports[] PM_DISP_NODE_GET_ERRORCOUNTERS = 3, // Getting Error Counters for Ports[] PM_DISP_NODE_CLR_PORT_STATUS = 4, // Clearing Counters for Ports[] - PM_DISP_NODE_DONE = 5, // all processing done for this node + PM_DISP_NODE_GET_ERRORINFO = 5, // Getting ErrorInfo for Ports[] + PM_DISP_NODE_CLR_ERRORINFO = 6, // Clearing ErrorInfo for Ports[] + PM_DISP_NODE_DONE = 7, // all processing done for this node } PmDispNodeState_t; struct Pm_s; @@ -622,14 +631,16 @@ typedef struct PmDispatcherSwitchPort_s { uint8 IsDispatched:1; // Port has been dispatched uint8 DoNotMerge:1; // Query failed, retry with out mergeing to isolate port uint8 NeedsClear:1; // Replaces 256-bit mask in Node Struct. - uint8 NeedsError:1; - uint8 Skip:1; // Any other reason we should skip this packet. - uint8 Reserved:3; + uint8 NeedsError:1; + uint8 Skip:1; // Any other reason we should skip this packet. + uint8 NeedsErrorInfo:1; + uint8 NeedsClearErrorInfo:1; + uint8 Reserved:1; } s; } flags; uint8 NumVLs; // Number of active VLs in the Mask - uint32 VLSelectMask; // VLSelect Mask associated with port. + uint32 VLSelectMask; // VLSelect Mask associated with port. } PmDispatcherSwitchPort_t; typedef struct PmDispatcherNode_s { @@ -644,7 +655,9 @@ typedef struct PmDispatcherNode_s { uint8 needError:1; // Summary NeedsError from PmDispatcherSwitchPort_t uint8 needClearSome:1; uint8 canClearAll:1; - // 3 spare bits + uint8 needErrorInfo:1; // Summary NeedsError from PmDispatcherSwitchPort_t + uint8 needClearErrorInfo:1; // Summary NeedsError from PmDispatcherSwitchPort_t + // 1 spare bits } s; } u; uint32 clearCounterSelect; // assumed to be same for all ports @@ -709,6 +722,7 @@ typedef struct PmImage_s { uint32 SkippedPorts; // No PMA or filtered uint32 UnexpectedClearPorts; // Ports which whose counters decreased uint32 DowngradedPorts; // Ports whose Link Width has been downgraded + uint32 ErrorInfoPorts; // User Configured Groups + HFIs and SWs (All is implied) uint32 NumGroups; @@ -883,9 +897,15 @@ typedef struct PmShortTermHistory_s { cl_qmap_t imageTimes; // map of all short term history images, keyed by start time uint32 totalHistoryRecords; uint8 currentInstanceId; - PmCompositeImage_t *cachedComposite; - struct _loaded_image { + struct _cached_images { + PmCompositeImage_t **cachedComposite; // Array of allocated Frozen STH CompImages + time_t *lastUsed; // Array of last time used for the same index image + PmHistoryRecord_t **records; // Array to indicate what record is frozen in above arrays + } CachedImages; + struct _loaded_image { PmImage_t *img; + PmHistoryRecord_t *record; // pointer to record of the loaded image + time_t lastUsed; // time of last access. } LoadedImage; char **invalidFiles; // keeps track of history filenames with a version mismatch uint32 oldestInvalid; // index of the oldest invalid file @@ -917,6 +937,10 @@ typedef struct PmDispatcherPerf_s { PmDispatcherPerfPhase_t sw_get_error_cntrs; PmDispatcherPerfPhase_t hfi_clr_cntrs; PmDispatcherPerfPhase_t sw_clr_cntrs; + PmDispatcherPerfPhase_t hfi_get_error_info; + PmDispatcherPerfPhase_t sw_get_error_info; + PmDispatcherPerfPhase_t hfi_set_error_info; + PmDispatcherPerfPhase_t sw_set_error_info; } PmDispatcherPerf_t; // high level PM configuration and statistics @@ -943,19 +967,16 @@ typedef struct Pm_s { // configuration settings uint32 pmFlags; // configured (see stl_pa_types.h pmFlags for a list) - uint16 interval; // in seconds - // threshold is per interval NOT per second - // set threshold to 0 to disable monitoring given Error type - ErrorSummary_t Thresholds; // configured - // set weight to 0 to disable monitoring given Integrity counter - IntegrityWeights_t integrityWeights; // configured - // set weight to 0 to disable monitoring given Congestion counter - CongestionWeights_t congestionWeights; // configured - - CounterSelectMask_t clearCounterSelect; // private - select all counters - PmCompositePortCounters_t ClearThresholds; // configured - - uint16 ErrorClear; // Pm.ErrorClear config option + uint16 interval; // Sweep Interval (in seconds) + ErrorSummary_t Thresholds; // Category Threshold Values + IntegrityWeights_t integrityWeights; // Weight applied to Counters before calculating Category + CongestionWeights_t congestionWeights; // Weight applied to Counters before calculating Category + CounterSelectMask_t clearCounterSelect; // List of counters to check against ClearThreshold + PmCompositePortCounters_t ClearThresholds; // MAX_VALUE * (ErrorClear/8) + uint16 ErrorClear; // Number of 8ths before we clear a counter + // Copy from pm_config + uint32 NumGroups; // User Configured Groups + HFIs and SWs (All is implied) + PmGroup_t Groups[PM_MAX_GROUPS]; // keep these as scratch area for use by current sweep, not kept per image // private to engine thread, not protected by lock @@ -1217,8 +1238,8 @@ FSTATUS rebuildComposite(PmCompositeImage_t *cimg, unsigned char *data, uint32 h void writeImageToBuffer(Pm_t *pm, uint32 histindex, uint8_t isCompressed, uint8_t *buffer, uint32_t *bIndex); void PmFreeComposite(PmCompositeImage_t *cimg); FSTATUS PmLoadComposite(Pm_t *pm, PmHistoryRecord_t *record, PmCompositeImage_t **cimg); -FSTATUS PmFreezeComposite(Pm_t *pm, PmHistoryRecord_t *record); -FSTATUS PmFreezeCurrent(Pm_t *pm); +FSTATUS PmFreezeComposite(Pm_t *pm, PmHistoryRecord_t *record, int *idx); +FSTATUS PmFreezeCurrent(Pm_t *pm, int *idx); void PmReconstituteVFImage(PmCompositeVF_t *cVF, PmVF_t *pmVFP); void PmReconstituteGroupImage(PmCompositeGroup_t *cgroup, PmGroup_t *pmGroupP); PmPort_t *PmReconstitutePortImage(PmImage_t *img, PmCompositePort_t *cport); @@ -1362,7 +1383,7 @@ PmNode_t *pm_find_nodeguid(Pm_t *pm, uint64 nodeGUID); // have a history feature. // caller must have totalsLock held for write FSTATUS PmClearNodeRunningCounters(PmNode_t *pmnodep, CounterSelectMask_t select); -FSTATUS PmClearNodeRunningVFCounters(PmNode_t *pmnodep, STLVlCounterSelectMask select, +FSTATUS PmClearNodeRunningVFCounters(Pm_t *pm, PmNode_t *pmnodep, STLVlCounterSelectMask select, int vfIdx, boolean useHiddenVF); // in mad_info.c @@ -1377,6 +1398,42 @@ Status_t PmDispatcherInit(Pm_t *pm); void PmDispatcherDestroy(Pm_t *pm); FSTATUS PmSweepAllPortCounters(Pm_t *pm); +static __inline boolean isErrorInfoNeeded(Pm_t *pm, + PmCompositePortCounters_t *curr, PmCompositePortCounters_t *prev) +{ + if ((pm->pmFlags & STL_PM_PROCESS_ERRORINFO) == 0) return FALSE; + if (!prev) return TRUE; + + // Some counters can be cleared on link bounce, so just check if they are + // different instead of current greater than previous. +#define IS_DIFF_VAL(cntr) if (curr->cntr != prev->cntr) return TRUE + IS_DIFF_VAL(LinkDowned); + IS_DIFF_VAL(PortRcvErrors); + IS_DIFF_VAL(ExcessiveBufferOverruns); + IS_DIFF_VAL(PortXmitConstraintErrors); + IS_DIFF_VAL(PortRcvConstraintErrors); + IS_DIFF_VAL(PortRcvSwitchRelayErrors); + IS_DIFF_VAL(UncorrectableErrors); + IS_DIFF_VAL(FMConfigErrors); +#undef IS_DIFF_VAL + + return FALSE; +} + +static __inline boolean isErrorInfoStatusSet(PmCompositeErrorInfo_t *pErrorInfo) +{ + if (pErrorInfo->PortRcvErrorInfo.s.Status) return TRUE; + if (pErrorInfo->ExcessiveBufferOverrunInfo.s.Status) return TRUE; + if (pErrorInfo->PortXmitConstraintErrorInfo.s.Status) return TRUE; + if (pErrorInfo->PortRcvConstraintErrorInfo.s.Status) return TRUE; + if (pErrorInfo->PortRcvSwitchRelayErrorInfo.s.Status) return TRUE; + if (pErrorInfo->UncorrectableErrorInfo.s.Status) return TRUE; + if (pErrorInfo->FMConfigErrorInfo.s.Status) return TRUE; + + return FALSE; +} + + // pm_async_rcv.c extern generic_cntxt_t *pm_async_send_rcv_cntxt; void pm_async_rcv(uint32_t argc, uint8_t ** argv); @@ -1430,7 +1487,7 @@ uint32 computeVFBubble(Pm_t *pm, uint32 imageIndex, PmPort_t *port, void *data); uint32 computeVFUtilizationPct10(Pm_t *pm, uint32 imageIndex, PmPort_t *port, void *data); -// Given a MBps transfer rate and a theoretical maxMBps, compute the +// Given a MBps transfer rate and a theoretical maxMBps, compute the // utilization bucket number from 0 to PM_UTIL_BUCKETS-1 static __inline uint8 ComputeUtilBucket(uint32 SendMBps, uint32 maxMBps) { @@ -1460,13 +1517,13 @@ static __inline uint8 ComputeErrBucket(uint32 errCnt, uint32 errThreshold) return errBucket; } -void PmPrintExceededPort(PmPort_t *pmportp, uint32 index, const char *statistic, uint32 threshold, uint32 value); -void PmPrintExceededPortDetailsIntegrity(PmPort_t *pmportp, PmPort_t *pmportneighborp, uint32 imageIndex, uint32 lastImageIndex); -void PmPrintExceededPortDetailsCongestion(PmPort_t *pmportp, PmPort_t *pmportneighborp, uint32 imageIndex, uint32 lastImageIndex); -void PmPrintExceededPortDetailsSmaCongestion(PmPort_t *pmportp, PmPort_t *pmportneighborp, uint32 imageIndex, uint32 lastImageIndex); -void PmPrintExceededPortDetailsBubble(PmPort_t *pmportp, PmPort_t *pmportneighborp, uint32 imageIndex, uint32 lastImageIndex); -void PmPrintExceededPortDetailsSecurity(PmPort_t *pmportp, PmPort_t *pmportneighborp, uint32 imageIndex, uint32 lastImageIndex); -void PmPrintExceededPortDetailsRouting(PmPort_t *pmportp, PmPort_t *pmportneighborp, uint32 imageIndex, uint32 lastImageIndex); +void PmPrintExceededPort(char *buf, size_t bufSize, PmPort_t *pmportp, uint32 index, const char *statistic, uint32 threshold, uint32 value); +void PmPrintExceededPortDetailsIntegrity(char *exceededMessage, Pm_t *pm, PmPort_t *pmportp, PmPort_t *pmportneighborp, uint32 imageIndex); +void PmPrintExceededPortDetailsCongestion(char *exceededMessage, Pm_t *pm, PmPort_t *pmportp, PmPort_t *pmportneighborp, uint32 imageIndex); +void PmPrintExceededPortDetailsSmaCongestion(char *exceededMessage, Pm_t *pm, PmPort_t *pmportp, PmPort_t *pmportneighborp, uint32 imageIndex); +void PmPrintExceededPortDetailsBubble(char *exceededMessage, Pm_t *pm, PmPort_t *pmportp, PmPort_t *pmportneighborp, uint32 imageIndex); +void PmPrintExceededPortDetailsSecurity(char *exceededMessage, Pm_t *pm, PmPort_t *pmportp, PmPort_t *pmportneighborp, uint32 imageIndex); +void PmPrintExceededPortDetailsRouting(char *exceededMessage, Pm_t *pm, PmPort_t *pmportp, PmPort_t *pmportneighborp, uint32 imageIndex); void PmFinalizePortStats(Pm_t *pm, PmPort_t *portp, uint32 index); boolean PmTabulatePort(Pm_t *pm, PmPort_t *portp, uint32 index, uint32 *counterSelect); @@ -1486,7 +1543,7 @@ void UpdateVFStats(Pm_t *pm, uint32 imageIndex, PmPort_t *port, PmVFImage_t *vfI // have a history feature. // caller must have totalsLock held for write extern FSTATUS PmClearPortRunningCounters(PmPort_t *pmportp, CounterSelectMask_t select); -extern FSTATUS PmClearPortRunningVFCounters(PmPort_t *pmportp, STLVlCounterSelectMask select, int vfIdx, boolean useHiddenVF); +extern FSTATUS PmClearPortRunningVFCounters(Pm_t *pm, PmPort_t *pmportp, STLVlCounterSelectMask select, int vfIdx, boolean useHiddenVF); // ? PMA Counter control allows interval and auto restart of counters, can remove // effect of PMA packet delays, etc. Should we use it? Does HW support it? @@ -1501,9 +1558,6 @@ uint32 s_StaticRateToMBps[IB_STATIC_RATE_MAX+1]; // adds a port to a group. used by PmAddExtPort and PmAddIntPort void PmAddPortToGroupIndex(PmPortImage_t* portImage, uint32 grpIndex, PmGroup_t *groupp, boolean internal); -// removes a port from a group. used by other higher level routines -void PmRemovePortFromGroupIndex(PmPortImage_t* portImage, uint32 grpIndex, PmGroup_t *groupp, uint8 compress); - boolean PmIsPortInGroup(PmImage_t *pmimagep, PmPortImage_t *portImage, int groupIndex, boolean isAllGroup, boolean *isInternal); boolean PmIsPortInVF(PmImage_t *pmimagep, PmPortImage_t *portImage, @@ -1513,17 +1567,11 @@ boolean PmIsPortInVF(PmImage_t *pmimagep, PmPortImage_t *portImage, // the given group void PmAddExtPortToGroupIndex(PmPortImage_t* portImage, uint32 grpIndex, PmGroup_t *groupp, uint32 imageIndex); -// removes a port from a group. used by other higher level routines -void PmRemoveExtPortFromGroupIndex(PmPortImage_t* portImage, uint32 grpIndex, PmGroup_t *groupp, uint32 imageIndex, uint8 compress); - // adds a port to a group where the neighbor of the port WILL be in // the given group // This DOES NOT add the neighbor. Caller must do that separately. void PmAddIntPortToGroupIndex(PmPortImage_t* portImage, uint32 grpIndex, PmGroup_t *groupp, uint32 imageIndex); -// removes a port from a group. used by other higher level routines -void PmRemoveIntPortFromGroupIndex(PmPortImage_t* portImage, uint32 grpIndex, PmGroup_t *groupp, uint32 imageIndex, uint8 compress); - // compute reasonable clearThresholds based on given threshold and weights // This can be used to initialize clearThreshold and then override just // a few of the computed defaults in the even user wanted to control just a few @@ -1540,6 +1588,27 @@ FSTATUS injectHistoryFile(Pm_t *pm, char *filename, uint8_t *buffer, uint32_t fi void PmDispatcherPerfInit(PmDispatcherPerf_t *perf); + + +// PM Loop MACROS +#define for_some_pmnodes(PMIMAGE, PMNODE, LID, START, END) \ + for (LID = START, PMNODE = (PMIMAGE)->LidMap[LID]; LID <= END; ++LID, PMNODE = (PMIMAGE)->LidMap[LID]) \ + if (PMNODE) + +#define for_all_pmnodes(PMIMAGE, PMNODE, LID) \ + for_some_pmnodes(PMIMAGE, PMNODE, LID, 1, (PMIMAGE)->maxLid) + +#define pm_get_port(PMNODE, PORTNUM) ((PMNODE)->nodeType == STL_NODE_SW ? (PMNODE)->up.swPorts[PORTNUM] : (PMNODE)->up.caPortp) +#define pm_get_port_idx(PMNODE) ((PMNODE)->nodeType == STL_NODE_SW ? 0 : 1) + +#define for_some_pmports(PMNODE, PMPORT, PORTNUM, START, END) \ + for (PORTNUM = START, PMPORT = pm_get_port(PMNODE, PORTNUM); \ + PORTNUM <= END; \ + ++PORTNUM, PMPORT = pm_get_port(PMNODE, PORTNUM)) + +#define for_all_pmports(PMNODE, PMPORT, PORTNUM) \ + for_some_pmports(PMNODE, PMPORT, PORTNUM, pm_get_port_idx(PMNODE), (PMNODE)->numPorts) + #include "iba/public/ipackoff.h" #ifdef __cplusplus diff --git a/Esm/ib/src/smi/include/sm_l.h b/Esm/ib/src/smi/include/sm_l.h index de71be5..35aef1d 100644 --- a/Esm/ib/src/smi/include/sm_l.h +++ b/Esm/ib/src/smi/include/sm_l.h @@ -289,6 +289,10 @@ typedef struct { struct { uint8_t reregisterPending:1; // True if we need to send a PortInfo with ClientReregister } registration; + struct { + uint8_t updateLog:1; + STL_LINKDOWN_REASON ldr_log[STL_NUM_LINKDOWN_REASONS]; + } ldr; } PopoPort_t; typedef struct _PopoNode { @@ -299,6 +303,11 @@ typedef struct _PopoNode { uint8_t numPorts; uint64_t guid; } info; + struct { + uint32_t nrSweepNum; //Sweep number of last failure + uint16_t nrCount; // Number of sweeps a Node Fails a get + uint64_t nrTime; // Timestamp of first failure to respond + } nonresp; struct { uint8_t errorCount; } quarantine; @@ -321,6 +330,9 @@ typedef struct { QUICK_LIST shortTerm; //Ports that will be quarantined only until the next successful SM sweep QUICK_LIST longTerm; //Ports that will be quarantined for multiple sweeps until underlying condition resolves } quarantine; + struct { + uint64_t sweepStart; // Sweep start (in seconds) used by LinkdownReason Log + } ldr; } Popo_t; typedef struct { @@ -398,7 +410,6 @@ typedef struct _PortData { /// Shared cable information; use sm_CableInfo_*() functions to create and manage CableInfo_t * cableInfo; - STL_LINKDOWN_REASON LinkDownReasons[STL_NUM_LINKDOWN_REASONS]; uint8_t neighborQuarantined; uint8_t linkPolicyViolation:2; //port outside speed/width policy. //bit[0]: link below max supported @@ -500,9 +511,7 @@ typedef struct _Node { bitset_t vfMember; bitset_t fullPKeyMember; - bitset_t dgMembership; - uint16_t nonRespCount; // Number of times the node has not responded to gets/sets - uint64_t nonRespTime; // Timestamp of first failure to respond. + bitset_t dgMembership; uint8_t asyncReqsSupported; // number of async requests node can handle uint8_t asyncReqsOutstanding; // number of async requests on the wire uint8_t portsInInit; @@ -1076,22 +1085,6 @@ typedef struct _Topology { #endif } Topology_t; -typedef struct { - uint64_t guid; - uint8_t index; -} LdrCacheKey_t; - -typedef struct { - cl_map_item_t mapItem; - LdrCacheKey_t key; - STL_LINKDOWN_REASON ldr[STL_NUM_LINKDOWN_REASONS]; -} LdrCacheEntry_t; - -/** - * Allocates topo->ldrCache in sm_pool if NULL. - */ -void topology_saveLdr(Topology_t * topo, uint64_t guid, Port_t * port); - Status_t sm_lidmap_alloc(void); void sm_lidmap_free(void); Status_t sm_lidmap_reset(void); @@ -2277,7 +2270,7 @@ Status_t sm_send_stl_request(SmMaiHandle_t * fd, uint32_t method, uint32_t aid, Status_t sm_send_stl_request_impl(SmMaiHandle_t *, uint32_t, uint32_t, uint32_t, SmpAddr_t *, uint32_t, uint8_t *, uint32_t *, uint32_t, uint64_t, cntxt_callback_t, void *, uint32_t *); int sm_find_cached_node_port(Node_t *cnp, Port_t *cpp, Node_t **nodep, Port_t **portp); int sm_find_cached_neighbor(Node_t *cnp, Port_t *cpp, Node_t **nodep, Port_t **portp); -int sm_check_node_cache(Node_t *cnp, Port_t *cpp, Node_t **nodep, Port_t **portp); +void sm_get_nonresp_cache_node_port(Node_t *cnp, Port_t *cpp, Node_t **nodep, Port_t **portp); Status_t sm_check_Master(void); Status_t sm_initialize_port(ParallelSweepContext_t *psc, SmMaiHandle_t *, Topology_t *, Node_t *, Port_t *, SmpAddr_t *); Status_t sm_initialize_port_LR_DR(ParallelSweepContext_t *psc, SmMaiHandle_t *fd, Topology_t *topop, Node_t *nodep, Port_t *portp); @@ -2960,6 +2953,15 @@ extern PopoQuarantineType_t sm_popo_get_quarantine_type(Popo_t * popop, Port_t * extern PopoLongTermQuarantineReason_t sm_popo_get_quarantine_reason(Popo_t * popop, Port_t * portp); extern PopoQuarantineType_t sm_popo_get_quarantine_type_unsafe(Popo_t * popop, Port_t * portp); extern PopoLongTermQuarantineReason_t sm_popo_get_quarantine_reason_unsafe(Popo_t * popop, Port_t * portp); +extern void sm_popo_get_ldr_log(Popo_t * popop, Port_t * portp, STL_LINKDOWN_REASON *log); +extern uint64_t sm_popo_get_sweep_start(Popo_t * popop); + +extern boolean sm_popo_find_lastest_ldr(Popo_t * popop, Port_t * portp, STL_LINKDOWN_REASON *ldr); + +extern void sm_popo_clear_cache_nonresp(Popo_t *popop, Node_t *nodep); +extern boolean sm_popo_is_nonresp_this_sweep(Popo_t *popop, Node_t *nodep); +extern boolean sm_popo_use_cache_nonresp(Popo_t * popop, Node_t *nodep); +extern boolean sm_popo_inc_and_use_cache_nonresp(Popo_t * popop, Node_t *nodep, Status_t *retStatus); extern uint64_t sm_popo_scale_timeout(Popo_t * popop, uint64_t timeout); extern void sm_popo_report_timeout(Popo_t * popop, uint64_t timeout); @@ -2969,10 +2971,13 @@ extern boolean sm_popo_should_abandon(Popo_t * popop); extern void sm_popo_report_trap(Popo_t * popop); extern void sm_popo_update_node(PopoNode_t * ponodep); extern void sm_popo_end_sweep(Popo_t * popop); +extern void sm_popo_begin_sweep(Popo_t *popop, uint64_t start_sweep); extern void sm_popo_monitor_port(Popo_t *popop, Port_t *portp, PopoLongTermQuarantineReason_t reason); extern void sm_popo_update_node_port_states(Popo_t *popop, Node_t * nodep, STL_PORT_STATE_INFO *psi); extern void sm_popo_update_port_state(Popo_t *popop, Port_t *portp, STL_PORT_STATES *pstatep); +extern void sm_popo_update_port_state_with_ldr(Popo_t *popop, Port_t *portp, STL_PORT_STATES *pstatep, + uint8_t ldr, uint8_t nldr); extern void sm_popo_clear_port_trappedDown(Popo_t * popop); /** diff --git a/IbAccess/Common/Inc/stl_pa_types.h b/IbAccess/Common/Inc/stl_pa_types.h index b003246..8619c5c 100644 --- a/IbAccess/Common/Inc/stl_pa_types.h +++ b/IbAccess/Common/Inc/stl_pa_types.h @@ -379,23 +379,25 @@ typedef struct _STL_CONGESTION_WEIGHTS { #define STL_PM_PROCESS_CLR_64BIT_COUNTERS 0x00000008 // Enable Clearing of 64 bit Error Counters #define STL_PM_PROCESS_CLR_32BIT_COUNTERS 0x00000010 // Enable Clearing of 32 bit Error Counters #define STL_PM_PROCESS_CLR_8BIT_COUNTERS 0x00000020 // Enable Clearing of 8 bit Error Counters +#define STL_PM_PROCESS_ERRORINFO 0x00000040 // Enable Getting/Clearing of Error Info static __inline void StlFormatPmFlags(char buf[80], uint32 pmFlags) { snprintf(buf, 80, "%s=%s %s=%s %s=%s %s=%s", - "ProcessHFICntrs", pmFlags & STL_PM_PROCESS_HFI_COUNTERS ? "On" : "Off", - "ProcessVLCntrs", pmFlags & STL_PM_PROCESS_VL_COUNTERS ? "On" : "Off", - "ClrDataCntrs", pmFlags & STL_PM_PROCESS_CLR_DATA_COUNTERS ? "On" : "Off", - "Clr64bitErrCntrs", pmFlags & STL_PM_PROCESS_CLR_64BIT_COUNTERS ? "On" : "Off"); + "ProcessHFICntrs", pmFlags & STL_PM_PROCESS_HFI_COUNTERS ? "On" : "Off", + "ProcessVLCntrs", pmFlags & STL_PM_PROCESS_VL_COUNTERS ? "On" : "Off", + "ClrDataCntrs", pmFlags & STL_PM_PROCESS_CLR_DATA_COUNTERS ? "On" : "Off", + "Clr64bitErrCntrs", pmFlags & STL_PM_PROCESS_CLR_64BIT_COUNTERS ? "On" : "Off"); } static __inline void StlFormatPmFlags2(char buf[80], uint32 pmFlags) { - snprintf(buf, 80, "%s=%s %s=%s", - "Clr32bitErrCntrs", pmFlags & STL_PM_PROCESS_CLR_32BIT_COUNTERS ? "On" : "Off", - "Clr8bitErrCntrs", pmFlags & STL_PM_PROCESS_CLR_8BIT_COUNTERS ? "On" : "Off"); + snprintf(buf, 80, "%s=%s %s=%s %s=%s", + "Clr32bitErrCntrs", pmFlags & STL_PM_PROCESS_CLR_32BIT_COUNTERS ? "On" : "Off", + "Clr8bitErrCntrs", pmFlags & STL_PM_PROCESS_CLR_8BIT_COUNTERS ? "On" : "Off", + "ProcessErrorInfo", pmFlags & STL_PM_PROCESS_ERRORINFO ? "On" : "Off"); } typedef struct _STL_PA_PM_Cfg_Data { diff --git a/IbAccess/Common/Inc/stl_pm.h b/IbAccess/Common/Inc/stl_pm.h index 57627a9..33be6cd 100644 --- a/IbAccess/Common/Inc/stl_pm.h +++ b/IbAccess/Common/Inc/stl_pm.h @@ -460,39 +460,29 @@ struct _port_error_info { uint32 Reserved2; } PACK_SUFFIX; +typedef union _STL_Error_Info_Mask { + uint32 AsReg32; + struct { IB_BITFIELD8(uint32, + PortRcvErrorInfo : 1, + ExcessiveBufferOverrunInfo : 1, + PortXmitConstraintErrorInfo : 1, + PortRcvConstraintErrorInfo : 1, + PortRcvSwitchRelayErrorInfo : 1, + UncorrectableErrorInfo : 1, + FMConfigErrorInfo : 1, + Reserved : 25) + } PACK_SUFFIX s; +} PACK_SUFFIX STLErrorInfoMask_t; + typedef struct _STL_Error_Info_Req { uint64 PortSelectMask[4]; /* signifies for which ports the PMA is to respond */ - union { - uint32 AsReg32; - struct { IB_BITFIELD8(uint32, - PortRcvErrorInfo : 1, - ExcessiveBufferOverrunInfo : 1, - PortXmitConstraintErrorInfo : 1, - PortRcvConstraintErrorInfo : 1, - PortRcvSwitchRelayErrorInfo : 1, - UncorrectableErrorInfo : 1, - FMConfigErrorInfo : 1, - Reserved : 25) - } PACK_SUFFIX s; - } ErrorInfoSelectMask; + STLErrorInfoMask_t ErrorInfoSelectMask; uint32 Reserved; } PACK_SUFFIX STLErrorInfoReq, STL_ERROR_INFO_REQ; typedef struct _STL_Error_Info_Rsp { uint64 PortSelectMask[4]; /* signifies for which ports the PMA is to respond */ - union { - uint32 AsReg32; - struct { IB_BITFIELD8(uint32, - PortRcvErrorInfo : 1, - ExcessiveBufferOverrunInfo : 1, - PortXmitConstraintErrorInfo : 1, - PortRcvConstraintErrorInfo : 1, - PortRcvSwitchRelayErrorInfo : 1, - UncorrectableErrorInfo : 1, - FMConfigErrorInfo : 1, - Reserved : 25) - } PACK_SUFFIX s; - } ErrorInfoSelectMask; + STLErrorInfoMask_t ErrorInfoSelectMask; uint32 Reserved; struct _port_error_info Port[1]; /* x defined by number of ports in attribute modifier */ } PACK_SUFFIX STLErrorInfoRsp, STL_ERROR_INFO_RSP; diff --git a/IbAccess/Common/Public/iquickmap.c b/IbAccess/Common/Public/iquickmap.c index bebe654..80c81ec 100644 --- a/IbAccess/Common/Public/iquickmap.c +++ b/IbAccess/Common/Public/iquickmap.c @@ -1,1994 +1,1994 @@ -/* BEGIN_ICS_COPYRIGHT6 **************************************** - -Copyright (c) 2015, Intel Corporation - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of Intel Corporation nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -** END_ICS_COPYRIGHT6 ****************************************/ - -/* This file incorporates work covered by the following copyright and permission notice */ - -/* -* Copyright (c) 2004-2006 Voltaire, Inc. All rights reserved. -* Copyright (c) 2002-2005 Mellanox Technologies LTD. All rights reserved. -* Copyright (c) 1996-2003 Intel Corporation. All rights reserved. -* -* This software is available to you under a choice of one of two -* licenses. You may choose to be licensed under the terms of the GNU -* General Public License (GPL) Version 2, available from the file -* COPYING in the main directory of this source tree, or the -* OpenIB.org BSD license below: -* -* Redistribution and use in source and binary forms, with or -* without modification, are permitted provided that the following -* conditions are met: -* -* - Redistributions of source code must retain the above -* copyright notice, this list of conditions and the following -* disclaimer. -* -* - Redistributions in binary form must reproduce the above -* copyright notice, this list of conditions and the following -* disclaimer in the documentation and/or other materials -* provided with the distribution. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS -* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -* SOFTWARE. -* -*/ - -/* - * Abstract: - * Implementation of quick map, a binary tree where the caller always provides - * all necessary storage. - * - * Environment: - * All - * - * $Revision$ - */ - - -/***************************************************************************** -* -* Map -* -* Map is an associative array. By providing a key, the caller can retrieve -* an object from the map. All objects in the map have an associated key, -* as specified by the caller when the object was inserted into the map. -* In addition to random access, the caller can traverse the map much like -* a linked list, either forwards from the first object or backwards from -* the last object. The objects in the map are always traversed in -* order since the nodes are stored sorted. -* -* This implementation of Map uses a red black tree verified against -* Cormen-Leiserson-Rivest text, McGraw-Hill Edition, fourteenth -* printing, 1994. -* -*****************************************************************************/ - - -#include -#include - - -/****************************************************************************** -******************************************************************************* -************** ************ -************** IMPLEMENTATION OF QUICK MAP ************ -************** ************ -******************************************************************************* -******************************************************************************/ - -/* - * Get the root. - */ -static inline cl_map_item_t* -__cl_map_root( - IN const cl_qmap_t* const p_map ) -{ - ASSERT( p_map ); - return( p_map->root.p_left ); -} - - -/* - * Returns whether a given item is on the left of its parent. - */ -static boolean -__cl_map_is_left_child( - IN const cl_map_item_t* const p_item ) -{ - ASSERT( p_item ); - ASSERT( p_item->p_up ); - ASSERT( p_item->p_up != p_item ); - - return( p_item->p_up->p_left == p_item ); -} - - -/* - * Retrieve the pointer to the parent's pointer to an item. - */ -static cl_map_item_t** -__cl_map_get_parent_ptr_to_item( - IN cl_map_item_t* const p_item ) -{ - ASSERT( p_item ); - ASSERT( p_item->p_up ); - ASSERT( p_item->p_up != p_item ); - - if( __cl_map_is_left_child( p_item ) ) - return( &p_item->p_up->p_left ); - - ASSERT( p_item->p_up->p_right == p_item ); - return( &p_item->p_up->p_right ); -} - - -/* - * Rotate a node to the left. This rotation affects the least number of links - * between nodes and brings the level of C up by one while increasing the depth - * of A one. Note that the links to/from W, X, Y, and Z are not affected. - * - * R R - * | | - * A C - * / \ / \ - * W C A Z - * / \ / \ - * B Z W B - * / \ / \ - * X Y X Y - */ -static void -__cl_map_rot_left( - IN cl_qmap_t* const p_map, - IN cl_map_item_t* const p_item ) -{ - cl_map_item_t **pp_root; - - ASSERT( p_map ); - ASSERT( p_item ); - ASSERT( p_item->p_right != &p_map->nil_item ); - - pp_root = __cl_map_get_parent_ptr_to_item( p_item ); - - /* Point R to C instead of A. */ - *pp_root = p_item->p_right; - /* Set C's parent to R. */ - (*pp_root)->p_up = p_item->p_up; - - /* Set A's right to B */ - p_item->p_right = (*pp_root)->p_left; - /* - * Set B's parent to A. We trap for B being NIL since the - * caller may depend on NIL not changing. - */ - if( (*pp_root)->p_left != &p_map->nil_item ) - (*pp_root)->p_left->p_up = p_item; - - /* Set C's left to A. */ - (*pp_root)->p_left = p_item; - /* Set A's parent to C. */ - p_item->p_up = *pp_root; -} - - -/* - * Rotate a node to the right. This rotation affects the least number of links - * between nodes and brings the level of A up by one while increasing the depth - * of C one. Note that the links to/from W, X, Y, and Z are not affected. - * - * R R - * | | - * C A - * / \ / \ - * A Z W C - * / \ / \ - * W B B Z - * / \ / \ - * X Y X Y - */ -static void -__cl_map_rot_right( - IN cl_qmap_t* const p_map, - IN cl_map_item_t* const p_item ) -{ - cl_map_item_t **pp_root; - - ASSERT( p_map ); - ASSERT( p_item ); - ASSERT( p_item->p_left != &p_map->nil_item ); - - /* Point R to A instead of C. */ - pp_root = __cl_map_get_parent_ptr_to_item( p_item ); - (*pp_root) = p_item->p_left; - /* Set A's parent to R. */ - (*pp_root)->p_up = p_item->p_up; - - /* Set C's left to B */ - p_item->p_left = (*pp_root)->p_right; - /* - * Set B's parent to C. We trap for B being NIL since the - * caller may depend on NIL not changing. - */ - if( (*pp_root)->p_right != &p_map->nil_item ) - (*pp_root)->p_right->p_up = p_item; - - /* Set A's right to C. */ - (*pp_root)->p_right = p_item; - /* Set C's parent to A. */ - p_item->p_up = *pp_root; -} - - -void -cl_qmap_init( - IN cl_qmap_t* const p_map, - IN cl_pfn_qmap_compare_key_t key_compare) -{ - ASSERT( p_map ); - - MemoryClear( p_map, sizeof(cl_qmap_t) ); - - /* special setup for the root node */ - p_map->root.p_up = &p_map->root; - p_map->root.p_left = &p_map->nil_item; - p_map->root.p_right = &p_map->nil_item; - p_map->root.color = CL_MAP_BLACK; -#if QMAP_DEBUG - p_map->root.p_map = p_map; -#endif - - /* Setup the node used as terminator for all leaves. */ - p_map->nil_item.p_up = &p_map->nil_item; - p_map->nil_item.p_left = &p_map->nil_item; - p_map->nil_item.p_right = &p_map->nil_item; - p_map->nil_item.color = CL_MAP_BLACK; -#if QMAP_DEBUG - p_map->nil_item.p_map = p_map; -#endif - - p_map->state = CL_INITIALIZED; - p_map->key_compare = key_compare; - - cl_qmap_remove_all( p_map ); -} - - -cl_map_item_t* -cl_qmap_get( - IN const cl_qmap_t* const p_map, - IN const uint64 key ) -{ - cl_map_item_t *p_item; - - ASSERT( p_map ); - ASSERT( p_map->state == CL_INITIALIZED ); - - p_item = __cl_map_root( p_map ); - - if (p_map->key_compare == NULL) - { - while( p_item != &p_map->nil_item ) - { - if( key == p_item->key ) - break; /* just right */ - - if( key < p_item->key ) - p_item = p_item->p_left; /* too small */ - else - p_item = p_item->p_right; /* too big */ - } - } else { - while( p_item != &p_map->nil_item ) - { - int compare_res = (*p_map->key_compare)(p_item->key, key); - if( compare_res == 0 ) /* key == p_item->key */ - break; /* just right */ - - if( compare_res > 0 ) /* p_item->key > key */ - p_item = p_item->p_left; /* too small */ - else - p_item = p_item->p_right; /* too big */ - } - } - - return( p_item ); -} - -cl_map_item_t* -cl_qmap_get_next( - IN const cl_qmap_t* const p_map, - IN const uint64 key ) -{ - cl_map_item_t *p_item; - cl_map_item_t *p_item_found; - - ASSERT( p_map ); - ASSERT( p_map->state == CL_INITIALIZED ); - - p_item = __cl_map_root( p_map ); - p_item_found = (cl_map_item_t*)&p_map->nil_item; - - if (p_map->key_compare == NULL) - { - while( p_item != &p_map->nil_item ) - { - if( key < p_item->key ){ - p_item_found = p_item; - p_item = p_item->p_left; - }else{ - p_item = p_item->p_right; - } - } - } else { - while( p_item != &p_map->nil_item ) - { - int compare_res = (*p_map->key_compare)(p_item->key, key); - - if( compare_res < 0 ){ - p_item_found = p_item; - p_item = p_item->p_left; - }else{ - p_item = p_item->p_right; - } - } - } - - return( p_item_found ); -} - - -cl_map_item_t* -cl_qmap_get_compare( - IN const cl_qmap_t* const p_map, - IN const uint64 key, - IN cl_pfn_qmap_compare_key_t key_compare) -{ - cl_map_item_t *p_item; - - ASSERT( p_map ); - ASSERT( p_map->state == CL_INITIALIZED ); - ASSERT( key_compare != NULL); - - p_item = __cl_map_root( p_map ); - - while( p_item != &p_map->nil_item ) - { - int compare_res = (*key_compare)(p_item->key, key); - if( compare_res == 0 ) /* key == p_item->key */ - break; /* just right */ - - if( compare_res > 0 ) /* p_item->key > key */ - p_item = p_item->p_left; /* too small */ - else - p_item = p_item->p_right; /* too big */ - } - - return( p_item ); -} - -cl_map_item_t* -cl_qmap_get_item_compare( - IN const cl_qmap_t* const p_map, - IN const uint64 key, - IN cl_pfn_qmap_item_compare_t compare) -{ - cl_map_item_t *p_item; - - ASSERT( p_map ); - ASSERT( p_map->state == CL_INITIALIZED ); - ASSERT( compare != NULL); - - p_item = __cl_map_root( p_map ); - - while( p_item != &p_map->nil_item ) - { - int compare_res = (*compare)(p_item, key); - if( compare_res == 0 ) /* key == p_item->key */ - break; /* just right */ - - if( compare_res > 0 ) /* p_item->key > key */ - p_item = p_item->p_left; /* too small */ - else - p_item = p_item->p_right; /* too big */ - } - - return( p_item ); -} - -void -cl_qmap_apply_func( - IN const cl_qmap_t* const p_map, - IN cl_pfn_qmap_apply_t pfn_func, - IN const void* const context ) -{ - cl_map_item_t* p_map_item; - - /* Note that context can have any arbitrary value. */ - ASSERT( p_map ); - ASSERT( p_map->state == CL_INITIALIZED ); - ASSERT( pfn_func ); - - p_map_item = cl_qmap_head( p_map ); - while( p_map_item != cl_qmap_end( p_map ) ) - { - pfn_func( p_map_item, (void*)context ); - p_map_item = cl_qmap_next( p_map_item ); - } -} - - -/* - * Balance a tree starting at a given item back to the root. - */ -static void -__cl_map_ins_bal( - IN cl_qmap_t* const p_map, - IN cl_map_item_t* p_item ) -{ - cl_map_item_t* p_grand_uncle; - - ASSERT( p_map ); - ASSERT( p_item ); - ASSERT( p_item != &p_map->root ); - - while( p_item->p_up->color == CL_MAP_RED ) - { - if( __cl_map_is_left_child( p_item->p_up ) ) - { - p_grand_uncle = p_item->p_up->p_up->p_right; - ASSERT( p_grand_uncle ); - if( p_grand_uncle->color == CL_MAP_RED ) - { - p_grand_uncle->color = CL_MAP_BLACK; - p_item->p_up->color = CL_MAP_BLACK; - p_item->p_up->p_up->color = CL_MAP_RED; - p_item = p_item->p_up->p_up; - continue; - } - - if( !__cl_map_is_left_child( p_item ) ) - { - p_item = p_item->p_up; - __cl_map_rot_left( p_map, p_item ); - } - p_item->p_up->color = CL_MAP_BLACK; - p_item->p_up->p_up->color = CL_MAP_RED; - __cl_map_rot_right( p_map, p_item->p_up->p_up ); - } - else - { - p_grand_uncle = p_item->p_up->p_up->p_left; - ASSERT( p_grand_uncle ); - if( p_grand_uncle->color == CL_MAP_RED ) - { - p_grand_uncle->color = CL_MAP_BLACK; - p_item->p_up->color = CL_MAP_BLACK; - p_item->p_up->p_up->color = CL_MAP_RED; - p_item = p_item->p_up->p_up; - continue; - } - - if( __cl_map_is_left_child( p_item ) ) - { - p_item = p_item->p_up; - __cl_map_rot_right( p_map, p_item ); - } - p_item->p_up->color = CL_MAP_BLACK; - p_item->p_up->p_up->color = CL_MAP_RED; - __cl_map_rot_left( p_map, p_item->p_up->p_up ); - } - } -} - - -cl_map_item_t* -cl_qmap_insert( - IN cl_qmap_t* const p_map, - IN const uint64 key, - IN cl_map_item_t* const p_item ) -{ - cl_map_item_t *p_insert_at, *p_comp_item; - int compare_res = 0; - - ASSERT( p_map ); - ASSERT( p_map->state == CL_INITIALIZED ); - ASSERT( p_item ); - ASSERT( p_map->root.p_up == &p_map->root ); - ASSERT( p_map->root.color != CL_MAP_RED ); - ASSERT( p_map->nil_item.color != CL_MAP_RED ); - - /* Find the insertion location. */ - p_insert_at = &p_map->root; - p_comp_item = __cl_map_root( p_map ); - - if (p_map->key_compare == NULL) - { - while( p_comp_item != &p_map->nil_item ) - { - p_insert_at = p_comp_item; - - if( key == p_insert_at->key ) - return( p_insert_at ); - - /* Traverse the tree until the correct insertion point is found. */ - if( key < p_insert_at->key ) - { - p_comp_item = p_insert_at->p_left; - compare_res = 1; - } else { - p_comp_item = p_insert_at->p_right; - compare_res = -1; - } - } - } else { - while( p_comp_item != &p_map->nil_item ) - { - p_insert_at = p_comp_item; - compare_res = (*p_map->key_compare)(p_insert_at->key, key); - - if( compare_res == 0 ) /* key == p_insert_at->key */ - return( p_insert_at ); - - /* Traverse the tree until the correct insertion point is found. */ - if( compare_res > 0 ) /* p_insert_at->key > key */ - p_comp_item = p_insert_at->p_left; - else - p_comp_item = p_insert_at->p_right; - } - } - - ASSERT( p_insert_at != &p_map->nil_item ); - ASSERT( p_comp_item == &p_map->nil_item ); - - /* Insert the item. */ - p_item->p_left = &p_map->nil_item; - p_item->p_right = &p_map->nil_item; - p_item->key = key; - p_item->color = CL_MAP_RED; - if( p_insert_at == &p_map->root ) - { - p_insert_at->p_left = p_item; - /* - * Primitive insert places the new item in front of - * the existing item. - */ - __cl_primitive_insert( &p_map->nil_item.pool_item.list_item, - &p_item->pool_item.list_item ); - } - else if( compare_res > 0 ) /* key < p_insert_at->key */ - { - p_insert_at->p_left = p_item; - /* - * Primitive insert places the new item in front of - * the existing item. - */ - __cl_primitive_insert( &p_insert_at->pool_item.list_item, - &p_item->pool_item.list_item ); - } - else - { - p_insert_at->p_right = p_item; - /* - * Primitive insert places the new item in front of - * the existing item. - */ - __cl_primitive_insert( p_insert_at->pool_item.list_item.p_next, - &p_item->pool_item.list_item ); - } - /* Increase the count. */ - p_map->count++; - - p_item->p_up = p_insert_at; - - /* - * We have added depth to this section of the tree. - * Rebalance as necessary as we retrace our path through the tree - * and update colors. - */ - __cl_map_ins_bal( p_map, p_item ); - - __cl_map_root( p_map )->color = CL_MAP_BLACK; - - /* - * Note that it is not necessary to re-color the nil node black because all - * red color assignments are made via the p_up pointer, and nil is never - * set as the value of a p_up pointer. - */ - -#if QMAP_DEBUG - /* Set the pointer to the map in the map item for consistency checking. */ - p_item->p_map = p_map; -#endif - - return( p_item ); -} - - -static void -__cl_map_del_bal( - IN cl_qmap_t* const p_map, - IN cl_map_item_t* p_item ) -{ - cl_map_item_t *p_uncle; - - while( (p_item->color != CL_MAP_RED) && (p_item->p_up != &p_map->root) ) - { - if( __cl_map_is_left_child( p_item ) ) - { - p_uncle = p_item->p_up->p_right; - - if( p_uncle->color == CL_MAP_RED ) - { - p_uncle->color = CL_MAP_BLACK; - p_item->p_up->color = CL_MAP_RED; - __cl_map_rot_left( p_map, p_item->p_up ); - p_uncle = p_item->p_up->p_right; - } - - if( p_uncle->p_right->color != CL_MAP_RED ) - { - if( p_uncle->p_left->color != CL_MAP_RED ) - { - p_uncle->color = CL_MAP_RED; - p_item = p_item->p_up; - continue; - } - - p_uncle->p_left->color = CL_MAP_BLACK; - p_uncle->color = CL_MAP_RED; - __cl_map_rot_right( p_map, p_uncle ); - p_uncle = p_item->p_up->p_right; - } - p_uncle->color = p_item->p_up->color; - p_item->p_up->color = CL_MAP_BLACK; - p_uncle->p_right->color = CL_MAP_BLACK; - __cl_map_rot_left( p_map, p_item->p_up ); - break; - } - else - { - p_uncle = p_item->p_up->p_left; - - if( p_uncle->color == CL_MAP_RED ) - { - p_uncle->color = CL_MAP_BLACK; - p_item->p_up->color = CL_MAP_RED; - __cl_map_rot_right( p_map, p_item->p_up ); - p_uncle = p_item->p_up->p_left; - } - - if( p_uncle->p_left->color != CL_MAP_RED ) - { - if( p_uncle->p_right->color != CL_MAP_RED ) - { - p_uncle->color = CL_MAP_RED; - p_item = p_item->p_up; - continue; - } - - p_uncle->p_right->color = CL_MAP_BLACK; - p_uncle->color = CL_MAP_RED; - __cl_map_rot_left( p_map, p_uncle ); - p_uncle = p_item->p_up->p_left; - } - p_uncle->color = p_item->p_up->color; - p_item->p_up->color = CL_MAP_BLACK; - p_uncle->p_left->color = CL_MAP_BLACK; - __cl_map_rot_right( p_map, p_item->p_up ); - break; - } - } - p_item->color = CL_MAP_BLACK; -} - -void -cl_qmap_remove_item( - IN cl_qmap_t* const p_map, - IN cl_map_item_t* const p_item ) -{ - cl_map_item_t *p_child, *p_del_item; - - ASSERT( p_map ); - ASSERT( p_map->state == CL_INITIALIZED ); - ASSERT( p_item ); -#if QMAP_DEBUG - ASSERT( p_item->p_map == p_map ); -#endif - - if( p_item == cl_qmap_end( p_map ) ) - return; - - if( (p_item->p_right == &p_map->nil_item) || (p_item->p_left == &p_map->nil_item ) ) - { - /* The item being removed has children on at most on side. */ - p_del_item = p_item; - } - else - { - /* - * The item being removed has children on both side. - * We select the item that will replace it. After removing - * the substitute item and rebalancing, the tree will have the - * correct topology. Exchanging the substitute for the item - * will finalize the removal. - */ - p_del_item = cl_qmap_next( p_item ); - ASSERT( p_del_item != &p_map->nil_item ); - } - - /* Remove the item from the list. */ - __cl_primitive_remove( &p_item->pool_item.list_item ); - /* Decrement the item count. */ - p_map->count--; - - /* Get the pointer to the new root's child, if any. */ - if( p_del_item->p_left != &p_map->nil_item ) - p_child = p_del_item->p_left; - else - p_child = p_del_item->p_right; - - /* - * This assignment may modify the parent pointer of the nil node. - * This is inconsequential. - */ - p_child->p_up = p_del_item->p_up; - (*__cl_map_get_parent_ptr_to_item( p_del_item )) = p_child; - - if( p_del_item->color != CL_MAP_RED ) - __cl_map_del_bal( p_map, p_child ); - - /* - * Note that the splicing done below does not need to occur before - * the tree is balanced, since the actual topology changes are made by the - * preceding code. The topology is preserved by the color assignment made - * below (reader should be reminded that p_del_item == p_item in some cases). - */ - if( p_del_item != p_item ) - { - /* - * Finalize the removal of the specified item by exchanging it with - * the substitute which we removed above. - */ - p_del_item->p_up = p_item->p_up; - p_del_item->p_left = p_item->p_left; - p_del_item->p_right = p_item->p_right; - (*__cl_map_get_parent_ptr_to_item( p_item )) = p_del_item; - p_item->p_right->p_up = p_del_item; - p_item->p_left->p_up = p_del_item; - p_del_item->color = p_item->color; - } - - ASSERT( p_map->nil_item.color != CL_MAP_RED ); - -#if QMAP_DEBUG - /* Clear the pointer to the map since the item has been removed. */ - p_item->p_map = NULL; -#endif -} - - -cl_map_item_t* -cl_qmap_remove( - IN cl_qmap_t* const p_map, - IN const uint64 key ) -{ - cl_map_item_t *p_item; - - ASSERT( p_map ); - ASSERT( p_map->state == CL_INITIALIZED ); - - /* Seek the node with the specified key */ - p_item = cl_qmap_get( p_map, key ); - - cl_qmap_remove_item( p_map, p_item ); - - return( p_item ); -} - -cl_map_item_t* -cl_qmap_remove_compare( - IN cl_qmap_t* const p_map, - IN const uint64 key, - IN cl_pfn_qmap_compare_key_t key_compare) -{ - cl_map_item_t *p_item; - - ASSERT( p_map ); - ASSERT( p_map->state == CL_INITIALIZED ); - - /* Seek the node with the specified key */ - p_item = cl_qmap_get_compare( p_map, key, key_compare ); - - cl_qmap_remove_item( p_map, p_item ); - - return( p_item ); -} - -void -cl_qmap_merge( - OUT cl_qmap_t* const p_dest_map, - IN OUT cl_qmap_t* const p_src_map ) -{ - cl_map_item_t *p_item, *p_item2, *p_next; - - ASSERT( p_dest_map ); - ASSERT( p_src_map ); - ASSERT( p_src_map->key_compare == p_dest_map->key_compare ); - - p_item = cl_qmap_head( p_src_map ); - - while( p_item != cl_qmap_end( p_src_map ) ) - { - p_next = cl_qmap_next( p_item ); - - /* Remove the item from its current map. */ - cl_qmap_remove_item( p_src_map, p_item ); - /* Insert the item into the destination map. */ - p_item2 = cl_qmap_insert( p_dest_map, cl_qmap_key( p_item ), p_item ); - /* Check that the item was successfully inserted. */ - if( p_item2 != p_item ) - { - /* Put the item in back in the source map. */ - p_item2 = - cl_qmap_insert( p_src_map, cl_qmap_key( p_item ), p_item ); - ASSERT( p_item2 == p_item ); - } - p_item = p_next; - } -} - - -static void -__cl_qmap_delta_move( - IN OUT cl_qmap_t* const p_dest, - IN OUT cl_qmap_t* const p_src, - IN OUT cl_map_item_t** const pp_item ) -{ - cl_map_item_t *p_temp, *p_next; - - /* - * Get the next item so that we can ensure that pp_item points to - * a valid item upon return from the function. - */ - p_next = cl_qmap_next( *pp_item ); - /* Move the old item from its current map the the old map. */ - cl_qmap_remove_item( p_src, *pp_item ); - p_temp = cl_qmap_insert( p_dest, cl_qmap_key( *pp_item ), *pp_item ); - /* We should never have duplicates. */ - ASSERT( p_temp == *pp_item ); - /* Point pp_item to a valid item in the source map. */ - (*pp_item) = p_next; -} - - -void -cl_qmap_delta( - IN OUT cl_qmap_t* const p_map1, - IN OUT cl_qmap_t* const p_map2, - OUT cl_qmap_t* const p_new, - OUT cl_qmap_t* const p_old ) -{ - cl_map_item_t *p_item1, *p_item2; - uint64 key1, key2; - - ASSERT( p_map1 ); - ASSERT( p_map2 ); - ASSERT( p_new ); - ASSERT( p_old ); - ASSERT( cl_is_qmap_empty( p_new ) ); - ASSERT( cl_is_qmap_empty( p_old ) ); - ASSERT( p_map1->key_compare == p_map1->key_compare ); - - p_item1 = cl_qmap_head( p_map1 ); - p_item2 = cl_qmap_head( p_map2 ); - - while( p_item1 != cl_qmap_end( p_map1 ) && - p_item2 != cl_qmap_end( p_map2 ) ) - { - key1 = cl_qmap_key( p_item1 ); - key2 = cl_qmap_key( p_item2 ); - if( key1 < key2 ) - { - /* We found an old item. */ - __cl_qmap_delta_move( p_old, p_map1, &p_item1 ); - } - else if( key1 > key2 ) - { - /* We found a new item. */ - __cl_qmap_delta_move( p_new, p_map2, &p_item2 ); - } - else - { - /* Move both forward since they have the same key. */ - p_item1 = cl_qmap_next( p_item1 ); - p_item2 = cl_qmap_next( p_item2 ); - } - } - - /* Process the remainder if the end of either source map was reached. */ - while( p_item2 != cl_qmap_end( p_map2 ) ) - __cl_qmap_delta_move( p_new, p_map2, &p_item2 ); - - while( p_item1 != cl_qmap_end( p_map1 ) ) - __cl_qmap_delta_move( p_old, p_map1, &p_item1 ); -} - - -/****************************************************************************** -******************************************************************************* -************** ************ -************** IMPLEMENTATION OF MAP ************ -************** ************ -******************************************************************************* -******************************************************************************/ - - -#if 0 -#define MAP_GROW_SIZE 32 - - -void -cl_map_construct( - IN cl_map_t* const p_map ) -{ - ASSERT( p_map ); - - cl_qpool_construct( &p_map->pool ); -} - - -cl_status_t -cl_map_init( - IN cl_map_t* const p_map, - IN const size_t min_items ) -{ - size_t grow_size; - - ASSERT( p_map ); - - cl_qmap_init( &p_map->qmap ); - - /* - * We will grow by min_items/8 items at a time, with a minimum of - * MAP_GROW_SIZE. - */ - grow_size = min_items >> 3; - if( grow_size < MAP_GROW_SIZE ) - grow_size = MAP_GROW_SIZE; - - return( cl_qpool_init( &p_map->pool, min_items, 0, grow_size, - sizeof(cl_map_obj_t), NULL, NULL, NULL ) ); -} - - -void -cl_map_destroy( - IN cl_map_t* const p_map ) -{ - ASSERT( p_map ); - - cl_qpool_destroy( &p_map->pool ); -} - - -void* -cl_map_insert( - IN cl_map_t* const p_map, - IN const uint64 key, - IN const void* const p_object ) -{ - cl_map_obj_t *p_map_obj, *p_obj_at_key; - - ASSERT( p_map ); - - p_map_obj = (cl_map_obj_t*)cl_qpool_get( &p_map->pool ); - - if( !p_map_obj ) - return( NULL ); - - cl_qmap_set_obj( p_map_obj, p_object ); - - p_obj_at_key = - (cl_map_obj_t*)cl_qmap_insert( &p_map->qmap, key, &p_map_obj->item ); - - /* Return the item to the pool if insertion failed. */ - if( p_obj_at_key != p_map_obj ) - cl_qpool_put( &p_map->pool, &p_map_obj->item.pool_item ); - - return( cl_qmap_obj( p_obj_at_key ) ); -} - - -void* -cl_map_get( - IN const cl_map_t* const p_map, - IN const uint64 key ) -{ - cl_map_item_t *p_item; - - ASSERT( p_map ); - - p_item = cl_qmap_get( &p_map->qmap, key ); - - if( p_item == cl_qmap_end( &p_map->qmap ) ) - return( NULL ); - - return( cl_qmap_obj( PARENT_STRUCT( p_item, cl_map_obj_t, item ) ) ); -} - - -void -cl_map_remove_item( - IN cl_map_t* const p_map, - IN const cl_map_iterator_t itor ) -{ - ASSERT( itor->p_map == &p_map->qmap ); - - if( itor == cl_map_end( p_map ) ) - return; - - cl_qmap_remove_item( &p_map->qmap, (cl_map_item_t*)itor ); - cl_qpool_put( &p_map->pool, &((cl_map_item_t*)itor)->pool_item ); -} - - -void* -cl_map_remove( - IN cl_map_t* const p_map, - IN const uint64 key ) -{ - cl_map_item_t *p_item; - - ASSERT( p_map ); - - p_item = cl_qmap_remove( &p_map->qmap, key ); - - if( p_item == cl_qmap_end( &p_map->qmap ) ) - return( NULL ); - - cl_qpool_put( &p_map->pool, &p_item->pool_item ); - - return( cl_qmap_obj( (cl_map_obj_t*)p_item ) ); -} - - -void -cl_map_remove_all( - IN cl_map_t* const p_map ) -{ - cl_map_item_t *p_item; - - ASSERT( p_map ); - - /* Return all map items to the pool. */ - while( !cl_is_qmap_empty( &p_map->qmap ) ) - { - p_item = cl_qmap_head( &p_map->qmap ); - cl_qmap_remove_item( &p_map->qmap, p_item ); - cl_qpool_put( &p_map->pool, &p_item->pool_item ); - - if( !cl_is_qmap_empty( &p_map->qmap ) ) - { - p_item = cl_qmap_tail( &p_map->qmap ); - cl_qmap_remove_item( &p_map->qmap, p_item ); - cl_qpool_put( &p_map->pool, &p_item->pool_item ); - } - } -} - - -cl_status_t -cl_map_merge( - OUT cl_map_t* const p_dest_map, - IN OUT cl_map_t* const p_src_map ) -{ - cl_status_t status = CL_SUCCESS; - cl_map_iterator_t itor, next; - uint64 key; - void *p_obj, *p_obj2; - - ASSERT( p_dest_map ); - ASSERT( p_src_map ); - - itor = cl_map_head( p_src_map ); - while( itor != cl_map_end( p_src_map ) ) - { - next = cl_map_next( itor ); - - p_obj = cl_map_obj( itor ); - key = cl_map_key( itor ); - - cl_map_remove_item( p_src_map, itor ); - - /* Insert the object into the destination map. */ - p_obj2 = cl_map_insert( p_dest_map, key, p_obj ); - /* Trap for failure. */ - if( p_obj != p_obj2 ) - { - if( !p_obj2 ) - status = CL_INSUFFICIENT_MEMORY; - /* Put the object back in the source map. This must succeed. */ - p_obj2 = cl_map_insert( p_src_map, key, p_obj ); - ASSERT( p_obj == p_obj2 ); - /* If the failure was due to insufficient memory, return. */ - if( status != CL_SUCCESS ) - return( status ); - } - itor = next; - } - - return( CL_SUCCESS ); -} - - -static void -__cl_map_revert( - IN OUT cl_map_t* const p_map1, - IN OUT cl_map_t* const p_map2, - IN OUT cl_map_t* const p_new, - IN OUT cl_map_t* const p_old ) -{ - cl_status_t status; - - /* Restore the initial state. */ - status = cl_map_merge( p_map1, p_old ); - ASSERT( status == CL_SUCCESS ); - status = cl_map_merge( p_map2, p_new ); - ASSERT( status == CL_SUCCESS ); -} - - -static cl_status_t -__cl_map_delta_move( - OUT cl_map_t* const p_dest, - IN OUT cl_map_t* const p_src, - IN OUT cl_map_iterator_t* const p_itor ) -{ - cl_map_iterator_t next; - void *p_obj, *p_obj2; - uint64 key; - - /* Get a valid iterator so we can continue the loop. */ - next = cl_map_next( *p_itor ); - /* Get the pointer to the object for insertion. */ - p_obj = cl_map_obj( *p_itor ); - /* Get the key for the object. */ - key = cl_map_key( *p_itor ); - /* Move the object. */ - cl_map_remove_item( p_src, *p_itor ); - p_obj2 = cl_map_insert( p_dest, key, p_obj ); - /* Check for failure. We should never get a duplicate. */ - if( !p_obj2 ) - { - p_obj2 = cl_map_insert( p_src, key, p_obj ); - ASSERT( p_obj2 == p_obj ); - return( CL_INSUFFICIENT_MEMORY ); - } - - /* We should never get a duplicate */ - ASSERT( p_obj == p_obj2 ); - /* Update the iterator so that it is valid. */ - (*p_itor) = next; - - return( CL_SUCCESS ); -} - - -cl_status_t -cl_map_delta( - IN OUT cl_map_t* const p_map1, - IN OUT cl_map_t* const p_map2, - OUT cl_map_t* const p_new, - OUT cl_map_t* const p_old ) -{ - cl_map_iterator_t itor1, itor2; - uint64 key1, key2; - cl_status_t status; - - ASSERT( p_map1 ); - ASSERT( p_map2 ); - ASSERT( p_new ); - ASSERT( p_old ); - ASSERT( cl_is_map_empty( p_new ) ); - ASSERT( cl_is_map_empty( p_old ) ); - - itor1 = cl_map_head( p_map1 ); - itor2 = cl_map_head( p_map2 ); - - /* - * Note that the check is for the end, since duplicate items will remain - * in their respective maps. - */ - while( itor1 != cl_map_end( p_map1 ) && - itor2 != cl_map_end( p_map2 ) ) - { - key1 = cl_map_key( itor1 ); - key2 = cl_map_key( itor2 ); - if( key1 < key2 ) - { - status = __cl_map_delta_move( p_old, p_map1, &itor1 ); - /* Check for failure. */ - if( status != CL_SUCCESS ) - { - /* Restore the initial state. */ - __cl_map_revert( p_map1, p_map2, p_new, p_old ); - /* Return the failure status. */ - return( status ); - } - } - else if( key1 > key2 ) - { - status = __cl_map_delta_move( p_new, p_map2, &itor2 ); - if( status != CL_SUCCESS ) - { - /* Restore the initial state. */ - __cl_map_revert( p_map1, p_map2, p_new, p_old ); - /* Return the failure status. */ - return( status ); - } - } - else - { - /* Move both forward since they have the same key. */ - itor1 = cl_map_next( itor1 ); - itor2 = cl_map_next( itor2 ); - } - } - - /* Process the remainder if either source map is empty. */ - while( itor2 != cl_map_end( p_map2 ) ) - { - status = __cl_map_delta_move( p_new, p_map2, &itor2 ); - if( status != CL_SUCCESS ) - { - /* Restore the initial state. */ - __cl_map_revert( p_map1, p_map2, p_new, p_old ); - /* Return the failure status. */ - return( status ); - } - } - - while( itor1 != cl_map_end( p_map1 ) ) - { - status = __cl_map_delta_move( p_old, p_map1, &itor1 ); - if( status != CL_SUCCESS ) - { - /* Restore the initial state. */ - __cl_map_revert( p_map1, p_map2, p_new, p_old ); - /* Return the failure status. */ - return( status ); - } - } - - return( CL_SUCCESS ); -} - - -/****************************************************************************** -******************************************************************************* -************** ************ -************** IMPLEMENTATION OF FLEXI MAP ************ -************** ************ -******************************************************************************* -******************************************************************************/ - -/* - * Get the root. - */ -static inline cl_fmap_item_t* -__cl_fmap_root( - IN const cl_fmap_t* const p_map ) -{ - ASSERT( p_map ); - return( p_map->root.p_left ); -} - - -/* - * Returns whether a given item is on the left of its parent. - */ -static boolean -__cl_fmap_is_left_child( - IN const cl_fmap_item_t* const p_item ) -{ - ASSERT( p_item ); - ASSERT( p_item->p_up ); - ASSERT( p_item->p_up != p_item ); - - return( p_item->p_up->p_left == p_item ); -} - - -/* - * Retrieve the pointer to the parent's pointer to an item. - */ -static cl_fmap_item_t** -__cl_fmap_get_parent_ptr_to_item( - IN cl_fmap_item_t* const p_item ) -{ - ASSERT( p_item ); - ASSERT( p_item->p_up ); - ASSERT( p_item->p_up != p_item ); - - if( __cl_fmap_is_left_child( p_item ) ) - return( &p_item->p_up->p_left ); - - ASSERT( p_item->p_up->p_right == p_item ); - return( &p_item->p_up->p_right ); -} - - -/* - * Rotate a node to the left. This rotation affects the least number of links - * between nodes and brings the level of C up by one while increasing the depth - * of A one. Note that the links to/from W, X, Y, and Z are not affected. - * - * R R - * | | - * A C - * / \ / \ - * W C A Z - * / \ / \ - * B Z W B - * / \ / \ - * X Y X Y - */ -static void -__cl_fmap_rot_left( - IN cl_fmap_t* const p_map, - IN cl_fmap_item_t* const p_item ) -{ - cl_fmap_item_t **pp_root; - - ASSERT( p_map ); - ASSERT( p_item ); - ASSERT( p_item->p_right != &p_map->nil_item ); - - pp_root = __cl_fmap_get_parent_ptr_to_item( p_item ); - - /* Point R to C instead of A. */ - *pp_root = p_item->p_right; - /* Set C's parent to R. */ - (*pp_root)->p_up = p_item->p_up; - - /* Set A's right to B */ - p_item->p_right = (*pp_root)->p_left; - /* - * Set B's parent to A. We trap for B being NIL since the - * caller may depend on NIL not changing. - */ - if( (*pp_root)->p_left != &p_map->nil_item ) - (*pp_root)->p_left->p_up = p_item; - - /* Set C's left to A. */ - (*pp_root)->p_left = p_item; - /* Set A's parent to C. */ - p_item->p_up = *pp_root; -} - - -/* - * Rotate a node to the right. This rotation affects the least number of links - * between nodes and brings the level of A up by one while increasing the depth - * of C one. Note that the links to/from W, X, Y, and Z are not affected. - * - * R R - * | | - * C A - * / \ / \ - * A Z W C - * / \ / \ - * W B B Z - * / \ / \ - * X Y X Y - */ -static void -__cl_fmap_rot_right( - IN cl_fmap_t* const p_map, - IN cl_fmap_item_t* const p_item ) -{ - cl_fmap_item_t **pp_root; - - ASSERT( p_map ); - ASSERT( p_item ); - ASSERT( p_item->p_left != &p_map->nil_item ); - - /* Point R to A instead of C. */ - pp_root = __cl_fmap_get_parent_ptr_to_item( p_item ); - (*pp_root) = p_item->p_left; - /* Set A's parent to R. */ - (*pp_root)->p_up = p_item->p_up; - - /* Set C's left to B */ - p_item->p_left = (*pp_root)->p_right; - /* - * Set B's parent to C. We trap for B being NIL since the - * caller may depend on NIL not changing. - */ - if( (*pp_root)->p_right != &p_map->nil_item ) - (*pp_root)->p_right->p_up = p_item; - - /* Set A's right to C. */ - (*pp_root)->p_right = p_item; - /* Set C's parent to A. */ - p_item->p_up = *pp_root; -} - - -void -cl_fmap_init( - IN cl_fmap_t* const p_map, - IN cl_pfn_fmap_cmp_t pfn_compare ) -{ - ASSERT( p_map ); - ASSERT( pfn_compare ); - - MemoryClear( p_map, sizeof(cl_fmap_t) ); - - /* special setup for the root node */ - p_map->root.p_up = &p_map->root; - p_map->root.p_left = &p_map->nil_item; - p_map->root.p_right = &p_map->nil_item; - p_map->root.color = CL_MAP_BLACK; -#if QMAP_DEBUG - p_map->root.p_map = p_map; -#endif - - /* Setup the node used as terminator for all leaves. */ - p_map->nil_item.p_up = &p_map->nil_item; - p_map->nil_item.p_left = &p_map->nil_item; - p_map->nil_item.p_right = &p_map->nil_item; - p_map->nil_item.color = CL_MAP_BLACK; -#if QMAP_DEBUG - p_map->nil_item.p_map = p_map; -#endif - - /* Store the compare function pointer. */ - p_map->pfn_compare = pfn_compare; - - p_map->state = CL_INITIALIZED; - - cl_fmap_remove_all( p_map ); -} - - -cl_fmap_item_t* -cl_fmap_get( - IN const cl_fmap_t* const p_map, - IN const void* const p_key ) -{ - cl_fmap_item_t *p_item; - intn_t cmp; - - ASSERT( p_map ); - ASSERT( p_map->state == CL_INITIALIZED ); - - p_item = __cl_fmap_root( p_map ); - - while( p_item != &p_map->nil_item ) - { - cmp = p_map->pfn_compare( p_key, p_item->p_key ); - - if( !cmp ) - break; /* just right */ - - if( cmp < 0 ) - p_item = p_item->p_left; /* too small */ - else - p_item = p_item->p_right; /* too big */ - } - - return( p_item ); -} - - -void -cl_fmap_apply_func( - IN const cl_fmap_t* const p_map, - IN cl_pfn_fmap_apply_t pfn_func, - IN const void* const context ) -{ - cl_fmap_item_t* p_fmap_item; - - /* Note that context can have any arbitrary value. */ - ASSERT( p_map ); - ASSERT( p_map->state == CL_INITIALIZED ); - ASSERT( pfn_func ); - - p_fmap_item = cl_fmap_head( p_map ); - while( p_fmap_item != cl_fmap_end( p_map ) ) - { - pfn_func( p_fmap_item, (void*)context ); - p_fmap_item = cl_fmap_next( p_fmap_item ); - } -} - - -/* - * Balance a tree starting at a given item back to the root. - */ -static void -__cl_fmap_ins_bal( - IN cl_fmap_t* const p_map, - IN cl_fmap_item_t* p_item ) -{ - cl_fmap_item_t* p_grand_uncle; - - ASSERT( p_map ); - ASSERT( p_item ); - ASSERT( p_item != &p_map->root ); - - while( p_item->p_up->color == CL_MAP_RED ) - { - if( __cl_fmap_is_left_child( p_item->p_up ) ) - { - p_grand_uncle = p_item->p_up->p_up->p_right; - ASSERT( p_grand_uncle ); - if( p_grand_uncle->color == CL_MAP_RED ) - { - p_grand_uncle->color = CL_MAP_BLACK; - p_item->p_up->color = CL_MAP_BLACK; - p_item->p_up->p_up->color = CL_MAP_RED; - p_item = p_item->p_up->p_up; - continue; - } - - if( !__cl_fmap_is_left_child( p_item ) ) - { - p_item = p_item->p_up; - __cl_fmap_rot_left( p_map, p_item ); - } - p_item->p_up->color = CL_MAP_BLACK; - p_item->p_up->p_up->color = CL_MAP_RED; - __cl_fmap_rot_right( p_map, p_item->p_up->p_up ); - } - else - { - p_grand_uncle = p_item->p_up->p_up->p_left; - ASSERT( p_grand_uncle ); - if( p_grand_uncle->color == CL_MAP_RED ) - { - p_grand_uncle->color = CL_MAP_BLACK; - p_item->p_up->color = CL_MAP_BLACK; - p_item->p_up->p_up->color = CL_MAP_RED; - p_item = p_item->p_up->p_up; - continue; - } - - if( __cl_fmap_is_left_child( p_item ) ) - { - p_item = p_item->p_up; - __cl_fmap_rot_right( p_map, p_item ); - } - p_item->p_up->color = CL_MAP_BLACK; - p_item->p_up->p_up->color = CL_MAP_RED; - __cl_fmap_rot_left( p_map, p_item->p_up->p_up ); - } - } -} - - -cl_fmap_item_t* -cl_fmap_insert( - IN cl_fmap_t* const p_map, - IN const void* const p_key, - IN cl_fmap_item_t* const p_item ) -{ - cl_fmap_item_t *p_insert_at, *p_comp_item; - intn_t cmp = 0; - - ASSERT( p_map ); - ASSERT( p_map->state == CL_INITIALIZED ); - ASSERT( p_item ); - ASSERT( p_map->root.p_up == &p_map->root ); - ASSERT( p_map->root.color != CL_MAP_RED ); - ASSERT( p_map->nil_item.color != CL_MAP_RED ); - - p_item->p_left = &p_map->nil_item; - p_item->p_right = &p_map->nil_item; - p_item->p_key = p_key; - p_item->color = CL_MAP_RED; - - /* Find the insertion location. */ - p_insert_at = &p_map->root; - p_comp_item = __cl_fmap_root( p_map ); - - while( p_comp_item != &p_map->nil_item ) - { - p_insert_at = p_comp_item; - - cmp = p_map->pfn_compare( p_key, p_insert_at->p_key ); - - if( !cmp ) - return( p_insert_at ); - - /* Traverse the tree until the correct insertion point is found. */ - if( cmp < 0 ) - p_comp_item = p_insert_at->p_left; - else - p_comp_item = p_insert_at->p_right; - } - - ASSERT( p_insert_at != &p_map->nil_item ); - ASSERT( p_comp_item == &p_map->nil_item ); - /* Insert the item. */ - if( p_insert_at == &p_map->root ) - { - p_insert_at->p_left = p_item; - /* - * Primitive insert places the new item in front of - * the existing item. - */ - __cl_primitive_insert( &p_map->nil_item.pool_item.list_item, - &p_item->pool_item.list_item ); - } - else if( cmp < 0 ) - { - p_insert_at->p_left = p_item; - /* - * Primitive insert places the new item in front of - * the existing item. - */ - __cl_primitive_insert( &p_insert_at->pool_item.list_item, - &p_item->pool_item.list_item ); - } - else - { - p_insert_at->p_right = p_item; - /* - * Primitive insert places the new item in front of - * the existing item. - */ - __cl_primitive_insert( p_insert_at->pool_item.list_item.p_next, - &p_item->pool_item.list_item ); - } - /* Increase the count. */ - p_map->count++; - - p_item->p_up = p_insert_at; - - /* - * We have added depth to this section of the tree. - * Rebalance as necessary as we retrace our path through the tree - * and update colors. - */ - __cl_fmap_ins_bal( p_map, p_item ); - - __cl_fmap_root( p_map )->color = CL_MAP_BLACK; - - /* - * Note that it is not necessary to re-color the nil node black because all - * red color assignments are made via the p_up pointer, and nil is never - * set as the value of a p_up pointer. - */ - -#if QMAP_DEBUG - /* Set the pointer to the map in the map item for consistency checking. */ - p_item->p_map = p_map; -#endif - - return( p_item ); -} - - -static void -__cl_fmap_del_bal( - IN cl_fmap_t* const p_map, - IN cl_fmap_item_t* p_item ) -{ - cl_fmap_item_t *p_uncle; - - while( (p_item->color != CL_MAP_RED) && (p_item->p_up != &p_map->root) ) - { - if( __cl_fmap_is_left_child( p_item ) ) - { - p_uncle = p_item->p_up->p_right; - - if( p_uncle->color == CL_MAP_RED ) - { - p_uncle->color = CL_MAP_BLACK; - p_item->p_up->color = CL_MAP_RED; - __cl_fmap_rot_left( p_map, p_item->p_up ); - p_uncle = p_item->p_up->p_right; - } - - if( p_uncle->p_right->color != CL_MAP_RED ) - { - if( p_uncle->p_left->color != CL_MAP_RED ) - { - p_uncle->color = CL_MAP_RED; - p_item = p_item->p_up; - continue; - } - - p_uncle->p_left->color = CL_MAP_BLACK; - p_uncle->color = CL_MAP_RED; - __cl_fmap_rot_right( p_map, p_uncle ); - p_uncle = p_item->p_up->p_right; - } - p_uncle->color = p_item->p_up->color; - p_item->p_up->color = CL_MAP_BLACK; - p_uncle->p_right->color = CL_MAP_BLACK; - __cl_fmap_rot_left( p_map, p_item->p_up ); - break; - } - else - { - p_uncle = p_item->p_up->p_left; - - if( p_uncle->color == CL_MAP_RED ) - { - p_uncle->color = CL_MAP_BLACK; - p_item->p_up->color = CL_MAP_RED; - __cl_fmap_rot_right( p_map, p_item->p_up ); - p_uncle = p_item->p_up->p_left; - } - - if( p_uncle->p_left->color != CL_MAP_RED ) - { - if( p_uncle->p_right->color != CL_MAP_RED ) - { - p_uncle->color = CL_MAP_RED; - p_item = p_item->p_up; - continue; - } - - p_uncle->p_right->color = CL_MAP_BLACK; - p_uncle->color = CL_MAP_RED; - __cl_fmap_rot_left( p_map, p_uncle ); - p_uncle = p_item->p_up->p_left; - } - p_uncle->color = p_item->p_up->color; - p_item->p_up->color = CL_MAP_BLACK; - p_uncle->p_left->color = CL_MAP_BLACK; - __cl_fmap_rot_right( p_map, p_item->p_up ); - break; - } - } - p_item->color = CL_MAP_BLACK; -} - - -void -cl_fmap_remove_item( - IN cl_fmap_t* const p_map, - IN cl_fmap_item_t* const p_item ) -{ - cl_fmap_item_t *p_child, *p_del_item; - - ASSERT( p_map ); - ASSERT( p_map->state == CL_INITIALIZED ); - ASSERT( p_item ); -#if QMAP_DEBUG - ASSERT( p_item->p_map == p_map ); -#endif - - if( p_item == cl_fmap_end( p_map ) ) - return; - - if( (p_item->p_right == &p_map->nil_item) || (p_item->p_left == &p_map->nil_item ) ) - { - /* The item being removed has children on at most on side. */ - p_del_item = p_item; - } - else - { - /* - * The item being removed has children on both side. - * We select the item that will replace it. After removing - * the substitute item and rebalancing, the tree will have the - * correct topology. Exchanging the substitute for the item - * will finalize the removal. - */ - p_del_item = cl_fmap_next( p_item ); - ASSERT( p_del_item != &p_map->nil_item ); - } - - /* Remove the item from the list. */ - __cl_primitive_remove( &p_item->pool_item.list_item ); - /* Decrement the item count. */ - p_map->count--; - - /* Get the pointer to the new root's child, if any. */ - if( p_del_item->p_left != &p_map->nil_item ) - p_child = p_del_item->p_left; - else - p_child = p_del_item->p_right; - - /* - * This assignment may modify the parent pointer of the nil node. - * This is inconsequential. - */ - p_child->p_up = p_del_item->p_up; - (*__cl_fmap_get_parent_ptr_to_item( p_del_item )) = p_child; - - if( p_del_item->color != CL_MAP_RED ) - __cl_fmap_del_bal( p_map, p_child ); - - /* - * Note that the splicing done below does not need to occur before - * the tree is balanced, since the actual topology changes are made by the - * preceding code. The topology is preserved by the color assignment made - * below (reader should be reminded that p_del_item == p_item in some cases). - */ - if( p_del_item != p_item ) - { - /* - * Finalize the removal of the specified item by exchanging it with - * the substitute which we removed above. - */ - p_del_item->p_up = p_item->p_up; - p_del_item->p_left = p_item->p_left; - p_del_item->p_right = p_item->p_right; - (*__cl_fmap_get_parent_ptr_to_item( p_item )) = p_del_item; - p_item->p_right->p_up = p_del_item; - p_item->p_left->p_up = p_del_item; - p_del_item->color = p_item->color; - } - - ASSERT( p_map->nil_item.color != CL_MAP_RED ); - -#if QMAP_DEBUG - /* Clear the pointer to the map since the item has been removed. */ - p_item->p_map = NULL; -#endif -} - - -cl_fmap_item_t* -cl_fmap_remove( - IN cl_fmap_t* const p_map, - IN const void* const p_key ) -{ - cl_fmap_item_t *p_item; - - ASSERT( p_map ); - ASSERT( p_map->state == CL_INITIALIZED ); - - /* Seek the node with the specified key */ - p_item = cl_fmap_get( p_map, p_key ); - - cl_fmap_remove_item( p_map, p_item ); - - return( p_item ); -} - - -void -cl_fmap_merge( - OUT cl_fmap_t* const p_dest_map, - IN OUT cl_fmap_t* const p_src_map ) -{ - cl_fmap_item_t *p_item, *p_item2, *p_next; - - ASSERT( p_dest_map ); - ASSERT( p_src_map ); - - p_item = cl_fmap_head( p_src_map ); - - while( p_item != cl_fmap_end( p_src_map ) ) - { - p_next = cl_fmap_next( p_item ); - - /* Remove the item from its current map. */ - cl_fmap_remove_item( p_src_map, p_item ); - /* Insert the item into the destination map. */ - p_item2 = cl_fmap_insert( p_dest_map, cl_fmap_key( p_item ), p_item ); - /* Check that the item was successfully inserted. */ - if( p_item2 != p_item ) - { - /* Put the item in back in the source map. */ - p_item2 = - cl_fmap_insert( p_src_map, cl_fmap_key( p_item ), p_item ); - ASSERT( p_item2 == p_item ); - } - p_item = p_next; - } -} - - -static void -__cl_fmap_delta_move( - IN OUT cl_fmap_t* const p_dest, - IN OUT cl_fmap_t* const p_src, - IN OUT cl_fmap_item_t** const pp_item ) -{ - cl_fmap_item_t *p_temp, *p_next; - - /* - * Get the next item so that we can ensure that pp_item points to - * a valid item upon return from the function. - */ - p_next = cl_fmap_next( *pp_item ); - /* Move the old item from its current map the the old map. */ - cl_fmap_remove_item( p_src, *pp_item ); - p_temp = cl_fmap_insert( p_dest, cl_fmap_key( *pp_item ), *pp_item ); - /* We should never have duplicates. */ - ASSERT( p_temp == *pp_item ); - /* Point pp_item to a valid item in the source map. */ - (*pp_item) = p_next; -} - - -void -cl_fmap_delta( - IN OUT cl_fmap_t* const p_map1, - IN OUT cl_fmap_t* const p_map2, - OUT cl_fmap_t* const p_new, - OUT cl_fmap_t* const p_old ) -{ - cl_fmap_item_t *p_item1, *p_item2; - intn_t cmp; - - ASSERT( p_map1 ); - ASSERT( p_map2 ); - ASSERT( p_new ); - ASSERT( p_old ); - ASSERT( cl_is_fmap_empty( p_new ) ); - ASSERT( cl_is_fmap_empty( p_old ) ); - - p_item1 = cl_fmap_head( p_map1 ); - p_item2 = cl_fmap_head( p_map2 ); - - while( p_item1 != cl_fmap_end( p_map1 ) && - p_item2 != cl_fmap_end( p_map2 ) ) - { - cmp = p_map1->pfn_compare( cl_fmap_key( p_item1 ), - cl_fmap_key( p_item2 ) ); - if( cmp < 0 ) - { - /* We found an old item. */ - __cl_fmap_delta_move( p_old, p_map1, &p_item1 ); - } - else if( cmp > 0 ) - { - /* We found a new item. */ - __cl_fmap_delta_move( p_new, p_map2, &p_item2 ); - } - else - { - /* Move both forward since they have the same key. */ - p_item1 = cl_fmap_next( p_item1 ); - p_item2 = cl_fmap_next( p_item2 ); - } - } - - /* Process the remainder if the end of either source map was reached. */ - while( p_item2 != cl_fmap_end( p_map2 ) ) - __cl_fmap_delta_move( p_new, p_map2, &p_item2 ); - - while( p_item1 != cl_fmap_end( p_map1 ) ) - __cl_fmap_delta_move( p_old, p_map1, &p_item1 ); -} -#endif +/* BEGIN_ICS_COPYRIGHT6 **************************************** + +Copyright (c) 2015, Intel Corporation + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of Intel Corporation nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +** END_ICS_COPYRIGHT6 ****************************************/ + +/* This file incorporates work covered by the following copyright and permission notice */ + +/* +* Copyright (c) 2004-2006 Voltaire, Inc. All rights reserved. +* Copyright (c) 2002-2005 Mellanox Technologies LTD. All rights reserved. +* Copyright (c) 1996-2003 Intel Corporation. All rights reserved. +* +* This software is available to you under a choice of one of two +* licenses. You may choose to be licensed under the terms of the GNU +* General Public License (GPL) Version 2, available from the file +* COPYING in the main directory of this source tree, or the +* OpenIB.org BSD license below: +* +* Redistribution and use in source and binary forms, with or +* without modification, are permitted provided that the following +* conditions are met: +* +* - Redistributions of source code must retain the above +* copyright notice, this list of conditions and the following +* disclaimer. +* +* - Redistributions in binary form must reproduce the above +* copyright notice, this list of conditions and the following +* disclaimer in the documentation and/or other materials +* provided with the distribution. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +* SOFTWARE. +* +*/ + +/* + * Abstract: + * Implementation of quick map, a binary tree where the caller always provides + * all necessary storage. + * + * Environment: + * All + * + * $Revision$ + */ + + +/***************************************************************************** +* +* Map +* +* Map is an associative array. By providing a key, the caller can retrieve +* an object from the map. All objects in the map have an associated key, +* as specified by the caller when the object was inserted into the map. +* In addition to random access, the caller can traverse the map much like +* a linked list, either forwards from the first object or backwards from +* the last object. The objects in the map are always traversed in +* order since the nodes are stored sorted. +* +* This implementation of Map uses a red black tree verified against +* Cormen-Leiserson-Rivest text, McGraw-Hill Edition, fourteenth +* printing, 1994. +* +*****************************************************************************/ + + +#include +#include + + +/****************************************************************************** +******************************************************************************* +************** ************ +************** IMPLEMENTATION OF QUICK MAP ************ +************** ************ +******************************************************************************* +******************************************************************************/ + +/* + * Get the root. + */ +static inline cl_map_item_t* +__cl_map_root( + IN const cl_qmap_t* const p_map ) +{ + ASSERT( p_map ); + return( p_map->root.p_left ); +} + + +/* + * Returns whether a given item is on the left of its parent. + */ +static boolean +__cl_map_is_left_child( + IN const cl_map_item_t* const p_item ) +{ + ASSERT( p_item ); + ASSERT( p_item->p_up ); + ASSERT( p_item->p_up != p_item ); + + return( p_item->p_up->p_left == p_item ); +} + + +/* + * Retrieve the pointer to the parent's pointer to an item. + */ +static cl_map_item_t** +__cl_map_get_parent_ptr_to_item( + IN cl_map_item_t* const p_item ) +{ + ASSERT( p_item ); + ASSERT( p_item->p_up ); + ASSERT( p_item->p_up != p_item ); + + if( __cl_map_is_left_child( p_item ) ) + return( &p_item->p_up->p_left ); + + ASSERT( p_item->p_up->p_right == p_item ); + return( &p_item->p_up->p_right ); +} + + +/* + * Rotate a node to the left. This rotation affects the least number of links + * between nodes and brings the level of C up by one while increasing the depth + * of A one. Note that the links to/from W, X, Y, and Z are not affected. + * + * R R + * | | + * A C + * / \ / \ + * W C A Z + * / \ / \ + * B Z W B + * / \ / \ + * X Y X Y + */ +static void +__cl_map_rot_left( + IN cl_qmap_t* const p_map, + IN cl_map_item_t* const p_item ) +{ + cl_map_item_t **pp_root; + + ASSERT( p_map ); + ASSERT( p_item ); + ASSERT( p_item->p_right != &p_map->nil_item ); + + pp_root = __cl_map_get_parent_ptr_to_item( p_item ); + + /* Point R to C instead of A. */ + *pp_root = p_item->p_right; + /* Set C's parent to R. */ + (*pp_root)->p_up = p_item->p_up; + + /* Set A's right to B */ + p_item->p_right = (*pp_root)->p_left; + /* + * Set B's parent to A. We trap for B being NIL since the + * caller may depend on NIL not changing. + */ + if( (*pp_root)->p_left != &p_map->nil_item ) + (*pp_root)->p_left->p_up = p_item; + + /* Set C's left to A. */ + (*pp_root)->p_left = p_item; + /* Set A's parent to C. */ + p_item->p_up = *pp_root; +} + + +/* + * Rotate a node to the right. This rotation affects the least number of links + * between nodes and brings the level of A up by one while increasing the depth + * of C one. Note that the links to/from W, X, Y, and Z are not affected. + * + * R R + * | | + * C A + * / \ / \ + * A Z W C + * / \ / \ + * W B B Z + * / \ / \ + * X Y X Y + */ +static void +__cl_map_rot_right( + IN cl_qmap_t* const p_map, + IN cl_map_item_t* const p_item ) +{ + cl_map_item_t **pp_root; + + ASSERT( p_map ); + ASSERT( p_item ); + ASSERT( p_item->p_left != &p_map->nil_item ); + + /* Point R to A instead of C. */ + pp_root = __cl_map_get_parent_ptr_to_item( p_item ); + (*pp_root) = p_item->p_left; + /* Set A's parent to R. */ + (*pp_root)->p_up = p_item->p_up; + + /* Set C's left to B */ + p_item->p_left = (*pp_root)->p_right; + /* + * Set B's parent to C. We trap for B being NIL since the + * caller may depend on NIL not changing. + */ + if( (*pp_root)->p_right != &p_map->nil_item ) + (*pp_root)->p_right->p_up = p_item; + + /* Set A's right to C. */ + (*pp_root)->p_right = p_item; + /* Set C's parent to A. */ + p_item->p_up = *pp_root; +} + + +void +cl_qmap_init( + IN cl_qmap_t* const p_map, + IN cl_pfn_qmap_compare_key_t key_compare) +{ + ASSERT( p_map ); + + MemoryClear( p_map, sizeof(cl_qmap_t) ); + + /* special setup for the root node */ + p_map->root.p_up = &p_map->root; + p_map->root.p_left = &p_map->nil_item; + p_map->root.p_right = &p_map->nil_item; + p_map->root.color = CL_MAP_BLACK; +#if QMAP_DEBUG + p_map->root.p_map = p_map; +#endif + + /* Setup the node used as terminator for all leaves. */ + p_map->nil_item.p_up = &p_map->nil_item; + p_map->nil_item.p_left = &p_map->nil_item; + p_map->nil_item.p_right = &p_map->nil_item; + p_map->nil_item.color = CL_MAP_BLACK; +#if QMAP_DEBUG + p_map->nil_item.p_map = p_map; +#endif + + p_map->state = CL_INITIALIZED; + p_map->key_compare = key_compare; + + cl_qmap_remove_all( p_map ); +} + + +cl_map_item_t* +cl_qmap_get( + IN const cl_qmap_t* const p_map, + IN const uint64 key ) +{ + cl_map_item_t *p_item; + + ASSERT( p_map ); + ASSERT( p_map->state == CL_INITIALIZED ); + + p_item = __cl_map_root( p_map ); + + if (p_map->key_compare == NULL) + { + while( p_item != &p_map->nil_item ) + { + if( key == p_item->key ) + break; /* just right */ + + if( key < p_item->key ) + p_item = p_item->p_left; /* too small */ + else + p_item = p_item->p_right; /* too big */ + } + } else { + while( p_item != &p_map->nil_item ) + { + int compare_res = (*p_map->key_compare)(p_item->key, key); + if( compare_res == 0 ) /* key == p_item->key */ + break; /* just right */ + + if( compare_res > 0 ) /* p_item->key > key */ + p_item = p_item->p_left; /* too small */ + else + p_item = p_item->p_right; /* too big */ + } + } + + return( p_item ); +} + +cl_map_item_t* +cl_qmap_get_next( + IN const cl_qmap_t* const p_map, + IN const uint64 key ) +{ + cl_map_item_t *p_item; + cl_map_item_t *p_item_found; + + ASSERT( p_map ); + ASSERT( p_map->state == CL_INITIALIZED ); + + p_item = __cl_map_root( p_map ); + p_item_found = (cl_map_item_t*)&p_map->nil_item; + + if (p_map->key_compare == NULL) + { + while( p_item != &p_map->nil_item ) + { + if( key < p_item->key ){ + p_item_found = p_item; + p_item = p_item->p_left; + }else{ + p_item = p_item->p_right; + } + } + } else { + while( p_item != &p_map->nil_item ) + { + int compare_res = (*p_map->key_compare)(p_item->key, key); + + if( compare_res < 0 ){ + p_item_found = p_item; + p_item = p_item->p_left; + }else{ + p_item = p_item->p_right; + } + } + } + + return( p_item_found ); +} + + +cl_map_item_t* +cl_qmap_get_compare( + IN const cl_qmap_t* const p_map, + IN const uint64 key, + IN cl_pfn_qmap_compare_key_t key_compare) +{ + cl_map_item_t *p_item; + + ASSERT( p_map ); + ASSERT( p_map->state == CL_INITIALIZED ); + ASSERT( key_compare != NULL); + + p_item = __cl_map_root( p_map ); + + while( p_item != &p_map->nil_item ) + { + int compare_res = (*key_compare)(p_item->key, key); + if( compare_res == 0 ) /* key == p_item->key */ + break; /* just right */ + + if( compare_res > 0 ) /* p_item->key > key */ + p_item = p_item->p_left; /* too small */ + else + p_item = p_item->p_right; /* too big */ + } + + return( p_item ); +} + +cl_map_item_t* +cl_qmap_get_item_compare( + IN const cl_qmap_t* const p_map, + IN const uint64 key, + IN cl_pfn_qmap_item_compare_t compare) +{ + cl_map_item_t *p_item; + + ASSERT( p_map ); + ASSERT( p_map->state == CL_INITIALIZED ); + ASSERT( compare != NULL); + + p_item = __cl_map_root( p_map ); + + while( p_item != &p_map->nil_item ) + { + int compare_res = (*compare)(p_item, key); + if( compare_res == 0 ) /* key == p_item->key */ + break; /* just right */ + + if( compare_res > 0 ) /* p_item->key > key */ + p_item = p_item->p_left; /* too small */ + else + p_item = p_item->p_right; /* too big */ + } + + return( p_item ); +} + +void +cl_qmap_apply_func( + IN const cl_qmap_t* const p_map, + IN cl_pfn_qmap_apply_t pfn_func, + IN const void* const context ) +{ + cl_map_item_t* p_map_item; + + /* Note that context can have any arbitrary value. */ + ASSERT( p_map ); + ASSERT( p_map->state == CL_INITIALIZED ); + ASSERT( pfn_func ); + + p_map_item = cl_qmap_head( p_map ); + while( p_map_item != cl_qmap_end( p_map ) ) + { + pfn_func( p_map_item, (void*)context ); + p_map_item = cl_qmap_next( p_map_item ); + } +} + + +/* + * Balance a tree starting at a given item back to the root. + */ +static void +__cl_map_ins_bal( + IN cl_qmap_t* const p_map, + IN cl_map_item_t* p_item ) +{ + cl_map_item_t* p_grand_uncle; + + ASSERT( p_map ); + ASSERT( p_item ); + ASSERT( p_item != &p_map->root ); + + while( p_item->p_up->color == CL_MAP_RED ) + { + if( __cl_map_is_left_child( p_item->p_up ) ) + { + p_grand_uncle = p_item->p_up->p_up->p_right; + ASSERT( p_grand_uncle ); + if( p_grand_uncle->color == CL_MAP_RED ) + { + p_grand_uncle->color = CL_MAP_BLACK; + p_item->p_up->color = CL_MAP_BLACK; + p_item->p_up->p_up->color = CL_MAP_RED; + p_item = p_item->p_up->p_up; + continue; + } + + if( !__cl_map_is_left_child( p_item ) ) + { + p_item = p_item->p_up; + __cl_map_rot_left( p_map, p_item ); + } + p_item->p_up->color = CL_MAP_BLACK; + p_item->p_up->p_up->color = CL_MAP_RED; + __cl_map_rot_right( p_map, p_item->p_up->p_up ); + } + else + { + p_grand_uncle = p_item->p_up->p_up->p_left; + ASSERT( p_grand_uncle ); + if( p_grand_uncle->color == CL_MAP_RED ) + { + p_grand_uncle->color = CL_MAP_BLACK; + p_item->p_up->color = CL_MAP_BLACK; + p_item->p_up->p_up->color = CL_MAP_RED; + p_item = p_item->p_up->p_up; + continue; + } + + if( __cl_map_is_left_child( p_item ) ) + { + p_item = p_item->p_up; + __cl_map_rot_right( p_map, p_item ); + } + p_item->p_up->color = CL_MAP_BLACK; + p_item->p_up->p_up->color = CL_MAP_RED; + __cl_map_rot_left( p_map, p_item->p_up->p_up ); + } + } +} + + +cl_map_item_t* +cl_qmap_insert( + IN cl_qmap_t* const p_map, + IN const uint64 key, + IN cl_map_item_t* const p_item ) +{ + cl_map_item_t *p_insert_at, *p_comp_item; + int compare_res = 0; + + ASSERT( p_map ); + ASSERT( p_map->state == CL_INITIALIZED ); + ASSERT( p_item ); + ASSERT( p_map->root.p_up == &p_map->root ); + ASSERT( p_map->root.color != CL_MAP_RED ); + ASSERT( p_map->nil_item.color != CL_MAP_RED ); + + /* Find the insertion location. */ + p_insert_at = &p_map->root; + p_comp_item = __cl_map_root( p_map ); + + if (p_map->key_compare == NULL) + { + while( p_comp_item != &p_map->nil_item ) + { + p_insert_at = p_comp_item; + + if( key == p_insert_at->key ) + return( p_insert_at ); + + /* Traverse the tree until the correct insertion point is found. */ + if( key < p_insert_at->key ) + { + p_comp_item = p_insert_at->p_left; + compare_res = 1; + } else { + p_comp_item = p_insert_at->p_right; + compare_res = -1; + } + } + } else { + while( p_comp_item != &p_map->nil_item ) + { + p_insert_at = p_comp_item; + compare_res = (*p_map->key_compare)(p_insert_at->key, key); + + if( compare_res == 0 ) /* key == p_insert_at->key */ + return( p_insert_at ); + + /* Traverse the tree until the correct insertion point is found. */ + if( compare_res > 0 ) /* p_insert_at->key > key */ + p_comp_item = p_insert_at->p_left; + else + p_comp_item = p_insert_at->p_right; + } + } + + ASSERT( p_insert_at != &p_map->nil_item ); + ASSERT( p_comp_item == &p_map->nil_item ); + + /* Insert the item. */ + p_item->p_left = &p_map->nil_item; + p_item->p_right = &p_map->nil_item; + p_item->key = key; + p_item->color = CL_MAP_RED; + if( p_insert_at == &p_map->root ) + { + p_insert_at->p_left = p_item; + /* + * Primitive insert places the new item in front of + * the existing item. + */ + __cl_primitive_insert( &p_map->nil_item.pool_item.list_item, + &p_item->pool_item.list_item ); + } + else if( compare_res > 0 ) /* key < p_insert_at->key */ + { + p_insert_at->p_left = p_item; + /* + * Primitive insert places the new item in front of + * the existing item. + */ + __cl_primitive_insert( &p_insert_at->pool_item.list_item, + &p_item->pool_item.list_item ); + } + else + { + p_insert_at->p_right = p_item; + /* + * Primitive insert places the new item in front of + * the existing item. + */ + __cl_primitive_insert( p_insert_at->pool_item.list_item.p_next, + &p_item->pool_item.list_item ); + } + /* Increase the count. */ + p_map->count++; + + p_item->p_up = p_insert_at; + + /* + * We have added depth to this section of the tree. + * Rebalance as necessary as we retrace our path through the tree + * and update colors. + */ + __cl_map_ins_bal( p_map, p_item ); + + __cl_map_root( p_map )->color = CL_MAP_BLACK; + + /* + * Note that it is not necessary to re-color the nil node black because all + * red color assignments are made via the p_up pointer, and nil is never + * set as the value of a p_up pointer. + */ + +#if QMAP_DEBUG + /* Set the pointer to the map in the map item for consistency checking. */ + p_item->p_map = p_map; +#endif + + return( p_item ); +} + + +static void +__cl_map_del_bal( + IN cl_qmap_t* const p_map, + IN cl_map_item_t* p_item ) +{ + cl_map_item_t *p_uncle; + + while( (p_item->color != CL_MAP_RED) && (p_item->p_up != &p_map->root) ) + { + if( __cl_map_is_left_child( p_item ) ) + { + p_uncle = p_item->p_up->p_right; + + if( p_uncle->color == CL_MAP_RED ) + { + p_uncle->color = CL_MAP_BLACK; + p_item->p_up->color = CL_MAP_RED; + __cl_map_rot_left( p_map, p_item->p_up ); + p_uncle = p_item->p_up->p_right; + } + + if( p_uncle->p_right->color != CL_MAP_RED ) + { + if( p_uncle->p_left->color != CL_MAP_RED ) + { + p_uncle->color = CL_MAP_RED; + p_item = p_item->p_up; + continue; + } + + p_uncle->p_left->color = CL_MAP_BLACK; + p_uncle->color = CL_MAP_RED; + __cl_map_rot_right( p_map, p_uncle ); + p_uncle = p_item->p_up->p_right; + } + p_uncle->color = p_item->p_up->color; + p_item->p_up->color = CL_MAP_BLACK; + p_uncle->p_right->color = CL_MAP_BLACK; + __cl_map_rot_left( p_map, p_item->p_up ); + break; + } + else + { + p_uncle = p_item->p_up->p_left; + + if( p_uncle->color == CL_MAP_RED ) + { + p_uncle->color = CL_MAP_BLACK; + p_item->p_up->color = CL_MAP_RED; + __cl_map_rot_right( p_map, p_item->p_up ); + p_uncle = p_item->p_up->p_left; + } + + if( p_uncle->p_left->color != CL_MAP_RED ) + { + if( p_uncle->p_right->color != CL_MAP_RED ) + { + p_uncle->color = CL_MAP_RED; + p_item = p_item->p_up; + continue; + } + + p_uncle->p_right->color = CL_MAP_BLACK; + p_uncle->color = CL_MAP_RED; + __cl_map_rot_left( p_map, p_uncle ); + p_uncle = p_item->p_up->p_left; + } + p_uncle->color = p_item->p_up->color; + p_item->p_up->color = CL_MAP_BLACK; + p_uncle->p_left->color = CL_MAP_BLACK; + __cl_map_rot_right( p_map, p_item->p_up ); + break; + } + } + p_item->color = CL_MAP_BLACK; +} + +void +cl_qmap_remove_item( + IN cl_qmap_t* const p_map, + IN cl_map_item_t* const p_item ) +{ + cl_map_item_t *p_child, *p_del_item; + + ASSERT( p_map ); + ASSERT( p_map->state == CL_INITIALIZED ); + ASSERT( p_item ); +#if QMAP_DEBUG + ASSERT( p_item->p_map == p_map ); +#endif + + if( p_item == cl_qmap_end( p_map ) ) + return; + + if( (p_item->p_right == &p_map->nil_item) || (p_item->p_left == &p_map->nil_item ) ) + { + /* The item being removed has children on at most on side. */ + p_del_item = p_item; + } + else + { + /* + * The item being removed has children on both side. + * We select the item that will replace it. After removing + * the substitute item and rebalancing, the tree will have the + * correct topology. Exchanging the substitute for the item + * will finalize the removal. + */ + p_del_item = cl_qmap_next( p_item ); + ASSERT( p_del_item != &p_map->nil_item ); + } + + /* Remove the item from the list. */ + __cl_primitive_remove( &p_item->pool_item.list_item ); + /* Decrement the item count. */ + p_map->count--; + + /* Get the pointer to the new root's child, if any. */ + if( p_del_item->p_left != &p_map->nil_item ) + p_child = p_del_item->p_left; + else + p_child = p_del_item->p_right; + + /* + * This assignment may modify the parent pointer of the nil node. + * This is inconsequential. + */ + p_child->p_up = p_del_item->p_up; + (*__cl_map_get_parent_ptr_to_item( p_del_item )) = p_child; + + if( p_del_item->color != CL_MAP_RED ) + __cl_map_del_bal( p_map, p_child ); + + /* + * Note that the splicing done below does not need to occur before + * the tree is balanced, since the actual topology changes are made by the + * preceding code. The topology is preserved by the color assignment made + * below (reader should be reminded that p_del_item == p_item in some cases). + */ + if( p_del_item != p_item ) + { + /* + * Finalize the removal of the specified item by exchanging it with + * the substitute which we removed above. + */ + p_del_item->p_up = p_item->p_up; + p_del_item->p_left = p_item->p_left; + p_del_item->p_right = p_item->p_right; + (*__cl_map_get_parent_ptr_to_item( p_item )) = p_del_item; + p_item->p_right->p_up = p_del_item; + p_item->p_left->p_up = p_del_item; + p_del_item->color = p_item->color; + } + + ASSERT( p_map->nil_item.color != CL_MAP_RED ); + +#if QMAP_DEBUG + /* Clear the pointer to the map since the item has been removed. */ + p_item->p_map = NULL; +#endif +} + + +cl_map_item_t* +cl_qmap_remove( + IN cl_qmap_t* const p_map, + IN const uint64 key ) +{ + cl_map_item_t *p_item; + + ASSERT( p_map ); + ASSERT( p_map->state == CL_INITIALIZED ); + + /* Seek the node with the specified key */ + p_item = cl_qmap_get( p_map, key ); + + cl_qmap_remove_item( p_map, p_item ); + + return( p_item ); +} + +cl_map_item_t* +cl_qmap_remove_compare( + IN cl_qmap_t* const p_map, + IN const uint64 key, + IN cl_pfn_qmap_compare_key_t key_compare) +{ + cl_map_item_t *p_item; + + ASSERT( p_map ); + ASSERT( p_map->state == CL_INITIALIZED ); + + /* Seek the node with the specified key */ + p_item = cl_qmap_get_compare( p_map, key, key_compare ); + + cl_qmap_remove_item( p_map, p_item ); + + return( p_item ); +} + +void +cl_qmap_merge( + OUT cl_qmap_t* const p_dest_map, + IN OUT cl_qmap_t* const p_src_map ) +{ + cl_map_item_t *p_item, *p_item2, *p_next; + + ASSERT( p_dest_map ); + ASSERT( p_src_map ); + ASSERT( p_src_map->key_compare == p_dest_map->key_compare ); + + p_item = cl_qmap_head( p_src_map ); + + while( p_item != cl_qmap_end( p_src_map ) ) + { + p_next = cl_qmap_next( p_item ); + + /* Remove the item from its current map. */ + cl_qmap_remove_item( p_src_map, p_item ); + /* Insert the item into the destination map. */ + p_item2 = cl_qmap_insert( p_dest_map, cl_qmap_key( p_item ), p_item ); + /* Check that the item was successfully inserted. */ + if( p_item2 != p_item ) + { + /* Put the item in back in the source map. */ + p_item2 = + cl_qmap_insert( p_src_map, cl_qmap_key( p_item ), p_item ); + ASSERT( p_item2 == p_item ); + } + p_item = p_next; + } +} + + +static void +__cl_qmap_delta_move( + IN OUT cl_qmap_t* const p_dest, + IN OUT cl_qmap_t* const p_src, + IN OUT cl_map_item_t** const pp_item ) +{ + cl_map_item_t *p_temp, *p_next; + + /* + * Get the next item so that we can ensure that pp_item points to + * a valid item upon return from the function. + */ + p_next = cl_qmap_next( *pp_item ); + /* Move the old item from its current map the the old map. */ + cl_qmap_remove_item( p_src, *pp_item ); + p_temp = cl_qmap_insert( p_dest, cl_qmap_key( *pp_item ), *pp_item ); + /* We should never have duplicates. */ + ASSERT( p_temp == *pp_item ); + /* Point pp_item to a valid item in the source map. */ + (*pp_item) = p_next; +} + + +void +cl_qmap_delta( + IN OUT cl_qmap_t* const p_map1, + IN OUT cl_qmap_t* const p_map2, + OUT cl_qmap_t* const p_new, + OUT cl_qmap_t* const p_old ) +{ + cl_map_item_t *p_item1, *p_item2; + uint64 key1, key2; + + ASSERT( p_map1 ); + ASSERT( p_map2 ); + ASSERT( p_new ); + ASSERT( p_old ); + ASSERT( cl_is_qmap_empty( p_new ) ); + ASSERT( cl_is_qmap_empty( p_old ) ); + ASSERT( p_map1->key_compare == p_map1->key_compare ); + + p_item1 = cl_qmap_head( p_map1 ); + p_item2 = cl_qmap_head( p_map2 ); + + while( p_item1 != cl_qmap_end( p_map1 ) && + p_item2 != cl_qmap_end( p_map2 ) ) + { + key1 = cl_qmap_key( p_item1 ); + key2 = cl_qmap_key( p_item2 ); + if( key1 < key2 ) + { + /* We found an old item. */ + __cl_qmap_delta_move( p_old, p_map1, &p_item1 ); + } + else if( key1 > key2 ) + { + /* We found a new item. */ + __cl_qmap_delta_move( p_new, p_map2, &p_item2 ); + } + else + { + /* Move both forward since they have the same key. */ + p_item1 = cl_qmap_next( p_item1 ); + p_item2 = cl_qmap_next( p_item2 ); + } + } + + /* Process the remainder if the end of either source map was reached. */ + while( p_item2 != cl_qmap_end( p_map2 ) ) + __cl_qmap_delta_move( p_new, p_map2, &p_item2 ); + + while( p_item1 != cl_qmap_end( p_map1 ) ) + __cl_qmap_delta_move( p_old, p_map1, &p_item1 ); +} + + +/****************************************************************************** +******************************************************************************* +************** ************ +************** IMPLEMENTATION OF MAP ************ +************** ************ +******************************************************************************* +******************************************************************************/ + + +#if 0 +#define MAP_GROW_SIZE 32 + + +void +cl_map_construct( + IN cl_map_t* const p_map ) +{ + ASSERT( p_map ); + + cl_qpool_construct( &p_map->pool ); +} + + +cl_status_t +cl_map_init( + IN cl_map_t* const p_map, + IN const size_t min_items ) +{ + size_t grow_size; + + ASSERT( p_map ); + + cl_qmap_init( &p_map->qmap ); + + /* + * We will grow by min_items/8 items at a time, with a minimum of + * MAP_GROW_SIZE. + */ + grow_size = min_items >> 3; + if( grow_size < MAP_GROW_SIZE ) + grow_size = MAP_GROW_SIZE; + + return( cl_qpool_init( &p_map->pool, min_items, 0, grow_size, + sizeof(cl_map_obj_t), NULL, NULL, NULL ) ); +} + + +void +cl_map_destroy( + IN cl_map_t* const p_map ) +{ + ASSERT( p_map ); + + cl_qpool_destroy( &p_map->pool ); +} + + +void* +cl_map_insert( + IN cl_map_t* const p_map, + IN const uint64 key, + IN const void* const p_object ) +{ + cl_map_obj_t *p_map_obj, *p_obj_at_key; + + ASSERT( p_map ); + + p_map_obj = (cl_map_obj_t*)cl_qpool_get( &p_map->pool ); + + if( !p_map_obj ) + return( NULL ); + + cl_qmap_set_obj( p_map_obj, p_object ); + + p_obj_at_key = + (cl_map_obj_t*)cl_qmap_insert( &p_map->qmap, key, &p_map_obj->item ); + + /* Return the item to the pool if insertion failed. */ + if( p_obj_at_key != p_map_obj ) + cl_qpool_put( &p_map->pool, &p_map_obj->item.pool_item ); + + return( cl_qmap_obj( p_obj_at_key ) ); +} + + +void* +cl_map_get( + IN const cl_map_t* const p_map, + IN const uint64 key ) +{ + cl_map_item_t *p_item; + + ASSERT( p_map ); + + p_item = cl_qmap_get( &p_map->qmap, key ); + + if( p_item == cl_qmap_end( &p_map->qmap ) ) + return( NULL ); + + return( cl_qmap_obj( PARENT_STRUCT( p_item, cl_map_obj_t, item ) ) ); +} + + +void +cl_map_remove_item( + IN cl_map_t* const p_map, + IN const cl_map_iterator_t itor ) +{ + ASSERT( itor->p_map == &p_map->qmap ); + + if( itor == cl_map_end( p_map ) ) + return; + + cl_qmap_remove_item( &p_map->qmap, (cl_map_item_t*)itor ); + cl_qpool_put( &p_map->pool, &((cl_map_item_t*)itor)->pool_item ); +} + + +void* +cl_map_remove( + IN cl_map_t* const p_map, + IN const uint64 key ) +{ + cl_map_item_t *p_item; + + ASSERT( p_map ); + + p_item = cl_qmap_remove( &p_map->qmap, key ); + + if( p_item == cl_qmap_end( &p_map->qmap ) ) + return( NULL ); + + cl_qpool_put( &p_map->pool, &p_item->pool_item ); + + return( cl_qmap_obj( (cl_map_obj_t*)p_item ) ); +} + + +void +cl_map_remove_all( + IN cl_map_t* const p_map ) +{ + cl_map_item_t *p_item; + + ASSERT( p_map ); + + /* Return all map items to the pool. */ + while( !cl_is_qmap_empty( &p_map->qmap ) ) + { + p_item = cl_qmap_head( &p_map->qmap ); + cl_qmap_remove_item( &p_map->qmap, p_item ); + cl_qpool_put( &p_map->pool, &p_item->pool_item ); + + if( !cl_is_qmap_empty( &p_map->qmap ) ) + { + p_item = cl_qmap_tail( &p_map->qmap ); + cl_qmap_remove_item( &p_map->qmap, p_item ); + cl_qpool_put( &p_map->pool, &p_item->pool_item ); + } + } +} + + +cl_status_t +cl_map_merge( + OUT cl_map_t* const p_dest_map, + IN OUT cl_map_t* const p_src_map ) +{ + cl_status_t status = CL_SUCCESS; + cl_map_iterator_t itor, next; + uint64 key; + void *p_obj, *p_obj2; + + ASSERT( p_dest_map ); + ASSERT( p_src_map ); + + itor = cl_map_head( p_src_map ); + while( itor != cl_map_end( p_src_map ) ) + { + next = cl_map_next( itor ); + + p_obj = cl_map_obj( itor ); + key = cl_map_key( itor ); + + cl_map_remove_item( p_src_map, itor ); + + /* Insert the object into the destination map. */ + p_obj2 = cl_map_insert( p_dest_map, key, p_obj ); + /* Trap for failure. */ + if( p_obj != p_obj2 ) + { + if( !p_obj2 ) + status = CL_INSUFFICIENT_MEMORY; + /* Put the object back in the source map. This must succeed. */ + p_obj2 = cl_map_insert( p_src_map, key, p_obj ); + ASSERT( p_obj == p_obj2 ); + /* If the failure was due to insufficient memory, return. */ + if( status != CL_SUCCESS ) + return( status ); + } + itor = next; + } + + return( CL_SUCCESS ); +} + + +static void +__cl_map_revert( + IN OUT cl_map_t* const p_map1, + IN OUT cl_map_t* const p_map2, + IN OUT cl_map_t* const p_new, + IN OUT cl_map_t* const p_old ) +{ + cl_status_t status; + + /* Restore the initial state. */ + status = cl_map_merge( p_map1, p_old ); + ASSERT( status == CL_SUCCESS ); + status = cl_map_merge( p_map2, p_new ); + ASSERT( status == CL_SUCCESS ); +} + + +static cl_status_t +__cl_map_delta_move( + OUT cl_map_t* const p_dest, + IN OUT cl_map_t* const p_src, + IN OUT cl_map_iterator_t* const p_itor ) +{ + cl_map_iterator_t next; + void *p_obj, *p_obj2; + uint64 key; + + /* Get a valid iterator so we can continue the loop. */ + next = cl_map_next( *p_itor ); + /* Get the pointer to the object for insertion. */ + p_obj = cl_map_obj( *p_itor ); + /* Get the key for the object. */ + key = cl_map_key( *p_itor ); + /* Move the object. */ + cl_map_remove_item( p_src, *p_itor ); + p_obj2 = cl_map_insert( p_dest, key, p_obj ); + /* Check for failure. We should never get a duplicate. */ + if( !p_obj2 ) + { + p_obj2 = cl_map_insert( p_src, key, p_obj ); + ASSERT( p_obj2 == p_obj ); + return( CL_INSUFFICIENT_MEMORY ); + } + + /* We should never get a duplicate */ + ASSERT( p_obj == p_obj2 ); + /* Update the iterator so that it is valid. */ + (*p_itor) = next; + + return( CL_SUCCESS ); +} + + +cl_status_t +cl_map_delta( + IN OUT cl_map_t* const p_map1, + IN OUT cl_map_t* const p_map2, + OUT cl_map_t* const p_new, + OUT cl_map_t* const p_old ) +{ + cl_map_iterator_t itor1, itor2; + uint64 key1, key2; + cl_status_t status; + + ASSERT( p_map1 ); + ASSERT( p_map2 ); + ASSERT( p_new ); + ASSERT( p_old ); + ASSERT( cl_is_map_empty( p_new ) ); + ASSERT( cl_is_map_empty( p_old ) ); + + itor1 = cl_map_head( p_map1 ); + itor2 = cl_map_head( p_map2 ); + + /* + * Note that the check is for the end, since duplicate items will remain + * in their respective maps. + */ + while( itor1 != cl_map_end( p_map1 ) && + itor2 != cl_map_end( p_map2 ) ) + { + key1 = cl_map_key( itor1 ); + key2 = cl_map_key( itor2 ); + if( key1 < key2 ) + { + status = __cl_map_delta_move( p_old, p_map1, &itor1 ); + /* Check for failure. */ + if( status != CL_SUCCESS ) + { + /* Restore the initial state. */ + __cl_map_revert( p_map1, p_map2, p_new, p_old ); + /* Return the failure status. */ + return( status ); + } + } + else if( key1 > key2 ) + { + status = __cl_map_delta_move( p_new, p_map2, &itor2 ); + if( status != CL_SUCCESS ) + { + /* Restore the initial state. */ + __cl_map_revert( p_map1, p_map2, p_new, p_old ); + /* Return the failure status. */ + return( status ); + } + } + else + { + /* Move both forward since they have the same key. */ + itor1 = cl_map_next( itor1 ); + itor2 = cl_map_next( itor2 ); + } + } + + /* Process the remainder if either source map is empty. */ + while( itor2 != cl_map_end( p_map2 ) ) + { + status = __cl_map_delta_move( p_new, p_map2, &itor2 ); + if( status != CL_SUCCESS ) + { + /* Restore the initial state. */ + __cl_map_revert( p_map1, p_map2, p_new, p_old ); + /* Return the failure status. */ + return( status ); + } + } + + while( itor1 != cl_map_end( p_map1 ) ) + { + status = __cl_map_delta_move( p_old, p_map1, &itor1 ); + if( status != CL_SUCCESS ) + { + /* Restore the initial state. */ + __cl_map_revert( p_map1, p_map2, p_new, p_old ); + /* Return the failure status. */ + return( status ); + } + } + + return( CL_SUCCESS ); +} + + +/****************************************************************************** +******************************************************************************* +************** ************ +************** IMPLEMENTATION OF FLEXI MAP ************ +************** ************ +******************************************************************************* +******************************************************************************/ + +/* + * Get the root. + */ +static inline cl_fmap_item_t* +__cl_fmap_root( + IN const cl_fmap_t* const p_map ) +{ + ASSERT( p_map ); + return( p_map->root.p_left ); +} + + +/* + * Returns whether a given item is on the left of its parent. + */ +static boolean +__cl_fmap_is_left_child( + IN const cl_fmap_item_t* const p_item ) +{ + ASSERT( p_item ); + ASSERT( p_item->p_up ); + ASSERT( p_item->p_up != p_item ); + + return( p_item->p_up->p_left == p_item ); +} + + +/* + * Retrieve the pointer to the parent's pointer to an item. + */ +static cl_fmap_item_t** +__cl_fmap_get_parent_ptr_to_item( + IN cl_fmap_item_t* const p_item ) +{ + ASSERT( p_item ); + ASSERT( p_item->p_up ); + ASSERT( p_item->p_up != p_item ); + + if( __cl_fmap_is_left_child( p_item ) ) + return( &p_item->p_up->p_left ); + + ASSERT( p_item->p_up->p_right == p_item ); + return( &p_item->p_up->p_right ); +} + + +/* + * Rotate a node to the left. This rotation affects the least number of links + * between nodes and brings the level of C up by one while increasing the depth + * of A one. Note that the links to/from W, X, Y, and Z are not affected. + * + * R R + * | | + * A C + * / \ / \ + * W C A Z + * / \ / \ + * B Z W B + * / \ / \ + * X Y X Y + */ +static void +__cl_fmap_rot_left( + IN cl_fmap_t* const p_map, + IN cl_fmap_item_t* const p_item ) +{ + cl_fmap_item_t **pp_root; + + ASSERT( p_map ); + ASSERT( p_item ); + ASSERT( p_item->p_right != &p_map->nil_item ); + + pp_root = __cl_fmap_get_parent_ptr_to_item( p_item ); + + /* Point R to C instead of A. */ + *pp_root = p_item->p_right; + /* Set C's parent to R. */ + (*pp_root)->p_up = p_item->p_up; + + /* Set A's right to B */ + p_item->p_right = (*pp_root)->p_left; + /* + * Set B's parent to A. We trap for B being NIL since the + * caller may depend on NIL not changing. + */ + if( (*pp_root)->p_left != &p_map->nil_item ) + (*pp_root)->p_left->p_up = p_item; + + /* Set C's left to A. */ + (*pp_root)->p_left = p_item; + /* Set A's parent to C. */ + p_item->p_up = *pp_root; +} + + +/* + * Rotate a node to the right. This rotation affects the least number of links + * between nodes and brings the level of A up by one while increasing the depth + * of C one. Note that the links to/from W, X, Y, and Z are not affected. + * + * R R + * | | + * C A + * / \ / \ + * A Z W C + * / \ / \ + * W B B Z + * / \ / \ + * X Y X Y + */ +static void +__cl_fmap_rot_right( + IN cl_fmap_t* const p_map, + IN cl_fmap_item_t* const p_item ) +{ + cl_fmap_item_t **pp_root; + + ASSERT( p_map ); + ASSERT( p_item ); + ASSERT( p_item->p_left != &p_map->nil_item ); + + /* Point R to A instead of C. */ + pp_root = __cl_fmap_get_parent_ptr_to_item( p_item ); + (*pp_root) = p_item->p_left; + /* Set A's parent to R. */ + (*pp_root)->p_up = p_item->p_up; + + /* Set C's left to B */ + p_item->p_left = (*pp_root)->p_right; + /* + * Set B's parent to C. We trap for B being NIL since the + * caller may depend on NIL not changing. + */ + if( (*pp_root)->p_right != &p_map->nil_item ) + (*pp_root)->p_right->p_up = p_item; + + /* Set A's right to C. */ + (*pp_root)->p_right = p_item; + /* Set C's parent to A. */ + p_item->p_up = *pp_root; +} + + +void +cl_fmap_init( + IN cl_fmap_t* const p_map, + IN cl_pfn_fmap_cmp_t pfn_compare ) +{ + ASSERT( p_map ); + ASSERT( pfn_compare ); + + MemoryClear( p_map, sizeof(cl_fmap_t) ); + + /* special setup for the root node */ + p_map->root.p_up = &p_map->root; + p_map->root.p_left = &p_map->nil_item; + p_map->root.p_right = &p_map->nil_item; + p_map->root.color = CL_MAP_BLACK; +#if QMAP_DEBUG + p_map->root.p_map = p_map; +#endif + + /* Setup the node used as terminator for all leaves. */ + p_map->nil_item.p_up = &p_map->nil_item; + p_map->nil_item.p_left = &p_map->nil_item; + p_map->nil_item.p_right = &p_map->nil_item; + p_map->nil_item.color = CL_MAP_BLACK; +#if QMAP_DEBUG + p_map->nil_item.p_map = p_map; +#endif + + /* Store the compare function pointer. */ + p_map->pfn_compare = pfn_compare; + + p_map->state = CL_INITIALIZED; + + cl_fmap_remove_all( p_map ); +} + + +cl_fmap_item_t* +cl_fmap_get( + IN const cl_fmap_t* const p_map, + IN const void* const p_key ) +{ + cl_fmap_item_t *p_item; + intn_t cmp; + + ASSERT( p_map ); + ASSERT( p_map->state == CL_INITIALIZED ); + + p_item = __cl_fmap_root( p_map ); + + while( p_item != &p_map->nil_item ) + { + cmp = p_map->pfn_compare( p_key, p_item->p_key ); + + if( !cmp ) + break; /* just right */ + + if( cmp < 0 ) + p_item = p_item->p_left; /* too small */ + else + p_item = p_item->p_right; /* too big */ + } + + return( p_item ); +} + + +void +cl_fmap_apply_func( + IN const cl_fmap_t* const p_map, + IN cl_pfn_fmap_apply_t pfn_func, + IN const void* const context ) +{ + cl_fmap_item_t* p_fmap_item; + + /* Note that context can have any arbitrary value. */ + ASSERT( p_map ); + ASSERT( p_map->state == CL_INITIALIZED ); + ASSERT( pfn_func ); + + p_fmap_item = cl_fmap_head( p_map ); + while( p_fmap_item != cl_fmap_end( p_map ) ) + { + pfn_func( p_fmap_item, (void*)context ); + p_fmap_item = cl_fmap_next( p_fmap_item ); + } +} + + +/* + * Balance a tree starting at a given item back to the root. + */ +static void +__cl_fmap_ins_bal( + IN cl_fmap_t* const p_map, + IN cl_fmap_item_t* p_item ) +{ + cl_fmap_item_t* p_grand_uncle; + + ASSERT( p_map ); + ASSERT( p_item ); + ASSERT( p_item != &p_map->root ); + + while( p_item->p_up->color == CL_MAP_RED ) + { + if( __cl_fmap_is_left_child( p_item->p_up ) ) + { + p_grand_uncle = p_item->p_up->p_up->p_right; + ASSERT( p_grand_uncle ); + if( p_grand_uncle->color == CL_MAP_RED ) + { + p_grand_uncle->color = CL_MAP_BLACK; + p_item->p_up->color = CL_MAP_BLACK; + p_item->p_up->p_up->color = CL_MAP_RED; + p_item = p_item->p_up->p_up; + continue; + } + + if( !__cl_fmap_is_left_child( p_item ) ) + { + p_item = p_item->p_up; + __cl_fmap_rot_left( p_map, p_item ); + } + p_item->p_up->color = CL_MAP_BLACK; + p_item->p_up->p_up->color = CL_MAP_RED; + __cl_fmap_rot_right( p_map, p_item->p_up->p_up ); + } + else + { + p_grand_uncle = p_item->p_up->p_up->p_left; + ASSERT( p_grand_uncle ); + if( p_grand_uncle->color == CL_MAP_RED ) + { + p_grand_uncle->color = CL_MAP_BLACK; + p_item->p_up->color = CL_MAP_BLACK; + p_item->p_up->p_up->color = CL_MAP_RED; + p_item = p_item->p_up->p_up; + continue; + } + + if( __cl_fmap_is_left_child( p_item ) ) + { + p_item = p_item->p_up; + __cl_fmap_rot_right( p_map, p_item ); + } + p_item->p_up->color = CL_MAP_BLACK; + p_item->p_up->p_up->color = CL_MAP_RED; + __cl_fmap_rot_left( p_map, p_item->p_up->p_up ); + } + } +} + + +cl_fmap_item_t* +cl_fmap_insert( + IN cl_fmap_t* const p_map, + IN const void* const p_key, + IN cl_fmap_item_t* const p_item ) +{ + cl_fmap_item_t *p_insert_at, *p_comp_item; + intn_t cmp = 0; + + ASSERT( p_map ); + ASSERT( p_map->state == CL_INITIALIZED ); + ASSERT( p_item ); + ASSERT( p_map->root.p_up == &p_map->root ); + ASSERT( p_map->root.color != CL_MAP_RED ); + ASSERT( p_map->nil_item.color != CL_MAP_RED ); + + p_item->p_left = &p_map->nil_item; + p_item->p_right = &p_map->nil_item; + p_item->p_key = p_key; + p_item->color = CL_MAP_RED; + + /* Find the insertion location. */ + p_insert_at = &p_map->root; + p_comp_item = __cl_fmap_root( p_map ); + + while( p_comp_item != &p_map->nil_item ) + { + p_insert_at = p_comp_item; + + cmp = p_map->pfn_compare( p_key, p_insert_at->p_key ); + + if( !cmp ) + return( p_insert_at ); + + /* Traverse the tree until the correct insertion point is found. */ + if( cmp < 0 ) + p_comp_item = p_insert_at->p_left; + else + p_comp_item = p_insert_at->p_right; + } + + ASSERT( p_insert_at != &p_map->nil_item ); + ASSERT( p_comp_item == &p_map->nil_item ); + /* Insert the item. */ + if( p_insert_at == &p_map->root ) + { + p_insert_at->p_left = p_item; + /* + * Primitive insert places the new item in front of + * the existing item. + */ + __cl_primitive_insert( &p_map->nil_item.pool_item.list_item, + &p_item->pool_item.list_item ); + } + else if( cmp < 0 ) + { + p_insert_at->p_left = p_item; + /* + * Primitive insert places the new item in front of + * the existing item. + */ + __cl_primitive_insert( &p_insert_at->pool_item.list_item, + &p_item->pool_item.list_item ); + } + else + { + p_insert_at->p_right = p_item; + /* + * Primitive insert places the new item in front of + * the existing item. + */ + __cl_primitive_insert( p_insert_at->pool_item.list_item.p_next, + &p_item->pool_item.list_item ); + } + /* Increase the count. */ + p_map->count++; + + p_item->p_up = p_insert_at; + + /* + * We have added depth to this section of the tree. + * Rebalance as necessary as we retrace our path through the tree + * and update colors. + */ + __cl_fmap_ins_bal( p_map, p_item ); + + __cl_fmap_root( p_map )->color = CL_MAP_BLACK; + + /* + * Note that it is not necessary to re-color the nil node black because all + * red color assignments are made via the p_up pointer, and nil is never + * set as the value of a p_up pointer. + */ + +#if QMAP_DEBUG + /* Set the pointer to the map in the map item for consistency checking. */ + p_item->p_map = p_map; +#endif + + return( p_item ); +} + + +static void +__cl_fmap_del_bal( + IN cl_fmap_t* const p_map, + IN cl_fmap_item_t* p_item ) +{ + cl_fmap_item_t *p_uncle; + + while( (p_item->color != CL_MAP_RED) && (p_item->p_up != &p_map->root) ) + { + if( __cl_fmap_is_left_child( p_item ) ) + { + p_uncle = p_item->p_up->p_right; + + if( p_uncle->color == CL_MAP_RED ) + { + p_uncle->color = CL_MAP_BLACK; + p_item->p_up->color = CL_MAP_RED; + __cl_fmap_rot_left( p_map, p_item->p_up ); + p_uncle = p_item->p_up->p_right; + } + + if( p_uncle->p_right->color != CL_MAP_RED ) + { + if( p_uncle->p_left->color != CL_MAP_RED ) + { + p_uncle->color = CL_MAP_RED; + p_item = p_item->p_up; + continue; + } + + p_uncle->p_left->color = CL_MAP_BLACK; + p_uncle->color = CL_MAP_RED; + __cl_fmap_rot_right( p_map, p_uncle ); + p_uncle = p_item->p_up->p_right; + } + p_uncle->color = p_item->p_up->color; + p_item->p_up->color = CL_MAP_BLACK; + p_uncle->p_right->color = CL_MAP_BLACK; + __cl_fmap_rot_left( p_map, p_item->p_up ); + break; + } + else + { + p_uncle = p_item->p_up->p_left; + + if( p_uncle->color == CL_MAP_RED ) + { + p_uncle->color = CL_MAP_BLACK; + p_item->p_up->color = CL_MAP_RED; + __cl_fmap_rot_right( p_map, p_item->p_up ); + p_uncle = p_item->p_up->p_left; + } + + if( p_uncle->p_left->color != CL_MAP_RED ) + { + if( p_uncle->p_right->color != CL_MAP_RED ) + { + p_uncle->color = CL_MAP_RED; + p_item = p_item->p_up; + continue; + } + + p_uncle->p_right->color = CL_MAP_BLACK; + p_uncle->color = CL_MAP_RED; + __cl_fmap_rot_left( p_map, p_uncle ); + p_uncle = p_item->p_up->p_left; + } + p_uncle->color = p_item->p_up->color; + p_item->p_up->color = CL_MAP_BLACK; + p_uncle->p_left->color = CL_MAP_BLACK; + __cl_fmap_rot_right( p_map, p_item->p_up ); + break; + } + } + p_item->color = CL_MAP_BLACK; +} + + +void +cl_fmap_remove_item( + IN cl_fmap_t* const p_map, + IN cl_fmap_item_t* const p_item ) +{ + cl_fmap_item_t *p_child, *p_del_item; + + ASSERT( p_map ); + ASSERT( p_map->state == CL_INITIALIZED ); + ASSERT( p_item ); +#if QMAP_DEBUG + ASSERT( p_item->p_map == p_map ); +#endif + + if( p_item == cl_fmap_end( p_map ) ) + return; + + if( (p_item->p_right == &p_map->nil_item) || (p_item->p_left == &p_map->nil_item ) ) + { + /* The item being removed has children on at most on side. */ + p_del_item = p_item; + } + else + { + /* + * The item being removed has children on both side. + * We select the item that will replace it. After removing + * the substitute item and rebalancing, the tree will have the + * correct topology. Exchanging the substitute for the item + * will finalize the removal. + */ + p_del_item = cl_fmap_next( p_item ); + ASSERT( p_del_item != &p_map->nil_item ); + } + + /* Remove the item from the list. */ + __cl_primitive_remove( &p_item->pool_item.list_item ); + /* Decrement the item count. */ + p_map->count--; + + /* Get the pointer to the new root's child, if any. */ + if( p_del_item->p_left != &p_map->nil_item ) + p_child = p_del_item->p_left; + else + p_child = p_del_item->p_right; + + /* + * This assignment may modify the parent pointer of the nil node. + * This is inconsequential. + */ + p_child->p_up = p_del_item->p_up; + (*__cl_fmap_get_parent_ptr_to_item( p_del_item )) = p_child; + + if( p_del_item->color != CL_MAP_RED ) + __cl_fmap_del_bal( p_map, p_child ); + + /* + * Note that the splicing done below does not need to occur before + * the tree is balanced, since the actual topology changes are made by the + * preceding code. The topology is preserved by the color assignment made + * below (reader should be reminded that p_del_item == p_item in some cases). + */ + if( p_del_item != p_item ) + { + /* + * Finalize the removal of the specified item by exchanging it with + * the substitute which we removed above. + */ + p_del_item->p_up = p_item->p_up; + p_del_item->p_left = p_item->p_left; + p_del_item->p_right = p_item->p_right; + (*__cl_fmap_get_parent_ptr_to_item( p_item )) = p_del_item; + p_item->p_right->p_up = p_del_item; + p_item->p_left->p_up = p_del_item; + p_del_item->color = p_item->color; + } + + ASSERT( p_map->nil_item.color != CL_MAP_RED ); + +#if QMAP_DEBUG + /* Clear the pointer to the map since the item has been removed. */ + p_item->p_map = NULL; +#endif +} + + +cl_fmap_item_t* +cl_fmap_remove( + IN cl_fmap_t* const p_map, + IN const void* const p_key ) +{ + cl_fmap_item_t *p_item; + + ASSERT( p_map ); + ASSERT( p_map->state == CL_INITIALIZED ); + + /* Seek the node with the specified key */ + p_item = cl_fmap_get( p_map, p_key ); + + cl_fmap_remove_item( p_map, p_item ); + + return( p_item ); +} + + +void +cl_fmap_merge( + OUT cl_fmap_t* const p_dest_map, + IN OUT cl_fmap_t* const p_src_map ) +{ + cl_fmap_item_t *p_item, *p_item2, *p_next; + + ASSERT( p_dest_map ); + ASSERT( p_src_map ); + + p_item = cl_fmap_head( p_src_map ); + + while( p_item != cl_fmap_end( p_src_map ) ) + { + p_next = cl_fmap_next( p_item ); + + /* Remove the item from its current map. */ + cl_fmap_remove_item( p_src_map, p_item ); + /* Insert the item into the destination map. */ + p_item2 = cl_fmap_insert( p_dest_map, cl_fmap_key( p_item ), p_item ); + /* Check that the item was successfully inserted. */ + if( p_item2 != p_item ) + { + /* Put the item in back in the source map. */ + p_item2 = + cl_fmap_insert( p_src_map, cl_fmap_key( p_item ), p_item ); + ASSERT( p_item2 == p_item ); + } + p_item = p_next; + } +} + + +static void +__cl_fmap_delta_move( + IN OUT cl_fmap_t* const p_dest, + IN OUT cl_fmap_t* const p_src, + IN OUT cl_fmap_item_t** const pp_item ) +{ + cl_fmap_item_t *p_temp, *p_next; + + /* + * Get the next item so that we can ensure that pp_item points to + * a valid item upon return from the function. + */ + p_next = cl_fmap_next( *pp_item ); + /* Move the old item from its current map the the old map. */ + cl_fmap_remove_item( p_src, *pp_item ); + p_temp = cl_fmap_insert( p_dest, cl_fmap_key( *pp_item ), *pp_item ); + /* We should never have duplicates. */ + ASSERT( p_temp == *pp_item ); + /* Point pp_item to a valid item in the source map. */ + (*pp_item) = p_next; +} + + +void +cl_fmap_delta( + IN OUT cl_fmap_t* const p_map1, + IN OUT cl_fmap_t* const p_map2, + OUT cl_fmap_t* const p_new, + OUT cl_fmap_t* const p_old ) +{ + cl_fmap_item_t *p_item1, *p_item2; + intn_t cmp; + + ASSERT( p_map1 ); + ASSERT( p_map2 ); + ASSERT( p_new ); + ASSERT( p_old ); + ASSERT( cl_is_fmap_empty( p_new ) ); + ASSERT( cl_is_fmap_empty( p_old ) ); + + p_item1 = cl_fmap_head( p_map1 ); + p_item2 = cl_fmap_head( p_map2 ); + + while( p_item1 != cl_fmap_end( p_map1 ) && + p_item2 != cl_fmap_end( p_map2 ) ) + { + cmp = p_map1->pfn_compare( cl_fmap_key( p_item1 ), + cl_fmap_key( p_item2 ) ); + if( cmp < 0 ) + { + /* We found an old item. */ + __cl_fmap_delta_move( p_old, p_map1, &p_item1 ); + } + else if( cmp > 0 ) + { + /* We found a new item. */ + __cl_fmap_delta_move( p_new, p_map2, &p_item2 ); + } + else + { + /* Move both forward since they have the same key. */ + p_item1 = cl_fmap_next( p_item1 ); + p_item2 = cl_fmap_next( p_item2 ); + } + } + + /* Process the remainder if the end of either source map was reached. */ + while( p_item2 != cl_fmap_end( p_map2 ) ) + __cl_fmap_delta_move( p_new, p_map2, &p_item2 ); + + while( p_item1 != cl_fmap_end( p_map1 ) ) + __cl_fmap_delta_move( p_old, p_map1, &p_item1 ); +} +#endif diff --git a/IbAccess/Common/Public/iquickmap.h b/IbAccess/Common/Public/iquickmap.h index 5e4f3f8..29bff98 100644 --- a/IbAccess/Common/Public/iquickmap.h +++ b/IbAccess/Common/Public/iquickmap.h @@ -1,4 +1,4 @@ -/* BEGIN_ICS_COPYRIGHT3 **************************************** +/* BEGIN_ICS_COPYRIGHT3 **************************************** Copyright (c) 2015, Intel Corporation @@ -25,1320 +25,1320 @@ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -** END_ICS_COPYRIGHT3 ****************************************/ - -/* [ICS VERSION STRING: unknown] */ - -/* - * Abstract: - * Declaration of quick map, a binary tree where the caller always provides - * all necessary storage. - * - * Environment: - * All - * - * $Revision$ - */ - - -#ifndef _IBA_PUBLIC_IQUICKMAP_H_ -#define _IBA_PUBLIC_IQUICKMAP_H_ - - -#include "iba/public/datatypes.h" - -#define QMAP_DEBUG 0 /* beware setting this changes ABI so must rebuild all */ - -typedef struct _cl_list_item -{ - struct _cl_list_item *p_next; - struct _cl_list_item *p_prev; -#if QMAP_DEBUG - struct _cl_qlist *p_list; -#endif - -} cl_list_item_t; - - -typedef struct _cl_pool_item -{ - cl_list_item_t list_item; -#if QMAP_DEBUG - /* Pointer to the owner pool used for sanity checks. */ - struct _cl_qcpool *p_pool; -#endif - -} cl_pool_item_t; - - -typedef enum _cl_state -{ - CL_UNINITIALIZED = 1, - CL_INITIALIZED, - CL_DESTROYING, - CL_DESTROYED - -} cl_state_t; - -#define CL_INLINE static __inline -#define CL_EXPORT - -/****h* Component Library/Quick Map -* NAME -* Quick Map -* -* DESCRIPTION -* Quick map implements a binary tree that stores user provided cl_map_item_t -* structures. Each item stored in a quick map has a unique 64-bit key -* (duplicates are not allowed). Quick map provides the ability to -* efficiently search for an item given a key. -* -* Quick map does not allocate any memory, and can therefore not fail -* any operations due to insufficient memory. Quick map can thus be useful -* in minimizing the error paths in code. -* -* Quick map is not thread safe, and users must provide serialization when -* adding and removing items from the map. -* -* The quick map functions operate on a cl_qmap_t structure which should be -* treated as opaque and should be manipulated only through the provided -* functions. -* -* SEE ALSO -* Structures: -* cl_qmap_t, cl_map_item_t, cl_map_obj_t -* -* Callbacks: -* cl_pfn_qmap_apply_t -* -* Item Manipulation: -* cl_qmap_set_obj, cl_qmap_obj, cl_qmap_key -* -* Initialization: -* cl_qmap_init -* -* Iteration: -* cl_qmap_end, cl_qmap_head, cl_qmap_tail, cl_qmap_next, cl_qmap_prev -* -* Manipulation: -* cl_qmap_insert, cl_qmap_get, cl_qmap_remove_item, cl_qmap_remove, -* cl_qmap_remove_all, cl_qmap_merge, cl_qmap_delta -* -* Search: -* cl_qmap_apply_func -* -* Attributes: -* cl_qmap_count, cl_is_qmap_empty, -*********/ - - -/****i* Component Library: Quick Map/cl_map_color_t -* NAME -* cl_map_color_t -* -* DESCRIPTION -* The cl_map_color_t enumerated type is used to note the color of -* nodes in a map. -* -* SYNOPSIS -*/ -typedef enum _cl_map_color -{ - CL_MAP_RED, - CL_MAP_BLACK - -} cl_map_color_t; -/* -* VALUES -* CL_MAP_RED -* The node in the map is red. -* -* CL_MAP_BLACK -* The node in the map is black. -* -* SEE ALSO -* Quick Map, cl_map_item_t -*********/ - - -/****s* Component Library: Quick Map/cl_map_item_t -* NAME -* cl_map_item_t -* -* DESCRIPTION -* The cl_map_item_t structure is used by maps to store objects. -* -* The cl_map_item_t structure should be treated as opaque and should -* be manipulated only through the provided functions. -* -* SYNOPSIS -*/ -typedef struct _cl_map_item -{ - /* Must be first to allow casting. */ - cl_pool_item_t pool_item; - struct _cl_map_item *p_left; - struct _cl_map_item *p_right; - struct _cl_map_item *p_up; - cl_map_color_t color; - uint64 key; -#if QMAP_DEBUG - struct _cl_qmap *p_map; -#endif - -} cl_map_item_t; -/* -* FIELDS -* pool_item -* Used to store the item in a doubly linked list, allowing more -* efficient map traversal. -* -* p_left -* Pointer to the map item that is a child to the left of the node. -* -* p_right -* Pointer to the map item that is a child to the right of the node. -* -* p_up -* Pointer to the map item that is the parent of the node. -* -* p_nil -* Pointer to the map's NIL item, used as a terminator for leaves. -* The NIL sentinel is in the cl_qmap_t structure. -* -* color -* Indicates whether a node is red or black in the map. -* -* key -* Value that uniquely represents a node in a map. This value is set by -* calling cl_qmap_insert and can be retrieved by calling cl_qmap_key. -* -* NOTES -* None of the fields of this structure should be manipulated by users, as -* they are crititcal to the proper operation of the map in which they -* are stored. -* -* To allow storing items in either a quick list, a quick pool, or a quick -* map, the map implementation guarantees that the map item can be safely -* cast to a pool item used for storing an object in a quick pool, or cast to -* a list item used for storing an object in a quick list. This removes the -* need to embed a map item, a list item, and a pool item in objects that need -* to be stored in a quick list, a quick pool, and a quick map. -* -* SEE ALSO -* Quick Map, cl_qmap_insert, cl_qmap_key, cl_pool_item_t, cl_list_item_t -*********/ - - -/****s* Component Library: Quick Map/cl_map_obj_t -* NAME -* cl_map_obj_t -* -* DESCRIPTION -* The cl_map_obj_t structure is used to store objects in maps. -* -* The cl_map_obj_t structure should be treated as opaque and should -* be manipulated only through the provided functions. -* -* SYNOPSIS -*/ -typedef struct _cl_map_obj -{ - cl_map_item_t item; - const void *p_object; - -} cl_map_obj_t; -/* -* FIELDS -* item -* Map item used by internally by the map to store an object. -* -* p_object -* User defined context. Users should not access this field directly. -* Use cl_qmap_set_obj and cl_qmap_obj to set and retrieve the value -* of this field. -* -* NOTES -* None of the fields of this structure should be manipulated by users, as -* they are crititcal to the proper operation of the map in which they -* are stored. -* -* Use cl_qmap_set_obj and cl_qmap_obj to set and retrieve the object -* stored in a map item, respectively. -* -* SEE ALSO -* Quick Map, cl_qmap_set_obj, cl_qmap_obj, cl_map_item_t -*********/ - -/****d* Component Library: Quick Map/cl_pfn_qmap_key_compare_t -* NAME -* cl_pfn_qmap_key_compare_t -* -* DESCRIPTION -* The cl_pfn_qmap_akey_comparet function type defines the prototype for functions -* used to compare keys for items in a quick map. -* -* SYNOPSIS -*/ -typedef int -(*cl_pfn_qmap_compare_key_t)( - IN const uint64 key1, - IN const uint64 key2 ); -/* -* PARAMETERS -* key1 -* [in] first key to compare -* -* key2 -* [in] second key to compare -* -* RETURN VALUE -* -1 key1 < key2 -* 0 key1 == key2 -* 1 key1 > key2 -* -* NOTES -* This function type is provided as function prototype reference for the -* function provided by users as a parameter to the cl_qmap_init and -* some other functions. -* -* Comparision must be consistent. Eg. -* if key1 < key2 -* then key2 > key1 -* -* often key1 and key2 are cast by the function to a pointer to a key object or -* subfield within the map object. However they could also do -* odd-collating sequences (or ignore bits) in uint64 keys -* -* SEE ALSO -* Quick Map, cl_qmap_init -*********/ - -/****d* Component Library: Quick Map/cl_pfn_qmap_item_compare_t -* NAME -* cl_pfn_qmap_item_compare_t -* -* DESCRIPTION -* The cl_pfn_qmap_item_compare_t function type defines the prototype for functions -* used to compare an item to a key for items in a quick map. -* -* SYNOPSIS -*/ -typedef int -(*cl_pfn_qmap_item_compare_t)( - IN const cl_map_item_t* item, - IN const uint64 key ); -/* -* PARAMETERS -* item -* [in] item to compare -* -* key -* [in] key to compare -* -* RETURN VALUE -* -1 item < key -* 0 item == key -* 1 item > key -* -* NOTES -* This function type is provided as function prototype reference for the -* function provided by users as a parameter to cl_qmap_get_item_compare -* and some other functions. -* -* Comparision must be consistent. Eg. -* if item < key -* then key > item -* -* SEE ALSO -* Quick Map, cl_qmap_get_item_compare -*********/ - -/****s* Component Library: Quick Map/cl_qmap_t -* NAME -* cl_qmap_t -* -* DESCRIPTION -* Quick map structure. -* -* The cl_qmap_t structure should be treated as opaque and should -* be manipulated only through the provided functions. -* -* SYNOPSIS -*/ -typedef struct _cl_qmap -{ - cl_map_item_t root; - cl_map_item_t nil_item; - cl_state_t state; - size_t count; - cl_pfn_qmap_compare_key_t key_compare; /* optional compare function */ - -} cl_qmap_t; -/* -* PARAMETERS -* root -* Map item that serves as root of the map. The root is set up to -* always have itself as parent. The left pointer is set to point to -* the item at the root. -* -* nil_item -* Map item that serves as terminator for all leaves, as well as providing -* the list item used as quick list for storing map items in a list for -* faster traversal. -* -* state -* State of the map, used to verify that operations are permitted. -* -* count -* Number of items in the map. -* -* SEE ALSO -* Quick Map -*********/ - - -/****d* Component Library: Quick Map/cl_pfn_qmap_apply_t -* NAME -* cl_pfn_qmap_apply_t -* -* DESCRIPTION -* The cl_pfn_qmap_apply_t function type defines the prototype for functions -* used to iterate items in a quick map. -* -* SYNOPSIS -*/ -typedef void -(*cl_pfn_qmap_apply_t)( - IN cl_map_item_t* const p_map_item, - IN void* context ); -/* -* PARAMETERS -* p_map_item -* [in] Pointer to a cl_map_item_t structure. -* -* context -* [in] Value passed to the callback function. -* -* RETURN VALUE -* This function does not return a value. -* -* NOTES -* This function type is provided as function prototype reference for the -* function provided by users as a parameter to the cl_qmap_apply_func -* function. -* -* SEE ALSO -* Quick Map, cl_qmap_apply_func -*********/ - - -#ifdef __cplusplus -extern "C" { -#endif - - -/****f* Component Library: Quick Map/cl_qmap_count -* NAME -* cl_qmap_count -* -* DESCRIPTION -* The cl_qmap_count function returns the number of items stored -* in a quick map. -* -* SYNOPSIS -*/ -CL_INLINE size_t -cl_qmap_count( - IN const cl_qmap_t* const p_map ) -{ - ASSERT( p_map ); - ASSERT( p_map->state == CL_INITIALIZED ); - return( p_map->count ); -} -/* -* PARAMETERS -* p_map -* [in] Pointer to a cl_qmap_t structure whose item count to return. -* -* RETURN VALUE -* Returns the number of items stored in the map. -* -* SEE ALSO -* Quick Map, cl_is_qmap_empty -*********/ - - -/****f* Component Library: Quick Map/cl_is_qmap_empty -* NAME -* cl_is_qmap_empty -* -* DESCRIPTION -* The cl_is_qmap_empty function returns whether a quick map is empty. -* -* SYNOPSIS -*/ -CL_INLINE boolean -cl_is_qmap_empty( - IN const cl_qmap_t* const p_map ) -{ - ASSERT( p_map ); - ASSERT( p_map->state == CL_INITIALIZED ); - - return( p_map->count == 0 ); -} -/* -* PARAMETERS -* p_map -* [in] Pointer to a cl_qmap_t structure to test for emptiness. -* -* RETURN VALUES -* TRUE if the quick map is empty. -* -* FALSE otherwise. -* -* SEE ALSO -* Quick Map, cl_qmap_count, cl_qmap_remove_all -*********/ - - -/****f* Component Library: Quick Map/cl_qmap_set_obj -* NAME -* cl_qmap_set_obj -* -* DESCRIPTION -* The cl_qmap_set_obj function sets the object stored in a map object. -* -* SYNOPSIS -*/ -CL_INLINE void -cl_qmap_set_obj( - IN cl_map_obj_t* const p_map_obj, - IN const void* const p_object ) -{ - ASSERT( p_map_obj ); - p_map_obj->p_object = p_object; -} -/* -* PARAMETERS -* p_map_obj -* [in] Pointer to a map object stucture whose object pointer -* is to be set. -* -* p_object -* [in] User defined context. -* -* RETURN VALUE -* This function does not return a value. -* -* SEE ALSO -* Quick Map, cl_qmap_obj -*********/ - - -/****f* Component Library: Quick Map/cl_qmap_obj -* NAME -* cl_qmap_obj -* -* DESCRIPTION -* The cl_qmap_obj function returns the object stored in a map object. -* -* SYNOPSIS -*/ -CL_INLINE void* -cl_qmap_obj( - IN const cl_map_obj_t* const p_map_obj ) -{ - ASSERT( p_map_obj ); - return( (void*)p_map_obj->p_object ); -} -/* -* PARAMETERS -* p_map_obj -* [in] Pointer to a map object stucture whose object pointer to return. -* -* RETURN VALUE -* Returns the value of the object pointer stored in the map object. -* -* SEE ALSO -* Quick Map, cl_qmap_set_obj -*********/ - - -/****f* Component Library: Quick Map/cl_qmap_key -* NAME -* cl_qmap_key -* -* DESCRIPTION -* The cl_qmap_key function retrieves the key value of a map item. -* -* SYNOPSIS -*/ -CL_INLINE uint64 -cl_qmap_key( - IN const cl_map_item_t* const p_item ) -{ - ASSERT( p_item ); - return( p_item->key ); -} -/* -* PARAMETERS -* p_item -* [in] Pointer to a map item whose key value to return. -* -* RETURN VALUE -* Returns the 64-bit key value for the specified map item. -* -* NOTES -* The key value is set in a call to cl_qmap_insert. -* -* SEE ALSO -* Quick Map, cl_qmap_insert -*********/ - - -/****f* Component Library: Quick Map/cl_qmap_init -* NAME -* cl_qmap_init -* -* DESCRIPTION -* The cl_qmap_init function initialized a quick map for use. -* -* SYNOPSIS -*/ -CL_EXPORT void -cl_qmap_init( - IN cl_qmap_t* const p_map, - IN cl_pfn_qmap_compare_key_t key_compare ); -/* -* PARAMETERS -* p_map -* [in] Pointer to a cl_qmap_t structure to initialize. -* -* key_compare -* [in] Optional key_compare function (NULL if uint64 keys used) -* -* RETURN VALUES -* This function does not return a value. -* -* NOTES -* Allows calling quick map manipulation functions. -* -* SEE ALSO -* Quick Map, cl_qmap_insert, cl_qmap_remove -*********/ - - -/****f* Component Library: Quick Map/cl_qmap_end -* NAME -* cl_qmap_end -* -* DESCRIPTION -* The cl_qmap_end function returns the end of a quick map. -* -* SYNOPSIS -*/ -CL_INLINE const cl_map_item_t * -cl_qmap_end( - IN const cl_qmap_t* const p_map ) -{ - ASSERT( p_map ); - ASSERT( p_map->state == CL_INITIALIZED ); - /* Nil is the end of the map. */ - return( &p_map->nil_item ); -} -/* -* PARAMETERS -* p_map -* [in] Pointer to a cl_qmap_t structure whose end to return. -* -* RETURN VALUE -* Pointer to the end of the map. -* -* NOTES -* cl_qmap_end is useful for determining the validity of map items returned -* by cl_qmap_head, cl_qmap_tail, cl_qmap_next, or cl_qmap_prev. If the map -* item pointer returned by any of these functions compares to the end, the -* end of the map was encoutered. -* When using cl_qmap_head or cl_qmap_tail, this condition indicates that -* the map is empty. -* -* SEE ALSO -* Quick Map, cl_qmap_head, cl_qmap_tail, cl_qmap_next, cl_qmap_prev -*********/ - - -/****f* Component Library: Quick Map/cl_qmap_head -* NAME -* cl_qmap_head -* -* DESCRIPTION -* The cl_qmap_head function returns the map item with the lowest key -* value stored in a quick map. -* -* SYNOPSIS -*/ -CL_INLINE cl_map_item_t* -cl_qmap_head( - IN const cl_qmap_t* const p_map ) -{ - ASSERT( p_map ); - ASSERT( p_map->state == CL_INITIALIZED ); - return( (cl_map_item_t*)p_map->nil_item.pool_item.list_item.p_next ); -} -/* -* PARAMETERS -* p_map -* [in] Pointer to a cl_qmap_t structure whose item with the lowest key -* is returned. -* -* RETURN VALUES -* Pointer to the map item with the lowest key in the quick map. -* -* Pointer to the map end if the quick map was empty. -* -* NOTES -* cl_qmap_head does not remove the item from the map. -* -* SEE ALSO -* Quick Map, cl_qmap_tail, cl_qmap_next, cl_qmap_prev, cl_qmap_end, -* cl_qmap_item_t -*********/ - - -/****f* Component Library: Quick Map/cl_qmap_tail -* NAME -* cl_qmap_tail -* -* DESCRIPTION -* The cl_qmap_tail function returns the map item with the highest key -* value stored in a quick map. -* -* SYNOPSIS -*/ -CL_INLINE cl_map_item_t* -cl_qmap_tail( - IN const cl_qmap_t* const p_map ) -{ - ASSERT( p_map ); - ASSERT( p_map->state == CL_INITIALIZED ); - return( (cl_map_item_t*)p_map->nil_item.pool_item.list_item.p_prev ); -} -/* -* PARAMETERS -* p_map -* [in] Pointer to a cl_qmap_t structure whose item with the highest key -* is returned. -* -* RETURN VALUES -* Pointer to the map item with the highest key in the quick map. -* -* Pointer to the map end if the quick map was empty. -* -* NOTES -* cl_qmap_end does not remove the item from the map. -* -* SEE ALSO -* Quick Map, cl_qmap_head, cl_qmap_next, cl_qmap_prev, cl_qmap_end, -* cl_qmap_item_t -*********/ - - -/****f* Component Library: Quick Map/cl_qmap_next -* NAME -* cl_qmap_next -* -* DESCRIPTION -* The cl_qmap_next function returns the map item with the next higher -* key value than a specified map item. -* -* SYNOPSIS -*/ -CL_INLINE cl_map_item_t* -cl_qmap_next( - IN const cl_map_item_t* const p_item ) -{ - ASSERT( p_item ); - return( (cl_map_item_t*)p_item->pool_item.list_item.p_next ); -} -/* -* PARAMETERS -* p_item -* [in] Pointer to a map item whose successor to return. -* -* RETURN VALUES -* Pointer to the map item with the next higher key value in a quick map. -* -* Pointer to the map end if the specified item was the last item in -* the quick map. -* -* SEE ALSO -* Quick Map, cl_qmap_head, cl_qmap_tail, cl_qmap_prev, cl_qmap_end, -* cl_map_item_t -*********/ - - -/****f* Component Library: Quick Map/cl_qmap_prev -* NAME -* cl_qmap_prev -* -* DESCRIPTION -* The cl_qmap_prev function returns the map item with the next lower -* key value than a precified map item. -* -* SYNOPSIS -*/ -CL_INLINE cl_map_item_t* -cl_qmap_prev( - IN const cl_map_item_t* const p_item ) -{ - ASSERT( p_item ); - return( (cl_map_item_t*)p_item->pool_item.list_item.p_prev ); -} -/* -* PARAMETERS -* p_item -* [in] Pointer to a map item whose predecessor to return. -* -* RETURN VALUES -* Pointer to the map item with the next lower key value in a quick map. -* -* Pointer to the map end if the specifid item was the first item in -* the quick map. -* -* SEE ALSO -* Quick Map, cl_qmap_head, cl_qmap_tail, cl_qmap_next, cl_qmap_end, -* cl_map_item_t -*********/ - - -/****f* Component Library: Quick Map/cl_qmap_insert -* NAME -* cl_qmap_insert -* -* DESCRIPTION -* The cl_qmap_insert function inserts a map item into a quick map. -* -* SYNOPSIS -*/ -CL_EXPORT cl_map_item_t* -cl_qmap_insert( - IN cl_qmap_t* const p_map, - IN const uint64 key, - IN cl_map_item_t* const p_item ); -/* -* PARAMETERS -* p_map -* [in] Pointer to a cl_qmap_t structure into which to add the item. -* -* key -* [in] Value to assign to the item. If Quickmap uses a key -* compare function, this must be pointer to key structure for -* object added to list -* -* p_item -* [in] Pointer to a cl_map_item_t stucture to insert into the quick map. -* -* RETURN VALUE -* Pointer to the item in the map with the specified key. If insertion -* was successful, this is the pointer to the item. If an item with the -* specified key already exists in the map, the pointer to that item is -* returned. -* -* NOTES -* Insertion operations may cause the quick map to rebalance. -* -* SEE ALSO -* Quick Map, cl_qmap_remove, cl_map_item_t -*********/ - - -/****f* Component Library: Quick Map/cl_qmap_get/cl_qmap_get_next -* NAME -* cl_qmap_get -* -* DESCRIPTION -* The cl_qmap_get function returns the map item associated with a key. -* -* SYNOPSIS -*/ -CL_EXPORT cl_map_item_t* -cl_qmap_get( - IN const cl_qmap_t* const p_map, - IN const uint64 key ); - -CL_EXPORT cl_map_item_t* -cl_qmap_get_next( - IN const cl_qmap_t* const p_map, - IN const uint64 key ); - -/* -* PARAMETERS -* p_map -* [in] Pointer to a cl_qmap_t structure from which to retrieve the -* item with the specified key. -* -* key -* [in] Key value used to search for the desired map item. -* If Quickmap uses a key compare function, this must be pointer to -* key structure to compare against keys of object in map -* RETURN VALUES -* Pointer to the map item with the desired key value. -* -* Pointer to the map end if there was no item with the desired key value -* stored in the quick map. -* -* NOTES -* cl_qmap_get does not remove the item from the quick map. -* -* SEE ALSO -* Quick Map, cl_qmap_remove -*********/ - -/****f* Component Library: Quick Map/cl_qmap_get_compare -* NAME -* cl_qmap_get_compare -* -* DESCRIPTION -* The cl_qmap_get_compare function returns the map item associated with a key. -* -* SYNOPSIS -*/ -CL_EXPORT cl_map_item_t* -cl_qmap_get_compare( - IN const cl_qmap_t* const p_map, - IN const uint64 key, - IN cl_pfn_qmap_compare_key_t key_compare); -/* -* PARAMETERS -* p_map -* [in] Pointer to a cl_qmap_t structure from which to retrieve the -* item with the specified key. -* -* key -* [in] Key value used to search for the desired map item. -* If Quickmap uses a key compare function, this must be pointer to -* key structure to compare against keys of object in map -* -* key_compare -* [in] function to compare keys. Keys of objects in map will -* be key1 argument. key provided as argument to cl_qmap_get_compare -* will be used as key2 argument. Function must be semantically -* same comparision as key_compare function of map. -* RETURN VALUES -* Pointer to the map item with the desired key value. -* -* Pointer to the map end if there was no item with the desired key value -* stored in the quick map. -* -* NOTES -* cl_qmap_get_compare does not remove the item from the quick map. -* -* This is provided to allow alternate structures for comparison -* -* SEE ALSO -* Quick Map, cl_qmap_remove -*********/ - -/****f* Component Library: Quick Map/cl_qmap_get_item_compare -* NAME -* cl_qmap_get_item_compare -* -* DESCRIPTION -* The cl_qmap_get_item_compare function returns the map item associated with a key. -* -* SYNOPSIS -*/ -CL_EXPORT cl_map_item_t* -cl_qmap_get_item_compare( - IN const cl_qmap_t* const p_map, - IN const uint64 key, - IN cl_pfn_qmap_item_compare_t compare); -/* -* PARAMETERS -* p_map -* [in] Pointer to a cl_qmap_t structure from which to retrieve the -* item with the specified key. -* -* key -* [in] Key value used to search for the desired map item. -* If Quickmap uses a key compare function, this must be pointer to -* key structure to compare against keys of object in map -* -* compare -* [in] function to compare items to key. objects in map will -* be item argument. key provided as argument to cl_qmap_get_item_compare -* will be used as key argument. Function must be semantically -* same comparision as key_compare function of map. -* RETURN VALUES -* Pointer to the map item with the desired key value. -* -* Pointer to the map end if there was no item with the desired key value -* stored in the quick map. -* -* NOTES -* cl_qmap_get_item_compare does not remove the item from the quick map. -* -* This is provided to allow alternate structures for comparison -* -* SEE ALSO -* Quick Map, cl_qmap_remove -*********/ - -/****f* Component Library: Quick Map/cl_qmap_remove_item -* NAME -* cl_qmap_remove_item -* -* DESCRIPTION -* The cl_qmap_remove_item function removes the specified map item -* from a quick map. -* -* SYNOPSIS -*/ -CL_EXPORT void -cl_qmap_remove_item( - IN cl_qmap_t* const p_map, - IN cl_map_item_t* const p_item ); -/* -* PARAMETERS -* p_item -* [in] Pointer to a map item to remove from its quick map. -* -* RETURN VALUES -* This function does not return a value. -* -* In a debug build, cl_qmap_remove_item asserts that the item being removed -* is in the specified map. -* -* NOTES -* Removes the map item pointed to by p_item from its quick map. -* -* SEE ALSO -* Quick Map, cl_qmap_remove, cl_qmap_remove_all, cl_qmap_insert -*********/ - - -/****f* Component Library: Quick Map/cl_qmap_remove -* NAME -* cl_qmap_remove -* -* DESCRIPTION -* The cl_qmap_remove function removes the map item with the specified key -* from a quick map. -* -* SYNOPSIS -*/ -CL_EXPORT cl_map_item_t* -cl_qmap_remove( - IN cl_qmap_t* const p_map, - IN const uint64 key ); -/* -* PARAMETERS -* p_map -* [in] Pointer to a cl_qmap_t structure from which to remove the item -* with the specified key. -* -* key -* [in] Key value used to search for the map item to remove. -* If Quickmap uses a key compare function, this must be pointer to -* key structure to compare against keys of object in map -* -* RETURN VALUES -* Pointer to the removed map item if it was found. -* -* Pointer to the map end if no item with the specified key exists in the -* quick map. -* -* SEE ALSO -* Quick Map, cl_qmap_remove_item, cl_qmap_remove_all, cl_qmap_insert -*********/ - -/****f* Component Library: Quick Map/cl_qmap_remove_compare -* NAME -* cl_qmap_remove_compare -* -* DESCRIPTION -* The cl_qmap_remove_compare function removes the map item with the specified key -* from a quick map. -* -* SYNOPSIS -*/ -CL_EXPORT cl_map_item_t* -cl_qmap_remove_compare( - IN cl_qmap_t* const p_map, - IN const uint64 key, - IN cl_pfn_qmap_compare_key_t key_compare); -/* -* PARAMETERS -* p_map -* [in] Pointer to a cl_qmap_t structure from which to remove the item -* with the specified key. -* -* key -* [in] Key value used to search for the map item to remove. -* If Quickmap uses a key compare function, this must be pointer to -* key structure to compare against keys of object in map -* -* key_compare -* [in] function to compare keys. Keys of objects in map will -* be key1 argument. key provided as argument to cl_qmap_remove_compare -* will be used as key2 argument. Function must be semantically -* same comparision as key_compare function of map. -* RETURN VALUES -* Pointer to the removed map item if it was found. -* -* Pointer to the map end if no item with the specified key exists in the -* quick map. -* -* This is provided to allow alternate structures for comparison -* -* SEE ALSO -* Quick Map, cl_qmap_remove_item, cl_qmap_remove_all, cl_qmap_insert -*********/ - -/****f* Component Library: Quick Map/cl_qmap_remove_all -* NAME -* cl_qmap_remove_all -* -* DESCRIPTION -* The cl_qmap_remove_all function removes all items in a quick map, -* leaving it empty. -* -* SYNOPSIS -*/ -CL_INLINE void -cl_qmap_remove_all( - IN cl_qmap_t* const p_map ) -{ - ASSERT( p_map ); - ASSERT( p_map->state == CL_INITIALIZED ); - - p_map->root.p_left = &p_map->nil_item; - p_map->nil_item.pool_item.list_item.p_next = &p_map->nil_item.pool_item.list_item; - p_map->nil_item.pool_item.list_item.p_prev = &p_map->nil_item.pool_item.list_item; - p_map->count = 0; -} -/* -* PARAMETERS -* p_map -* [in] Pointer to a cl_qmap_t structure to empty. -* -* RETURN VALUES -* This function does not return a value. -* -* SEE ALSO -* Quick Map, cl_qmap_remove, cl_qmap_remove_item -*********/ - - -/****f* Component Library: Quick Map/cl_qmap_merge -* NAME -* cl_qmap_merge -* -* DESCRIPTION -* The cl_qmap_merge function moves all items from one map to another, -* excluding duplicates. -* -* SYNOPSIS -*/ -CL_EXPORT void -cl_qmap_merge( - OUT cl_qmap_t* const p_dest_map, - IN OUT cl_qmap_t* const p_src_map ); -/* -* PARAMETERS -* p_dest_map -* [out] Pointer to a cl_qmap_t structure to which items should be added. -* -* p_src_map -* [in/out] Pointer to a cl_qmap_t structure whose items to add -* to p_dest_map. -* -* RETURN VALUES -* This function does not return a value. -* -* NOTES -* Items are evaluated based on their keys only. -* -* Upon return from cl_qmap_merge, the quick map referenced by p_src_map -* contains all duplicate items. -* -* Only valid if p_dest_map and p_src_map have same key compare function -* (or lack thereof). Undefined results otherwise. -* -* SEE ALSO -* Quick Map, cl_qmap_delta -*********/ - - -/****f* Component Library: Quick Map/cl_qmap_delta -* NAME -* cl_qmap_delta -* -* DESCRIPTION -* The cl_qmap_delta function computes the differences between two maps. -* -* SYNOPSIS -*/ -CL_EXPORT void -cl_qmap_delta( - IN OUT cl_qmap_t* const p_map1, - IN OUT cl_qmap_t* const p_map2, - OUT cl_qmap_t* const p_new, - OUT cl_qmap_t* const p_old ); -/* -* PARAMETERS -* p_map1 -* [in/out] Pointer to the first of two cl_qmap_t structures whose -* differences to compute. -* -* p_map2 -* [in/out] Pointer to the second of two cl_qmap_t structures whose -* differences to compute. -* -* p_new -* [out] Pointer to an empty cl_qmap_t structure that contains the items -* unique to p_map2 upon return from the function. -* -* p_old -* [out] Pointer to an empty cl_qmap_t structure that contains the items -* unique to p_map1 upon return from the function. -* -* RETURN VALUES -* This function does not return a value. -* -* NOTES -* Items are evaluated based on their keys. Items that exist in both -* p_map1 and p_map2 remain in their respective maps. Items that -* exist only p_map1 are moved to p_old. Likewise, items that exist only -* in p_map2 are moved to p_new. This function can be usefull in evaluating -* changes between two maps. -* -* Both maps pointed to by p_new and p_old must be empty on input. This -* requirement removes the possibility of failures. -* -* Only valid if p_dest_map and p_src_map have same key compare function -* (or lack thereof). Undefined results otherwise. -* -* SEE ALSO -* Quick Map, cl_qmap_merge -*********/ - - -/****f* Component Library: Quick Map/cl_qmap_apply_func -* NAME -* cl_qmap_apply_func -* -* DESCRIPTION -* The cl_qmap_apply_func function executes a specified function -* for every item stored in a quick map. -* -* SYNOPSIS -*/ -CL_EXPORT void -cl_qmap_apply_func( - IN const cl_qmap_t* const p_map, - IN cl_pfn_qmap_apply_t pfn_func, - IN const void* const context ); -/* -* PARAMETERS -* p_map -* [in] Pointer to a cl_qmap_t structure. -* -* pfn_func -* [in] Function invoked for every item in the quick map. -* See the cl_pfn_qmap_apply_t function type declaration for details -* about the callback function. -* -* context -* [in] Value to pass to the callback functions to provide context. -* -* RETURN VALUE -* This function does not return a value. -* -* NOTES -* The function provided must not perform any map operations, as these -* would corrupt the quick map. -* -* SEE ALSO -* Quick Map, cl_pfn_qmap_apply_t -*********/ - - -/****i* Component Library: Quick List/__cl_primitive_insert -* NAME -* __cl_primitive_insert -* -* DESCRIPTION -* Add a new item in front of the specified item. This is a low level -* function for use internally by the queuing routines. -* -* SYNOPSIS -*/ -CL_INLINE void -__cl_primitive_insert( - IN cl_list_item_t* const p_list_item, - IN cl_list_item_t* const p_new_item ) -{ - /* ASSERT that a non-null pointer is provided. */ - ASSERT( p_list_item ); - /* ASSERT that a non-null pointer is provided. */ - ASSERT( p_new_item ); - - p_new_item->p_next = p_list_item; - p_new_item->p_prev = p_list_item->p_prev; - p_list_item->p_prev = p_new_item; - p_new_item->p_prev->p_next = p_new_item; -} - -/* -* PARAMETERS -* p_list_item -* [in] Pointer to cl_list_item_t to insert in front of -* -* p_new_item -* [in] Pointer to cl_list_item_t to add -* -* RETURN VALUE -* This function does not return a value. -*********/ - - -/****i* Component Library: Quick List/__cl_primitive_remove -* NAME -* __cl_primitive_remove -* -* DESCRIPTION -* Remove an item from a list. This is a low level routine -* for use internally by the queuing routines. -* -* SYNOPSIS -*/ -CL_INLINE void -__cl_primitive_remove( - IN cl_list_item_t* const p_list_item ) -{ - /* ASSERT that a non-null pointer is provided. */ - ASSERT( p_list_item ); - - /* set the back pointer */ - p_list_item->p_next->p_prev= p_list_item->p_prev; - /* set the next pointer */ - p_list_item->p_prev->p_next= p_list_item->p_next; - - /* if we're debugging, spruce up the pointers to help find bugs */ -#if QMAP_DEBUG - if( p_list_item != p_list_item->p_next ) - { - p_list_item->p_next = NULL; - p_list_item->p_prev = NULL; - } -#endif /* QMAP_DEBUG */ -} - -#ifdef __cplusplus -} -#endif - - -#endif /* _IBA_PUBLIC_IQUICKMAP_H_ */ +** END_ICS_COPYRIGHT3 ****************************************/ + +/* [ICS VERSION STRING: unknown] */ + +/* + * Abstract: + * Declaration of quick map, a binary tree where the caller always provides + * all necessary storage. + * + * Environment: + * All + * + * $Revision$ + */ + + +#ifndef _IBA_PUBLIC_IQUICKMAP_H_ +#define _IBA_PUBLIC_IQUICKMAP_H_ + + +#include "iba/public/datatypes.h" + +#define QMAP_DEBUG 0 /* beware setting this changes ABI so must rebuild all */ + +typedef struct _cl_list_item +{ + struct _cl_list_item *p_next; + struct _cl_list_item *p_prev; +#if QMAP_DEBUG + struct _cl_qlist *p_list; +#endif + +} cl_list_item_t; + + +typedef struct _cl_pool_item +{ + cl_list_item_t list_item; +#if QMAP_DEBUG + /* Pointer to the owner pool used for sanity checks. */ + struct _cl_qcpool *p_pool; +#endif + +} cl_pool_item_t; + + +typedef enum _cl_state +{ + CL_UNINITIALIZED = 1, + CL_INITIALIZED, + CL_DESTROYING, + CL_DESTROYED + +} cl_state_t; + +#define CL_INLINE static __inline +#define CL_EXPORT + +/****h* Component Library/Quick Map +* NAME +* Quick Map +* +* DESCRIPTION +* Quick map implements a binary tree that stores user provided cl_map_item_t +* structures. Each item stored in a quick map has a unique 64-bit key +* (duplicates are not allowed). Quick map provides the ability to +* efficiently search for an item given a key. +* +* Quick map does not allocate any memory, and can therefore not fail +* any operations due to insufficient memory. Quick map can thus be useful +* in minimizing the error paths in code. +* +* Quick map is not thread safe, and users must provide serialization when +* adding and removing items from the map. +* +* The quick map functions operate on a cl_qmap_t structure which should be +* treated as opaque and should be manipulated only through the provided +* functions. +* +* SEE ALSO +* Structures: +* cl_qmap_t, cl_map_item_t, cl_map_obj_t +* +* Callbacks: +* cl_pfn_qmap_apply_t +* +* Item Manipulation: +* cl_qmap_set_obj, cl_qmap_obj, cl_qmap_key +* +* Initialization: +* cl_qmap_init +* +* Iteration: +* cl_qmap_end, cl_qmap_head, cl_qmap_tail, cl_qmap_next, cl_qmap_prev +* +* Manipulation: +* cl_qmap_insert, cl_qmap_get, cl_qmap_remove_item, cl_qmap_remove, +* cl_qmap_remove_all, cl_qmap_merge, cl_qmap_delta +* +* Search: +* cl_qmap_apply_func +* +* Attributes: +* cl_qmap_count, cl_is_qmap_empty, +*********/ + + +/****i* Component Library: Quick Map/cl_map_color_t +* NAME +* cl_map_color_t +* +* DESCRIPTION +* The cl_map_color_t enumerated type is used to note the color of +* nodes in a map. +* +* SYNOPSIS +*/ +typedef enum _cl_map_color +{ + CL_MAP_RED, + CL_MAP_BLACK + +} cl_map_color_t; +/* +* VALUES +* CL_MAP_RED +* The node in the map is red. +* +* CL_MAP_BLACK +* The node in the map is black. +* +* SEE ALSO +* Quick Map, cl_map_item_t +*********/ + + +/****s* Component Library: Quick Map/cl_map_item_t +* NAME +* cl_map_item_t +* +* DESCRIPTION +* The cl_map_item_t structure is used by maps to store objects. +* +* The cl_map_item_t structure should be treated as opaque and should +* be manipulated only through the provided functions. +* +* SYNOPSIS +*/ +typedef struct _cl_map_item +{ + /* Must be first to allow casting. */ + cl_pool_item_t pool_item; + struct _cl_map_item *p_left; + struct _cl_map_item *p_right; + struct _cl_map_item *p_up; + cl_map_color_t color; + uint64 key; +#if QMAP_DEBUG + struct _cl_qmap *p_map; +#endif + +} cl_map_item_t; +/* +* FIELDS +* pool_item +* Used to store the item in a doubly linked list, allowing more +* efficient map traversal. +* +* p_left +* Pointer to the map item that is a child to the left of the node. +* +* p_right +* Pointer to the map item that is a child to the right of the node. +* +* p_up +* Pointer to the map item that is the parent of the node. +* +* p_nil +* Pointer to the map's NIL item, used as a terminator for leaves. +* The NIL sentinel is in the cl_qmap_t structure. +* +* color +* Indicates whether a node is red or black in the map. +* +* key +* Value that uniquely represents a node in a map. This value is set by +* calling cl_qmap_insert and can be retrieved by calling cl_qmap_key. +* +* NOTES +* None of the fields of this structure should be manipulated by users, as +* they are crititcal to the proper operation of the map in which they +* are stored. +* +* To allow storing items in either a quick list, a quick pool, or a quick +* map, the map implementation guarantees that the map item can be safely +* cast to a pool item used for storing an object in a quick pool, or cast to +* a list item used for storing an object in a quick list. This removes the +* need to embed a map item, a list item, and a pool item in objects that need +* to be stored in a quick list, a quick pool, and a quick map. +* +* SEE ALSO +* Quick Map, cl_qmap_insert, cl_qmap_key, cl_pool_item_t, cl_list_item_t +*********/ + + +/****s* Component Library: Quick Map/cl_map_obj_t +* NAME +* cl_map_obj_t +* +* DESCRIPTION +* The cl_map_obj_t structure is used to store objects in maps. +* +* The cl_map_obj_t structure should be treated as opaque and should +* be manipulated only through the provided functions. +* +* SYNOPSIS +*/ +typedef struct _cl_map_obj +{ + cl_map_item_t item; + const void *p_object; + +} cl_map_obj_t; +/* +* FIELDS +* item +* Map item used by internally by the map to store an object. +* +* p_object +* User defined context. Users should not access this field directly. +* Use cl_qmap_set_obj and cl_qmap_obj to set and retrieve the value +* of this field. +* +* NOTES +* None of the fields of this structure should be manipulated by users, as +* they are crititcal to the proper operation of the map in which they +* are stored. +* +* Use cl_qmap_set_obj and cl_qmap_obj to set and retrieve the object +* stored in a map item, respectively. +* +* SEE ALSO +* Quick Map, cl_qmap_set_obj, cl_qmap_obj, cl_map_item_t +*********/ + +/****d* Component Library: Quick Map/cl_pfn_qmap_key_compare_t +* NAME +* cl_pfn_qmap_key_compare_t +* +* DESCRIPTION +* The cl_pfn_qmap_akey_comparet function type defines the prototype for functions +* used to compare keys for items in a quick map. +* +* SYNOPSIS +*/ +typedef int +(*cl_pfn_qmap_compare_key_t)( + IN const uint64 key1, + IN const uint64 key2 ); +/* +* PARAMETERS +* key1 +* [in] first key to compare +* +* key2 +* [in] second key to compare +* +* RETURN VALUE +* -1 key1 < key2 +* 0 key1 == key2 +* 1 key1 > key2 +* +* NOTES +* This function type is provided as function prototype reference for the +* function provided by users as a parameter to the cl_qmap_init and +* some other functions. +* +* Comparision must be consistent. Eg. +* if key1 < key2 +* then key2 > key1 +* +* often key1 and key2 are cast by the function to a pointer to a key object or +* subfield within the map object. However they could also do +* odd-collating sequences (or ignore bits) in uint64 keys +* +* SEE ALSO +* Quick Map, cl_qmap_init +*********/ + +/****d* Component Library: Quick Map/cl_pfn_qmap_item_compare_t +* NAME +* cl_pfn_qmap_item_compare_t +* +* DESCRIPTION +* The cl_pfn_qmap_item_compare_t function type defines the prototype for functions +* used to compare an item to a key for items in a quick map. +* +* SYNOPSIS +*/ +typedef int +(*cl_pfn_qmap_item_compare_t)( + IN const cl_map_item_t* item, + IN const uint64 key ); +/* +* PARAMETERS +* item +* [in] item to compare +* +* key +* [in] key to compare +* +* RETURN VALUE +* -1 item < key +* 0 item == key +* 1 item > key +* +* NOTES +* This function type is provided as function prototype reference for the +* function provided by users as a parameter to cl_qmap_get_item_compare +* and some other functions. +* +* Comparision must be consistent. Eg. +* if item < key +* then key > item +* +* SEE ALSO +* Quick Map, cl_qmap_get_item_compare +*********/ + +/****s* Component Library: Quick Map/cl_qmap_t +* NAME +* cl_qmap_t +* +* DESCRIPTION +* Quick map structure. +* +* The cl_qmap_t structure should be treated as opaque and should +* be manipulated only through the provided functions. +* +* SYNOPSIS +*/ +typedef struct _cl_qmap +{ + cl_map_item_t root; + cl_map_item_t nil_item; + cl_state_t state; + size_t count; + cl_pfn_qmap_compare_key_t key_compare; /* optional compare function */ + +} cl_qmap_t; +/* +* PARAMETERS +* root +* Map item that serves as root of the map. The root is set up to +* always have itself as parent. The left pointer is set to point to +* the item at the root. +* +* nil_item +* Map item that serves as terminator for all leaves, as well as providing +* the list item used as quick list for storing map items in a list for +* faster traversal. +* +* state +* State of the map, used to verify that operations are permitted. +* +* count +* Number of items in the map. +* +* SEE ALSO +* Quick Map +*********/ + + +/****d* Component Library: Quick Map/cl_pfn_qmap_apply_t +* NAME +* cl_pfn_qmap_apply_t +* +* DESCRIPTION +* The cl_pfn_qmap_apply_t function type defines the prototype for functions +* used to iterate items in a quick map. +* +* SYNOPSIS +*/ +typedef void +(*cl_pfn_qmap_apply_t)( + IN cl_map_item_t* const p_map_item, + IN void* context ); +/* +* PARAMETERS +* p_map_item +* [in] Pointer to a cl_map_item_t structure. +* +* context +* [in] Value passed to the callback function. +* +* RETURN VALUE +* This function does not return a value. +* +* NOTES +* This function type is provided as function prototype reference for the +* function provided by users as a parameter to the cl_qmap_apply_func +* function. +* +* SEE ALSO +* Quick Map, cl_qmap_apply_func +*********/ + + +#ifdef __cplusplus +extern "C" { +#endif + + +/****f* Component Library: Quick Map/cl_qmap_count +* NAME +* cl_qmap_count +* +* DESCRIPTION +* The cl_qmap_count function returns the number of items stored +* in a quick map. +* +* SYNOPSIS +*/ +CL_INLINE size_t +cl_qmap_count( + IN const cl_qmap_t* const p_map ) +{ + ASSERT( p_map ); + ASSERT( p_map->state == CL_INITIALIZED ); + return( p_map->count ); +} +/* +* PARAMETERS +* p_map +* [in] Pointer to a cl_qmap_t structure whose item count to return. +* +* RETURN VALUE +* Returns the number of items stored in the map. +* +* SEE ALSO +* Quick Map, cl_is_qmap_empty +*********/ + + +/****f* Component Library: Quick Map/cl_is_qmap_empty +* NAME +* cl_is_qmap_empty +* +* DESCRIPTION +* The cl_is_qmap_empty function returns whether a quick map is empty. +* +* SYNOPSIS +*/ +CL_INLINE boolean +cl_is_qmap_empty( + IN const cl_qmap_t* const p_map ) +{ + ASSERT( p_map ); + ASSERT( p_map->state == CL_INITIALIZED ); + + return( p_map->count == 0 ); +} +/* +* PARAMETERS +* p_map +* [in] Pointer to a cl_qmap_t structure to test for emptiness. +* +* RETURN VALUES +* TRUE if the quick map is empty. +* +* FALSE otherwise. +* +* SEE ALSO +* Quick Map, cl_qmap_count, cl_qmap_remove_all +*********/ + + +/****f* Component Library: Quick Map/cl_qmap_set_obj +* NAME +* cl_qmap_set_obj +* +* DESCRIPTION +* The cl_qmap_set_obj function sets the object stored in a map object. +* +* SYNOPSIS +*/ +CL_INLINE void +cl_qmap_set_obj( + IN cl_map_obj_t* const p_map_obj, + IN const void* const p_object ) +{ + ASSERT( p_map_obj ); + p_map_obj->p_object = p_object; +} +/* +* PARAMETERS +* p_map_obj +* [in] Pointer to a map object stucture whose object pointer +* is to be set. +* +* p_object +* [in] User defined context. +* +* RETURN VALUE +* This function does not return a value. +* +* SEE ALSO +* Quick Map, cl_qmap_obj +*********/ + + +/****f* Component Library: Quick Map/cl_qmap_obj +* NAME +* cl_qmap_obj +* +* DESCRIPTION +* The cl_qmap_obj function returns the object stored in a map object. +* +* SYNOPSIS +*/ +CL_INLINE void* +cl_qmap_obj( + IN const cl_map_obj_t* const p_map_obj ) +{ + ASSERT( p_map_obj ); + return( (void*)p_map_obj->p_object ); +} +/* +* PARAMETERS +* p_map_obj +* [in] Pointer to a map object stucture whose object pointer to return. +* +* RETURN VALUE +* Returns the value of the object pointer stored in the map object. +* +* SEE ALSO +* Quick Map, cl_qmap_set_obj +*********/ + + +/****f* Component Library: Quick Map/cl_qmap_key +* NAME +* cl_qmap_key +* +* DESCRIPTION +* The cl_qmap_key function retrieves the key value of a map item. +* +* SYNOPSIS +*/ +CL_INLINE uint64 +cl_qmap_key( + IN const cl_map_item_t* const p_item ) +{ + ASSERT( p_item ); + return( p_item->key ); +} +/* +* PARAMETERS +* p_item +* [in] Pointer to a map item whose key value to return. +* +* RETURN VALUE +* Returns the 64-bit key value for the specified map item. +* +* NOTES +* The key value is set in a call to cl_qmap_insert. +* +* SEE ALSO +* Quick Map, cl_qmap_insert +*********/ + + +/****f* Component Library: Quick Map/cl_qmap_init +* NAME +* cl_qmap_init +* +* DESCRIPTION +* The cl_qmap_init function initialized a quick map for use. +* +* SYNOPSIS +*/ +CL_EXPORT void +cl_qmap_init( + IN cl_qmap_t* const p_map, + IN cl_pfn_qmap_compare_key_t key_compare ); +/* +* PARAMETERS +* p_map +* [in] Pointer to a cl_qmap_t structure to initialize. +* +* key_compare +* [in] Optional key_compare function (NULL if uint64 keys used) +* +* RETURN VALUES +* This function does not return a value. +* +* NOTES +* Allows calling quick map manipulation functions. +* +* SEE ALSO +* Quick Map, cl_qmap_insert, cl_qmap_remove +*********/ + + +/****f* Component Library: Quick Map/cl_qmap_end +* NAME +* cl_qmap_end +* +* DESCRIPTION +* The cl_qmap_end function returns the end of a quick map. +* +* SYNOPSIS +*/ +CL_INLINE const cl_map_item_t * +cl_qmap_end( + IN const cl_qmap_t* const p_map ) +{ + ASSERT( p_map ); + ASSERT( p_map->state == CL_INITIALIZED ); + /* Nil is the end of the map. */ + return( &p_map->nil_item ); +} +/* +* PARAMETERS +* p_map +* [in] Pointer to a cl_qmap_t structure whose end to return. +* +* RETURN VALUE +* Pointer to the end of the map. +* +* NOTES +* cl_qmap_end is useful for determining the validity of map items returned +* by cl_qmap_head, cl_qmap_tail, cl_qmap_next, or cl_qmap_prev. If the map +* item pointer returned by any of these functions compares to the end, the +* end of the map was encoutered. +* When using cl_qmap_head or cl_qmap_tail, this condition indicates that +* the map is empty. +* +* SEE ALSO +* Quick Map, cl_qmap_head, cl_qmap_tail, cl_qmap_next, cl_qmap_prev +*********/ + + +/****f* Component Library: Quick Map/cl_qmap_head +* NAME +* cl_qmap_head +* +* DESCRIPTION +* The cl_qmap_head function returns the map item with the lowest key +* value stored in a quick map. +* +* SYNOPSIS +*/ +CL_INLINE cl_map_item_t* +cl_qmap_head( + IN const cl_qmap_t* const p_map ) +{ + ASSERT( p_map ); + ASSERT( p_map->state == CL_INITIALIZED ); + return( (cl_map_item_t*)p_map->nil_item.pool_item.list_item.p_next ); +} +/* +* PARAMETERS +* p_map +* [in] Pointer to a cl_qmap_t structure whose item with the lowest key +* is returned. +* +* RETURN VALUES +* Pointer to the map item with the lowest key in the quick map. +* +* Pointer to the map end if the quick map was empty. +* +* NOTES +* cl_qmap_head does not remove the item from the map. +* +* SEE ALSO +* Quick Map, cl_qmap_tail, cl_qmap_next, cl_qmap_prev, cl_qmap_end, +* cl_qmap_item_t +*********/ + + +/****f* Component Library: Quick Map/cl_qmap_tail +* NAME +* cl_qmap_tail +* +* DESCRIPTION +* The cl_qmap_tail function returns the map item with the highest key +* value stored in a quick map. +* +* SYNOPSIS +*/ +CL_INLINE cl_map_item_t* +cl_qmap_tail( + IN const cl_qmap_t* const p_map ) +{ + ASSERT( p_map ); + ASSERT( p_map->state == CL_INITIALIZED ); + return( (cl_map_item_t*)p_map->nil_item.pool_item.list_item.p_prev ); +} +/* +* PARAMETERS +* p_map +* [in] Pointer to a cl_qmap_t structure whose item with the highest key +* is returned. +* +* RETURN VALUES +* Pointer to the map item with the highest key in the quick map. +* +* Pointer to the map end if the quick map was empty. +* +* NOTES +* cl_qmap_end does not remove the item from the map. +* +* SEE ALSO +* Quick Map, cl_qmap_head, cl_qmap_next, cl_qmap_prev, cl_qmap_end, +* cl_qmap_item_t +*********/ + + +/****f* Component Library: Quick Map/cl_qmap_next +* NAME +* cl_qmap_next +* +* DESCRIPTION +* The cl_qmap_next function returns the map item with the next higher +* key value than a specified map item. +* +* SYNOPSIS +*/ +CL_INLINE cl_map_item_t* +cl_qmap_next( + IN const cl_map_item_t* const p_item ) +{ + ASSERT( p_item ); + return( (cl_map_item_t*)p_item->pool_item.list_item.p_next ); +} +/* +* PARAMETERS +* p_item +* [in] Pointer to a map item whose successor to return. +* +* RETURN VALUES +* Pointer to the map item with the next higher key value in a quick map. +* +* Pointer to the map end if the specified item was the last item in +* the quick map. +* +* SEE ALSO +* Quick Map, cl_qmap_head, cl_qmap_tail, cl_qmap_prev, cl_qmap_end, +* cl_map_item_t +*********/ + + +/****f* Component Library: Quick Map/cl_qmap_prev +* NAME +* cl_qmap_prev +* +* DESCRIPTION +* The cl_qmap_prev function returns the map item with the next lower +* key value than a precified map item. +* +* SYNOPSIS +*/ +CL_INLINE cl_map_item_t* +cl_qmap_prev( + IN const cl_map_item_t* const p_item ) +{ + ASSERT( p_item ); + return( (cl_map_item_t*)p_item->pool_item.list_item.p_prev ); +} +/* +* PARAMETERS +* p_item +* [in] Pointer to a map item whose predecessor to return. +* +* RETURN VALUES +* Pointer to the map item with the next lower key value in a quick map. +* +* Pointer to the map end if the specifid item was the first item in +* the quick map. +* +* SEE ALSO +* Quick Map, cl_qmap_head, cl_qmap_tail, cl_qmap_next, cl_qmap_end, +* cl_map_item_t +*********/ + + +/****f* Component Library: Quick Map/cl_qmap_insert +* NAME +* cl_qmap_insert +* +* DESCRIPTION +* The cl_qmap_insert function inserts a map item into a quick map. +* +* SYNOPSIS +*/ +CL_EXPORT cl_map_item_t* +cl_qmap_insert( + IN cl_qmap_t* const p_map, + IN const uint64 key, + IN cl_map_item_t* const p_item ); +/* +* PARAMETERS +* p_map +* [in] Pointer to a cl_qmap_t structure into which to add the item. +* +* key +* [in] Value to assign to the item. If Quickmap uses a key +* compare function, this must be pointer to key structure for +* object added to list +* +* p_item +* [in] Pointer to a cl_map_item_t stucture to insert into the quick map. +* +* RETURN VALUE +* Pointer to the item in the map with the specified key. If insertion +* was successful, this is the pointer to the item. If an item with the +* specified key already exists in the map, the pointer to that item is +* returned. +* +* NOTES +* Insertion operations may cause the quick map to rebalance. +* +* SEE ALSO +* Quick Map, cl_qmap_remove, cl_map_item_t +*********/ + + +/****f* Component Library: Quick Map/cl_qmap_get/cl_qmap_get_next +* NAME +* cl_qmap_get +* +* DESCRIPTION +* The cl_qmap_get function returns the map item associated with a key. +* +* SYNOPSIS +*/ +CL_EXPORT cl_map_item_t* +cl_qmap_get( + IN const cl_qmap_t* const p_map, + IN const uint64 key ); + +CL_EXPORT cl_map_item_t* +cl_qmap_get_next( + IN const cl_qmap_t* const p_map, + IN const uint64 key ); + +/* +* PARAMETERS +* p_map +* [in] Pointer to a cl_qmap_t structure from which to retrieve the +* item with the specified key. +* +* key +* [in] Key value used to search for the desired map item. +* If Quickmap uses a key compare function, this must be pointer to +* key structure to compare against keys of object in map +* RETURN VALUES +* Pointer to the map item with the desired key value. +* +* Pointer to the map end if there was no item with the desired key value +* stored in the quick map. +* +* NOTES +* cl_qmap_get does not remove the item from the quick map. +* +* SEE ALSO +* Quick Map, cl_qmap_remove +*********/ + +/****f* Component Library: Quick Map/cl_qmap_get_compare +* NAME +* cl_qmap_get_compare +* +* DESCRIPTION +* The cl_qmap_get_compare function returns the map item associated with a key. +* +* SYNOPSIS +*/ +CL_EXPORT cl_map_item_t* +cl_qmap_get_compare( + IN const cl_qmap_t* const p_map, + IN const uint64 key, + IN cl_pfn_qmap_compare_key_t key_compare); +/* +* PARAMETERS +* p_map +* [in] Pointer to a cl_qmap_t structure from which to retrieve the +* item with the specified key. +* +* key +* [in] Key value used to search for the desired map item. +* If Quickmap uses a key compare function, this must be pointer to +* key structure to compare against keys of object in map +* +* key_compare +* [in] function to compare keys. Keys of objects in map will +* be key1 argument. key provided as argument to cl_qmap_get_compare +* will be used as key2 argument. Function must be semantically +* same comparision as key_compare function of map. +* RETURN VALUES +* Pointer to the map item with the desired key value. +* +* Pointer to the map end if there was no item with the desired key value +* stored in the quick map. +* +* NOTES +* cl_qmap_get_compare does not remove the item from the quick map. +* +* This is provided to allow alternate structures for comparison +* +* SEE ALSO +* Quick Map, cl_qmap_remove +*********/ + +/****f* Component Library: Quick Map/cl_qmap_get_item_compare +* NAME +* cl_qmap_get_item_compare +* +* DESCRIPTION +* The cl_qmap_get_item_compare function returns the map item associated with a key. +* +* SYNOPSIS +*/ +CL_EXPORT cl_map_item_t* +cl_qmap_get_item_compare( + IN const cl_qmap_t* const p_map, + IN const uint64 key, + IN cl_pfn_qmap_item_compare_t compare); +/* +* PARAMETERS +* p_map +* [in] Pointer to a cl_qmap_t structure from which to retrieve the +* item with the specified key. +* +* key +* [in] Key value used to search for the desired map item. +* If Quickmap uses a key compare function, this must be pointer to +* key structure to compare against keys of object in map +* +* compare +* [in] function to compare items to key. objects in map will +* be item argument. key provided as argument to cl_qmap_get_item_compare +* will be used as key argument. Function must be semantically +* same comparision as key_compare function of map. +* RETURN VALUES +* Pointer to the map item with the desired key value. +* +* Pointer to the map end if there was no item with the desired key value +* stored in the quick map. +* +* NOTES +* cl_qmap_get_item_compare does not remove the item from the quick map. +* +* This is provided to allow alternate structures for comparison +* +* SEE ALSO +* Quick Map, cl_qmap_remove +*********/ + +/****f* Component Library: Quick Map/cl_qmap_remove_item +* NAME +* cl_qmap_remove_item +* +* DESCRIPTION +* The cl_qmap_remove_item function removes the specified map item +* from a quick map. +* +* SYNOPSIS +*/ +CL_EXPORT void +cl_qmap_remove_item( + IN cl_qmap_t* const p_map, + IN cl_map_item_t* const p_item ); +/* +* PARAMETERS +* p_item +* [in] Pointer to a map item to remove from its quick map. +* +* RETURN VALUES +* This function does not return a value. +* +* In a debug build, cl_qmap_remove_item asserts that the item being removed +* is in the specified map. +* +* NOTES +* Removes the map item pointed to by p_item from its quick map. +* +* SEE ALSO +* Quick Map, cl_qmap_remove, cl_qmap_remove_all, cl_qmap_insert +*********/ + + +/****f* Component Library: Quick Map/cl_qmap_remove +* NAME +* cl_qmap_remove +* +* DESCRIPTION +* The cl_qmap_remove function removes the map item with the specified key +* from a quick map. +* +* SYNOPSIS +*/ +CL_EXPORT cl_map_item_t* +cl_qmap_remove( + IN cl_qmap_t* const p_map, + IN const uint64 key ); +/* +* PARAMETERS +* p_map +* [in] Pointer to a cl_qmap_t structure from which to remove the item +* with the specified key. +* +* key +* [in] Key value used to search for the map item to remove. +* If Quickmap uses a key compare function, this must be pointer to +* key structure to compare against keys of object in map +* +* RETURN VALUES +* Pointer to the removed map item if it was found. +* +* Pointer to the map end if no item with the specified key exists in the +* quick map. +* +* SEE ALSO +* Quick Map, cl_qmap_remove_item, cl_qmap_remove_all, cl_qmap_insert +*********/ + +/****f* Component Library: Quick Map/cl_qmap_remove_compare +* NAME +* cl_qmap_remove_compare +* +* DESCRIPTION +* The cl_qmap_remove_compare function removes the map item with the specified key +* from a quick map. +* +* SYNOPSIS +*/ +CL_EXPORT cl_map_item_t* +cl_qmap_remove_compare( + IN cl_qmap_t* const p_map, + IN const uint64 key, + IN cl_pfn_qmap_compare_key_t key_compare); +/* +* PARAMETERS +* p_map +* [in] Pointer to a cl_qmap_t structure from which to remove the item +* with the specified key. +* +* key +* [in] Key value used to search for the map item to remove. +* If Quickmap uses a key compare function, this must be pointer to +* key structure to compare against keys of object in map +* +* key_compare +* [in] function to compare keys. Keys of objects in map will +* be key1 argument. key provided as argument to cl_qmap_remove_compare +* will be used as key2 argument. Function must be semantically +* same comparision as key_compare function of map. +* RETURN VALUES +* Pointer to the removed map item if it was found. +* +* Pointer to the map end if no item with the specified key exists in the +* quick map. +* +* This is provided to allow alternate structures for comparison +* +* SEE ALSO +* Quick Map, cl_qmap_remove_item, cl_qmap_remove_all, cl_qmap_insert +*********/ + +/****f* Component Library: Quick Map/cl_qmap_remove_all +* NAME +* cl_qmap_remove_all +* +* DESCRIPTION +* The cl_qmap_remove_all function removes all items in a quick map, +* leaving it empty. +* +* SYNOPSIS +*/ +CL_INLINE void +cl_qmap_remove_all( + IN cl_qmap_t* const p_map ) +{ + ASSERT( p_map ); + ASSERT( p_map->state == CL_INITIALIZED ); + + p_map->root.p_left = &p_map->nil_item; + p_map->nil_item.pool_item.list_item.p_next = &p_map->nil_item.pool_item.list_item; + p_map->nil_item.pool_item.list_item.p_prev = &p_map->nil_item.pool_item.list_item; + p_map->count = 0; +} +/* +* PARAMETERS +* p_map +* [in] Pointer to a cl_qmap_t structure to empty. +* +* RETURN VALUES +* This function does not return a value. +* +* SEE ALSO +* Quick Map, cl_qmap_remove, cl_qmap_remove_item +*********/ + + +/****f* Component Library: Quick Map/cl_qmap_merge +* NAME +* cl_qmap_merge +* +* DESCRIPTION +* The cl_qmap_merge function moves all items from one map to another, +* excluding duplicates. +* +* SYNOPSIS +*/ +CL_EXPORT void +cl_qmap_merge( + OUT cl_qmap_t* const p_dest_map, + IN OUT cl_qmap_t* const p_src_map ); +/* +* PARAMETERS +* p_dest_map +* [out] Pointer to a cl_qmap_t structure to which items should be added. +* +* p_src_map +* [in/out] Pointer to a cl_qmap_t structure whose items to add +* to p_dest_map. +* +* RETURN VALUES +* This function does not return a value. +* +* NOTES +* Items are evaluated based on their keys only. +* +* Upon return from cl_qmap_merge, the quick map referenced by p_src_map +* contains all duplicate items. +* +* Only valid if p_dest_map and p_src_map have same key compare function +* (or lack thereof). Undefined results otherwise. +* +* SEE ALSO +* Quick Map, cl_qmap_delta +*********/ + + +/****f* Component Library: Quick Map/cl_qmap_delta +* NAME +* cl_qmap_delta +* +* DESCRIPTION +* The cl_qmap_delta function computes the differences between two maps. +* +* SYNOPSIS +*/ +CL_EXPORT void +cl_qmap_delta( + IN OUT cl_qmap_t* const p_map1, + IN OUT cl_qmap_t* const p_map2, + OUT cl_qmap_t* const p_new, + OUT cl_qmap_t* const p_old ); +/* +* PARAMETERS +* p_map1 +* [in/out] Pointer to the first of two cl_qmap_t structures whose +* differences to compute. +* +* p_map2 +* [in/out] Pointer to the second of two cl_qmap_t structures whose +* differences to compute. +* +* p_new +* [out] Pointer to an empty cl_qmap_t structure that contains the items +* unique to p_map2 upon return from the function. +* +* p_old +* [out] Pointer to an empty cl_qmap_t structure that contains the items +* unique to p_map1 upon return from the function. +* +* RETURN VALUES +* This function does not return a value. +* +* NOTES +* Items are evaluated based on their keys. Items that exist in both +* p_map1 and p_map2 remain in their respective maps. Items that +* exist only p_map1 are moved to p_old. Likewise, items that exist only +* in p_map2 are moved to p_new. This function can be usefull in evaluating +* changes between two maps. +* +* Both maps pointed to by p_new and p_old must be empty on input. This +* requirement removes the possibility of failures. +* +* Only valid if p_dest_map and p_src_map have same key compare function +* (or lack thereof). Undefined results otherwise. +* +* SEE ALSO +* Quick Map, cl_qmap_merge +*********/ + + +/****f* Component Library: Quick Map/cl_qmap_apply_func +* NAME +* cl_qmap_apply_func +* +* DESCRIPTION +* The cl_qmap_apply_func function executes a specified function +* for every item stored in a quick map. +* +* SYNOPSIS +*/ +CL_EXPORT void +cl_qmap_apply_func( + IN const cl_qmap_t* const p_map, + IN cl_pfn_qmap_apply_t pfn_func, + IN const void* const context ); +/* +* PARAMETERS +* p_map +* [in] Pointer to a cl_qmap_t structure. +* +* pfn_func +* [in] Function invoked for every item in the quick map. +* See the cl_pfn_qmap_apply_t function type declaration for details +* about the callback function. +* +* context +* [in] Value to pass to the callback functions to provide context. +* +* RETURN VALUE +* This function does not return a value. +* +* NOTES +* The function provided must not perform any map operations, as these +* would corrupt the quick map. +* +* SEE ALSO +* Quick Map, cl_pfn_qmap_apply_t +*********/ + + +/****i* Component Library: Quick List/__cl_primitive_insert +* NAME +* __cl_primitive_insert +* +* DESCRIPTION +* Add a new item in front of the specified item. This is a low level +* function for use internally by the queuing routines. +* +* SYNOPSIS +*/ +CL_INLINE void +__cl_primitive_insert( + IN cl_list_item_t* const p_list_item, + IN cl_list_item_t* const p_new_item ) +{ + /* ASSERT that a non-null pointer is provided. */ + ASSERT( p_list_item ); + /* ASSERT that a non-null pointer is provided. */ + ASSERT( p_new_item ); + + p_new_item->p_next = p_list_item; + p_new_item->p_prev = p_list_item->p_prev; + p_list_item->p_prev = p_new_item; + p_new_item->p_prev->p_next = p_new_item; +} + +/* +* PARAMETERS +* p_list_item +* [in] Pointer to cl_list_item_t to insert in front of +* +* p_new_item +* [in] Pointer to cl_list_item_t to add +* +* RETURN VALUE +* This function does not return a value. +*********/ + + +/****i* Component Library: Quick List/__cl_primitive_remove +* NAME +* __cl_primitive_remove +* +* DESCRIPTION +* Remove an item from a list. This is a low level routine +* for use internally by the queuing routines. +* +* SYNOPSIS +*/ +CL_INLINE void +__cl_primitive_remove( + IN cl_list_item_t* const p_list_item ) +{ + /* ASSERT that a non-null pointer is provided. */ + ASSERT( p_list_item ); + + /* set the back pointer */ + p_list_item->p_next->p_prev= p_list_item->p_prev; + /* set the next pointer */ + p_list_item->p_prev->p_next= p_list_item->p_next; + + /* if we're debugging, spruce up the pointers to help find bugs */ +#if QMAP_DEBUG + if( p_list_item != p_list_item->p_next ) + { + p_list_item->p_next = NULL; + p_list_item->p_prev = NULL; + } +#endif /* QMAP_DEBUG */ +} + +#ifdef __cplusplus +} +#endif + + +#endif /* _IBA_PUBLIC_IQUICKMAP_H_ */ diff --git a/IbaTools/FastFabric/Makefile b/IbaTools/FastFabric/Makefile index b475a17..8ff38fc 100644 --- a/IbaTools/FastFabric/Makefile +++ b/IbaTools/FastFabric/Makefile @@ -144,12 +144,15 @@ include $(TL_DIR)/IbaTools/Makerules.module #-----------------------------------------------------------------------------# #$(BUILDDIR)/opafastfabric.conf: opafastfabric.conf.$(BUILD_TARGET_OS).$(IB_STACK) $(BUILDDIR) opafastfabric.conf.def: opafastfabric.conf.$(BUILD_TARGET_OS).$(IB_STACK) - cp opafastfabric.conf.$(BUILD_TARGET_OS).$(IB_STACK) opafastfabric.conf.def - chmod a+x opafastfabric.conf.def + if [ "$(BUILD_TARGET_OS_VENDOR_VERSION)" = "ES123" ]; then \ + sed -i '/FF_IPOIB_CONNECTED=/s/no/yes/' $<; \ + fi; + $(CP) $< $@ + chmod a+x $@ opafastfabric.conf-sample: opafastfabric.conf.$(BUILD_TARGET_OS).$(IB_STACK) - cp opafastfabric.conf.$(BUILD_TARGET_OS).$(IB_STACK) opafastfabric.conf-sample - chmod a+x opafastfabric.conf-sample + $(CP) $< $@ + chmod a+x $@ .SUFFIXES: .pl -sample %:%.pl diff --git a/IbaTools/FastFabric/opa_ca_openssl.cnf b/IbaTools/FastFabric/opa_ca_openssl.cnf index 6bd883d..26a1556 100644 --- a/IbaTools/FastFabric/opa_ca_openssl.cnf +++ b/IbaTools/FastFabric/opa_ca_openssl.cnf @@ -71,7 +71,7 @@ x509_extensions = opa_ca_cert_extensions # The extentions to add to the c default_days = 365 # how long to certify for default_crl_days= 30 # how long before next CRL -default_md = sha256 # default MD +default_md = Recommend referencing https://www.ssl.com/guide/ssl-best-practices preserve = no # keep passed DN ordering # A few difference way of specifying how similar the request should look @@ -90,8 +90,8 @@ organizationalUnitName = optional #################################################################### [ req ] -default_bits = 2048 -default_md = sha256 +default_bits = Recommend referencing https://www.ssl.com/guide/ssl-best-practices +default_md = Recommend referencing https://www.ssl.com/guide/ssl-best-practices default_keyfile = /root/opaCA/private/cakey.pem distinguished_name = opa_ca_distinguished_name attributes = req_attributes diff --git a/IbaTools/FastFabric/opa_comp_openssl.cnf b/IbaTools/FastFabric/opa_comp_openssl.cnf index f03b74a..1308b05 100644 --- a/IbaTools/FastFabric/opa_comp_openssl.cnf +++ b/IbaTools/FastFabric/opa_comp_openssl.cnf @@ -20,8 +20,8 @@ RANDFILE = $ENV::HOME/.rnd # X.509v3 extensions in its main [= default] section.) [ req ] -default_bits = 2048 -default_md = sha256 +default_bits = Recommend referencing https://www.ssl.com/guide/ssl-best-practices +default_md = Recommend referencing https://www.ssl.com/guide/ssl-best-practices distinguished_name = opa_comp_distinguished_name attributes = req_attributes prompt = no diff --git a/IbaTools/FastFabric/opafastfabric.conf.LINUX.OPENIB b/IbaTools/FastFabric/opafastfabric.conf.LINUX.OPENIB index 0d8426f..96f7627 100755 --- a/IbaTools/FastFabric/opafastfabric.conf.LINUX.OPENIB +++ b/IbaTools/FastFabric/opafastfabric.conf.LINUX.OPENIB @@ -85,7 +85,7 @@ export FF_IPOIB_CONFIG=${FF_IPOIB_CONFIG:-static} export FF_IPOIB_NETMASK=${FF_IPOIB_NETMASK:-} # IPOIB Connected Mode. Legal values are "yes" (connected) and "no" (datagram). -export FF_IPOIB_CONNECTED=${FF_IPOIB_CONNECTED:-yes} +export FF_IPOIB_CONNECTED=${FF_IPOIB_CONNECTED:-no} # Maximum parallel processes for opahostadmin, opachassisadmin, opaswitchadmin # and -p option on other commands diff --git a/IbaTools/FastFabric/opafastfabric.pl b/IbaTools/FastFabric/opafastfabric.pl index dc96b76..65819f7 100755 --- a/IbaTools/FastFabric/opafastfabric.pl +++ b/IbaTools/FastFabric/opafastfabric.pl @@ -102,7 +102,6 @@ "fastfabric" => "FastFabric", "mpiapps" => "opa-mpi-apps", # a package name "mpisrc" => "MPI Source", - "shmem" => "Sandia-OpenSHMEM devel", ); my @FabricSetupSteps; @@ -708,10 +707,6 @@ sub installed_mpiapps return (system("rpm -q opa-mpi-apps > /dev/null") == 0); } -sub installed_shmem -{ - return (system("rpm -q sandia-openshmem_gcc_hfi-devel >/dev/null") == 0); -} sub installed_mpisrc { @@ -1261,120 +1256,12 @@ sub fabricsetup_buildmpi } return 0; } - -sub fabricsetup_buildshmem -{ - my $shmem_apps_dir = "/usr/src/opa/shmem_apps"; - my $build_dir = read_ffconfig_param("FF_SHMEM_APPS_DIR"); - if ( ! installed_shmem() ) { - printf("$ComponentName{shmem} not installed on this system\n"); - printf("Unable to Build SHMEM Test Apps\n"); - HitKeyCont; - return; - } - if (! -e "$shmem_apps_dir/Makefile") { - # the makefile and shmem_apps are part of opa-fastfabric package - print "$shmem_apps_dir/Makefile: not found\n"; - print "Make sure opa-fastfabric is properly installed\n"; - HitKeyCont; - return 1; - } - my $mode; - my $mpich_prefix; - my $inp; - do { - # get default MPI to use - $mpich_prefix= `cd $shmem_apps_dir 2>/dev/null; . ./select_mpi 2>/dev/null; echo \$MPICH_PREFIX`; - chomp $mpich_prefix; - - my $prefix="/usr"; - - # Selected MPI implementation does not affect compilation, - # only running. Limit selection to mvapich2 implementations as - # these are the only supported implementations - my $dirs=`find $prefix/mpi -maxdepth 2 -mindepth 2 -type d 2>/dev/null|grep mvapich2|sort`; - my @dirs = split /[[:space:]]+/, $dirs; - #print "The following MPIs have been found on this system:\n"; - if ( $dirs !~ m|$mpich_prefix|) { - # odd case, default is not in a normal location - #print " $mpich_prefix\n"; - @dirs = ($mpich_prefix, @dirs); - } - my @mpi_dirs = (); - foreach my $d ( @dirs ) { - next if ( ! -e "$d/bin/mpicc" ); # skip incomplete MPI dirs - #print " $d\n"; - @mpi_dirs = (@mpi_dirs, $d); - } - - do { - $inp = selection_menu( - "Host Setup: $FabricSetupStepsName{'buildapps'}", - "MPI Directory Selection for SHMEM Job Launch", "MPI Directory", - (@mpi_dirs, "Enter Other Directory"), - "Skip MPI Directory Selection for SHMEM Job Launch"); - if ( "$inp" eq "" ) { - $inp = "cancel"; - } elsif ("$inp" eq "Skip MPI Directory Selection for SHMEM Job Launch") { - $inp = "none"; - } elsif ( "$inp" eq "Enter Other Directory" ) { - do { - print "Enter MPI directory location (or none):"; - chomp($inp = ); - $inp=remove_whitespace($inp); - } until ( "$inp" ne ""); - } - if ("$inp" ne "none" && "$inp" ne "cancel" &&! -e "$inp" ) { - print "$inp: not found\n"; - HitKeyCont; - } - } until ( "$inp" eq "none" || "$inp" eq "cancel" || -e "$inp" ); - $mpich_prefix=$inp; - if ("$mpich_prefix" eq "none" ) { - print "You have selected to skip the selection of a default MPI for SHMEM job launch\n"; - $mode="skip"; - } elsif ("$mpich_prefix" eq "cancel" ) { - print "You have selected to cancel building of SHMEM Test apps\n"; - $mode="cancel"; - } else { - print "You have selected to use MPI: $mpich_prefix\n"; - $mode="prefix"; - } - } until (GetYesNo("Are you sure you want to proceed?", "n") ); - if ( "$mode" eq "cancel" ) { - return; - } - if ( -e "$build_dir/.filelist" ) { - run_fabric_cmd("cd $build_dir; rm -rf `cat .filelist`", "skip_prompt"); - } - run_fabric_cmd("mkdir -p $build_dir; cp -r -p $shmem_apps_dir/. $build_dir", "skip_prompt"); - run_fabric_cmd("cd $shmem_apps_dir; find . -mindepth 1 > $build_dir/.filelist", "skip_prompt"); - if ( "$mode" eq "prefix" ) { - run_fabric_cmd("cd $build_dir; echo $mpich_prefix > .prefix", "skip_prompt"); - } - if (run_fabric_cmd("cd $build_dir; make clobber quick")) { - return 1; - } - if (! valid_config_file("Host File", $FabricSetupHostsFile) ) { - return 1; - } - # do in two steps so user can see results of build before scp starts - return run_fabric_cmd("$BIN_DIR/opascpall -t -p -f $FabricSetupHostsFile $build_dir $build_dir"); -} sub fabricsetup_buildapps { my $res = 0; if (GetYesNo("Do you want to build MPI Test Apps?", "y") ) { $res = fabricsetup_buildmpi(); } - if ( installed_shmem() ) { - if (GetYesNo("Do you want to build SHMEM Test Apps?", "y") ) { - $res |= fabricsetup_buildshmem(); - } - } else { - printf("Skipping option to build SHMEM Test Apps - $ComponentName{shmem} not installed\n"); - HitKeyCont; - } return $res; } diff --git a/IbaTools/disable_ports/opaextractbadlinks.sh b/IbaTools/disable_ports/opaextractbadlinks.sh index 7830855..48072ae 100755 --- a/IbaTools/disable_ports/opaextractbadlinks.sh +++ b/IbaTools/disable_ports/opaextractbadlinks.sh @@ -85,7 +85,7 @@ fi line1= # we do this against a single fabric, options can select a local HFI and Port -/usr/sbin/opareport -o errors -x "$@" > $tempfile +/usr/sbin/opareport -o errors -x -Q "$@" > $tempfile if [ -s $tempfile ] then cat $tempfile| /usr/sbin/opaxmlextract -H -d \; -e LinkErrors.Link.Port.NodeGUID -e LinkErrors.Link.Port.PortNum -e LinkErrors.Link.Port.NodeType -e LinkErrors.Link.Port.NodeDesc|while read line diff --git a/IbaTools/disable_ports/opaextractlids.sh b/IbaTools/disable_ports/opaextractlids.sh index c133087..109ca08 100755 --- a/IbaTools/disable_ports/opaextractlids.sh +++ b/IbaTools/disable_ports/opaextractlids.sh @@ -80,7 +80,7 @@ then fi IFS=';' -/usr/sbin/opareport -o lids -x "$@" > $tempfile +/usr/sbin/opareport -o lids -x -Q "$@" > $tempfile if [ -s $tempfile ] then cat $tempfile | /usr/sbin/opaxmlextract -H -d \; -e LIDSummary.LIDs.Value.NodeGUID -e LIDSummary.LIDs.Value.PortNum -e LIDSummary.LIDs.Value.NodeType -e LIDSummary.LIDs.Value.NodeDesc -e LIDSummary.LIDs.Value:LID diff --git a/IbaTools/disable_ports/opaextractmissinglinks.sh b/IbaTools/disable_ports/opaextractmissinglinks.sh index 0e30efa..292d641 100755 --- a/IbaTools/disable_ports/opaextractmissinglinks.sh +++ b/IbaTools/disable_ports/opaextractmissinglinks.sh @@ -155,7 +155,7 @@ fi line1= line2= # we do this against a single fabric, options can select a local HFI and Port -/usr/sbin/opareport ${otype_args} ${topology_args} -x "$@" > $tempfile +/usr/sbin/opareport ${otype_args} ${topology_args} -x -Q "$@" > $tempfile if [ -s $tempfile ] then IFS=';' diff --git a/IbaTools/disable_ports/opaextractsellinks.sh b/IbaTools/disable_ports/opaextractsellinks.sh index c1fc22d..322d12e 100755 --- a/IbaTools/disable_ports/opaextractsellinks.sh +++ b/IbaTools/disable_ports/opaextractsellinks.sh @@ -84,7 +84,7 @@ fi line1= # we do this against a single fabric, options can select a local HFI and Port -/usr/sbin/opareport -o links -x "$@" > $tempfile +/usr/sbin/opareport -o links -x -Q "$@" > $tempfile if [ -s $tempfile ] then cat $tempfile| /usr/sbin/opaxmlextract -H -d \; -e LinkSummary.Link.Port.NodeGUID -e LinkSummary.Link.Port.PortNum -e LinkSummary.Link.Port.NodeType -e LinkSummary.Link.Port.NodeDesc|while read line diff --git a/IbaTools/man/Makefile b/IbaTools/man/Makefile index d6ad9cc..9867392 100644 --- a/IbaTools/man/Makefile +++ b/IbaTools/man/Makefile @@ -103,6 +103,7 @@ MAN_PAGE_8_FILES = \ opaextractlids.8 \ opaextractlink.8 \ opaextractperf.8 \ + opaextractperf2.8 \ opaextractsellinks.8 \ opaextractstat.8 \ opaextractstat2.8 \ @@ -119,6 +120,7 @@ MAN_PAGE_8_FILES = \ opahostadmin.8 \ opahostsmanalysis.8 \ opalinkanalysis.8 \ + opamergeperf2.8 \ opapaquery.8 \ opapingall.8 \ opareport.8 \ diff --git a/IbaTools/man/opa2rm.manPage b/IbaTools/man/opa2rm.manPage index 9a56b6d..a017a7a 100644 --- a/IbaTools/man/opa2rm.manPage +++ b/IbaTools/man/opa2rm.manPage @@ -1,197 +1,197 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opa2rm 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opa2rm - -.NL - -.PP -Permits the generation of configuration files for FastFabric or resource managers from a topology xml file. -.PP -When using a topology spreadsheet and opaxlattopology to design and prepare for deployment verification of a fabric, opa2rm may be used to generate resource manager configuration from the planned cluster design. Using this approach will allow the resulting configuration files to be complete, even if some nodes in the fabric have not yet been installed or made operational. Alternatively, opareport -o topology can be used to generate a topology XML file for input to opa2rm. In this case, only the currently present nodes will be included. -.PP -When working with SLURM, the opa2rm -o slurm option should typically be used. This option will generate a SLURM configuration file that lists the hosts directly connected to each switch in a syntax that can be used by SLURM\[aq]s topology/tree plugin. It also generates a single "fake" switch shown as connecting all the other switches together. This approach allows for SLURM job placement to be improved while avoiding undo overhead in SLURM. This option also allows for topologies that are not a pure fat-tree. -.PP -When the configuration is a pure fat tree or oversubscribed fat tree, the opa2rm -o slurmfull option may be used to generate the full description of the fabric, including all intermediate and core switches in the fat tree topology. This option may permit better job placement optimization than the output from the opa2rm -o slurm option. However for larger fabrics, it may also increase the overhead within SLURM. -.SH Syntax -.NL -opa2rm [-v] [-q] -o \fIoutput\fR[-g|-u|-t] [-F \fIpoint\fR] [-p \fIprefix\fR] [-s \fIsuffix\fR] topology\(ulinput -.SH Options -.NL - -.TP 10 ---help -.NL -Produces full help text. - -.TP 10 --v/--verbose -.NL -Specifies verbose output. - -.TP 10 --q/--quiet -.NL -Disables progress reports. - -.TP 10 --o/--output \fIoutput\fR -.NL -Specifies the output type: - -.RS -.TP 10 - -.sp -slurm -SLURM tree nodes. Supports a variety of topologies. - -.RE - -.RS -.TP 10 - -.sp -slurmful -SLURM fat tree nodes and ISLs. Only supports pure trees. - -.RE - -.RS -.TP 10 - -.sp -hosts -FastFabric hosts file omitting this host - -.RE - -.TP 10 --g/--guid -.NL -Specifies the output switch GUIDs instead of names. - -.TP 10 --u/--underscore -.NL -Changes spaces in switch names to underscores. - -.TP 10 --t/--trunc -.NL -Truncates switch names at first space. - -.IP -This will treat large Director switches as a single, big switch. -.IP -If -g, -u or -t are not specified, the switch name\[aq]s suffix, after the first space, will be placed at the start of the name. For example, \[aq]core5 Leaf 101\[aq] becomes \[aq]Leaf101\(ulcore5\[aq]. -.TP 10 --F/--focus \fIpoint\fR -.NL -Specifies the focus area for output. Limits the scope of output to links that match any of the given focus points. - -.TP 10 --p/--prefix \fIprefix\fR -.NL -Specifies the prefix to prepend to all FI hostnames. - -.TP 10 --s/--suffix \fIsuffix\fR -.NL -Specifies the suffix to append to all FI hostnames. - -.TP 10 -topology\(ulinput -.NL -Specifies the topology\(ulinput file to use. \[aq]-\[aq] may be used to specify stdin. - -.SH Point Syntax -.NL - -.TP 10 -node:\fIvalue\fR -.NL -\fIvalue\fR is node description (node name). - -.TP 10 -node:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is node description (node name); \fIvalue2\fR is port number. - -.TP 10 -nodepat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for node description (node name). - -.TP 10 -nodepat:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is glob pattern for node description (node name); \fIvalue2\fR is port number. - -.TP 10 -nodetype:\fIvalue\fR -.NL -\fIvalue\fR is node type (SW or FI). - -.TP 10 -nodetype:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is node type (SW or FI); \fIvalue2\fR is port number. - -.TP 10 -rate:\fIvalue\fR -.NL -\fIvalue\fR is string for rate (25g, 50g, 75g, 100g). - -.TP 10 -mtucap:\fIvalue\fR -.NL -\fIvalue\fR is MTU size (2048, 4096, 8192, 10240); omits switch mgmt port 0. - -.TP 10 -labelpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable label. - -.TP 10 -lengthpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable length. - -.TP 10 -cabledetpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable details. - -.TP 10 -linkdetpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for link details. - -.TP 10 -portdetpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for port details to value. - -.SH Examples -.NL -opa2rm -o slurm topology.xml -.br -opa2rm -o slurm -p \[aq]opa-\[aq] topology.xml -.br -opa2rm -o slurm -s \[aq]-opa\[aq] topology.xml -.br -opa2rm -o slurm -F \[aq]nodepat:compute*\[aq] -F \[aq]nodepat:opacore1 *\[aq] -.br -topology.xml -.br -opa2rm -o nodes -F \[aq]nodedetpat:compute*\[aq] topology.xml -.br -opa2rm -o hosts topology.xml +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opa2rm 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opa2rm + + +.PP +Permits the generation of configuration files for FastFabric or resource managers from a topology xml file. +.PP +When using a topology spreadsheet and opaxlattopology to design and prepare for deployment verification of a fabric, opa2rm may be used to generate resource manager configuration from the planned cluster design. Using this approach will allow the resulting configuration files to be complete, even if some nodes in the fabric have not yet been installed or made operational. Alternatively, opareport -o topology can be used to generate a topology XML file for input to opa2rm. In this case, only the currently present nodes will be included. +.PP +When working with SLURM, the opa2rm -o slurm option should typically be used. This option will generate a SLURM configuration file that lists the hosts directly connected to each switch in a syntax that can be used by SLURM\[aq]s topology/tree plugin. It also generates a single "fake" switch shown as connecting all the other switches together. This approach allows for SLURM job placement to be improved while avoiding undo overhead in SLURM. This option also allows for topologies that are not a pure fat-tree. +.PP +When the configuration is a pure fat tree or oversubscribed fat tree, the opa2rm -o slurmfull option may be used to generate the full description of the fabric, including all intermediate and core switches in the fat tree topology. This option may permit better job placement optimization than the output from the opa2rm -o slurm option. However for larger fabrics, it may also increase the overhead within SLURM. +.SH Syntax +opa2rm [-v] [-q] -o \fIoutput\fR [-g|-u|-t] [-F \fIpoint\fR] [-p \fIprefix\fR] [-s \fIsuffix\fR] topology\(ulinput +.SH Options + +.TP 10 +--help + +Produces full help text. + +.TP 10 +-v/--verbose + +Specifies verbose output. + +.TP 10 +-q/--quiet + +Disables progress reports. + +.TP 10 +-o/--output \fIoutput\fR + +Specifies the output type: + +.RS +.TP 10 + +.sp +slurm +SLURM tree nodes. Supports a variety of topologies. + +.RE + +.RS +.TP 10 + +.sp +slurmful +SLURM fat tree nodes and ISLs. Only supports pure trees. + +.RE + +.RS +.TP 10 + +.sp +hosts +FastFabric hosts file omitting this host + +.RE + +.TP 10 +-g/--guid + +Specifies the output switch GUIDs instead of names. + +.TP 10 +-u/--underscore + +Changes spaces in switch names to underscores. + +.TP 10 +-t/--trunc + +Truncates switch names at first space. + +.IP +This will treat large Director switches as a single, big switch. +.IP +If -g, -u or -t are not specified, the switch name\[aq]s suffix, after the first space, will be placed at the start of the name. For example, \[aq]core5 Leaf 101\[aq] becomes \[aq]Leaf101\(ulcore5\[aq]. +.TP 10 +-F/--focus \fIpoint\fR + +Specifies the focus area for output. Limits the scope of output to links that match any of the given focus points. + +.TP 10 +-p/--prefix \fIprefix\fR + +Specifies the prefix to prepend to all FI hostnames. + +.TP 10 +-s/--suffix \fIsuffix\fR + +Specifies the suffix to append to all FI hostnames. + +.TP 10 +topology\(ulinput + +Specifies the topology\(ulinput file to use. \[aq]-\[aq] may be used to specify stdin. + +.SH Point Syntax + +.TP 10 +node:\fIvalue\fR + +\fIvalue\fR is node description (node name). + +.TP 10 +node:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is node description (node name); \fIvalue2\fR is port number. + +.TP 10 +nodepat:\fIvalue\fR + +\fIvalue\fR is glob pattern for node description (node name). + +.TP 10 +nodepat:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is glob pattern for node description (node name); \fIvalue2\fR is port number. + +.TP 10 +nodetype:\fIvalue\fR + +\fIvalue\fR is node type (SW or FI). + +.TP 10 +nodetype:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is node type (SW or FI); \fIvalue2\fR is port number. + +.TP 10 +rate:\fIvalue\fR + +\fIvalue\fR is string for rate (25g, 50g, 75g, 100g). + +.TP 10 +mtucap:\fIvalue\fR + +\fIvalue\fR is MTU size (2048, 4096, 8192, 10240); omits switch mgmt port 0. + +.TP 10 +labelpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable label. + +.TP 10 +lengthpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable length. + +.TP 10 +cabledetpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable details. + +.TP 10 +linkdetpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for link details. + +.TP 10 +portdetpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for port details to value. + +.SH Examples +opa2rm -o slurm topology.xml +.br + +opa2rm -o slurm -p \[aq]opa-\[aq] topology.xml +.br + +opa2rm -o slurm -s \[aq]-opa\[aq] topology.xml +.br + +opa2rm -o slurm -F \[aq]nodepat:compute*\[aq] -F \[aq]nodepat:opacore1 *\[aq] +.br +topology.xml +.br + +opa2rm -o nodes -F \[aq]nodedetpat:compute*\[aq] topology.xml +.br + +opa2rm -o hosts topology.xml diff --git a/IbaTools/man/opa_osd_dump.manPage b/IbaTools/man/opa_osd_dump.manPage index ed2436e..d0f99c1 100644 --- a/IbaTools/man/opa_osd_dump.manPage +++ b/IbaTools/man/opa_osd_dump.manPage @@ -1,35 +1,31 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opa\(ulosd\(uldump 1 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opa\(ulosd\(uldump - -.NL - -.PP -Prints the current contents of the distributed SA shared memory database. -.SH Syntax -.NL -opa\(ulosd\(uldump [--verbose \fIarg\fR| -v \fIarg\fR] -.SH Options -.NL - -.TP 10 ---help -.NL -Produces full help text. - -.TP 10 ---verbose/-v \fIarg\fR -.NL -Specifies the Kernel logging level to perform. Range = 1 - 7. - -.SH Example -.NL -opa\(ulosd\(uldump >opasadb\(ulcontents +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opa\(ulosd\(uldump 1 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opa\(ulosd\(uldump + + +.PP +Prints the current contents of the distributed SA shared memory database. +.SH Syntax +opa\(ulosd\(uldump [--verbose \fIarg\fR | -v \fIarg\fR] +.SH Options + +.TP 10 +--help + +Produces full help text. + +.TP 10 +--verbose/-v \fIarg\fR + +Specifies the Kernel logging level to perform. Range = 1 - 7. + +.SH Example +opa\(ulosd\(uldump >opasadb\(ulcontents diff --git a/IbaTools/man/opa_osd_exercise.manPage b/IbaTools/man/opa_osd_exercise.manPage index 89da084..3d36e95 100644 --- a/IbaTools/man/opa_osd_exercise.manPage +++ b/IbaTools/man/opa_osd_exercise.manPage @@ -1,91 +1,87 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opa\(ulosd\(ulexercise 1 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opa\(ulosd\(ulexercise - -.NL - -.PP -Performs stress test on SM and distributed SA query system. -.SH Syntax -.NL -opa\(ulosd\(ulexercise [-d | -s | -r | -x | -X | -D | -p | -S | -t | -e] \fIguidlist\fR -.SH Options -.NL - -.TP 10 ---help -.NL -Produces full help text. - -.TP 10 --d \fIdebug level\fR -.NL -Sets debugging level. - -.TP 10 --s \fIseconds\fR -.NL -Specifies running for at least \fIseconds\fR seconds. -.TP 10 --r \fIremote\fR -.NL -Specifies the host running the fabric simulator. -.TP 10 --x \fIcount\fR -.NL -Number of destinations to toggle up or down after each pass. -.br -Maximum = MAX\(ulTOGGLES. -.TP 10 --X \fIcount\fR -.NL -Specifies how often to toggle a source port up or down -.br -(in seconds). -.TP 10 --D \fIseconds\fR -.NL -Specifies how long to sleep after each pass. This value gives the Subnet Manager time to process port events. -.TP 10 --p \fIpkey\fR -.NL -Specifies to include \fIpkey\fR in the searches. Can be specified up to 8 times. -.TP 10 --S \fIsid\fR -.NL -Specifies to include SID in the searches. -.TP 10 --t \fIerror threshold\fR -.NL -Cancels the test if the number of path errors to a single destination exceeds \fIerror threshold\fR. The count is reset to zero when a correct result is retrieved. Can be specified up to 8 times. Note that providing both SIDs and pkeys may cause problems. -.TP 10 --e -.NL -Instructs simulator to enable all ports before starting. -.TP 10 -\fIguidlist\fR -.NL -Text file that lists the source and destination GUIDs and LIDs. \fIguidlist\fR format is: - -.RS - -.IP \(bu -lid\(ul0;guid\(ul0;node\(uldesc\(ul0 -.IP \(bu -lid\(ul1;guid\(ul1;node\(uldesc\(ul1 -.IP \(bu -and so on. - -.RE - -.SH Example -.NL -opa\(ulosd\(ulexercise -p 0x9001 guidtable +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opa\(ulosd\(ulexercise 1 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opa\(ulosd\(ulexercise + + +.PP +Performs stress test on SM and distributed SA query system. +.SH Syntax +opa\(ulosd\(ulexercise [-d | -s | -r | -x | -X | -D | -p | -S | -t | -e] \fIguidlist\fR +.SH Options + +.TP 10 +--help + +Produces full help text. + +.TP 10 +-d \fIdebug level\fR + +Sets debugging level. + +.TP 10 +-s \fIseconds\fR + +Specifies running for at least \fIseconds\fR seconds. +.TP 10 +-r \fIremote\fR + +Specifies the host running the fabric simulator. +.TP 10 +-x \fIcount\fR + +Number of destinations to toggle up or down after each pass. +.br +Maximum = MAX\(ulTOGGLES. +.TP 10 +-X \fIcount\fR + +Specifies how often to toggle a source port up or down +.br +(in seconds). +.TP 10 +-D \fIseconds\fR + +Specifies how long to sleep after each pass. This value gives the Subnet Manager time to process port events. +.TP 10 +-p \fIpkey\fR + +Specifies to include \fIpkey\fR in the searches. Can be specified up to 8 times. +.TP 10 +-S \fIsid\fR + +Specifies to include SID in the searches. +.TP 10 +-t \fIerror threshold\fR + +Cancels the test if the number of path errors to a single destination exceeds \fIerror threshold\fR. The count is reset to zero when a correct result is retrieved. Can be specified up to 8 times. Note that providing both SIDs and pkeys may cause problems. +.TP 10 +-e + +Instructs simulator to enable all ports before starting. +.TP 10 +\fIguidlist\fR + +Text file that lists the source and destination GUIDs and LIDs. \fIguidlist\fR format is: + +.RS + +.IP \(bu +lid\(ul0;guid\(ul0;node\(uldesc\(ul0 +.IP \(bu +lid\(ul1;guid\(ul1;node\(uldesc\(ul1 +.IP \(bu +and so on. + +.RE + +.SH Example +opa\(ulosd\(ulexercise -p 0x9001 guidtable diff --git a/IbaTools/man/opa_osd_perf.manPage b/IbaTools/man/opa_osd_perf.manPage index 3fa8846..3b4082e 100644 --- a/IbaTools/man/opa_osd_perf.manPage +++ b/IbaTools/man/opa_osd_perf.manPage @@ -1,48 +1,44 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opa\(ulosd\(ulperf 1 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opa\(ulosd\(ulperf - -.NL - -.PP -Tests the performance of the distributed SA shared memory database. -.SH Syntax -.NL -opa\(ulosd\(ulperf [-q | -p | -S] \fIguidtable\fR -.SH Options -.NL - -.TP 10 ---help -.NL -Produces full help text. - -.TP 10 --q \fIqueries\fR -.NL -Runs at least the specified number of queries. - -.TP 10 --p \fIpkey\fR -.NL -Specifies to include \fIpkey\fR in the searches. Can be specified up to 8 times. -.TP 10 --S \fIsid\fR -.NL -Specifies to include SID in the searches. Can be specified up to 8 times. Note that providing both SIDs and pkeys may cause problems. -.TP 10 -\fIguidtable\fR -.NL -Text file that lists the destination GUIDs and LIDs. For example, from a build\(ultable.pl file. - -.SH Example -.NL -opa\(ulosd\(ulperf -q 100000 -p 0x8001 guidtable +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opa\(ulosd\(ulperf 1 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opa\(ulosd\(ulperf + + +.PP +Tests the performance of the distributed SA shared memory database. +.SH Syntax +opa\(ulosd\(ulperf [-q | -p | -S] \fIguidtable\fR +.SH Options + +.TP 10 +--help + +Produces full help text. + +.TP 10 +-q \fIqueries\fR + +Runs at least the specified number of queries. + +.TP 10 +-p \fIpkey\fR + +Specifies to include \fIpkey\fR in the searches. Can be specified up to 8 times. +.TP 10 +-S \fIsid\fR + +Specifies to include SID in the searches. Can be specified up to 8 times. Note that providing both SIDs and pkeys may cause problems. +.TP 10 +\fIguidtable\fR + +Text file that lists the destination GUIDs and LIDs. For example, from a build\(ultable.pl file. + +.SH Example +opa\(ulosd\(ulperf -q 100000 -p 0x8001 guidtable diff --git a/IbaTools/man/opa_osd_query.manPage b/IbaTools/man/opa_osd_query.manPage index a22c623..a3581f2 100644 --- a/IbaTools/man/opa_osd_query.manPage +++ b/IbaTools/man/opa_osd_query.manPage @@ -1,85 +1,82 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opa\(ulosd\(ulquery 1 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opa\(ulosd\(ulquery - -.NL - -.PP -Queries the opasadb for path records. This tool allows you to create an arbitrary path query and view the result. -.SH Syntax -.NL -opa\(ulosd\(ulquery [-v | -verbose] | [-s | --slid] | [-d | --dlid] | [-S | -.br ---sgid] | [-D | --dgid]| [-k | --pkey] | [-i | --sid] | [-h | --hfi] | -.br -[-p | --port] -.SH Options -.NL - -.PP - -.B NOTE: - -.IP \(bu -All arguments are optional, but ill-formed queries can be expected to fail. You must provide at least a pair of LIDs or a pair of GIDs. -.IP \(bu -The mixing of lids and gids in a query is not permitted. -.IP \(bu -SID or PKey can be provided, but not both. -.IP \(bu -If you have multiple HFIs, the same LID can appear on more than one HFI, therefore you must specify which HFI to use when searching by LIDs. -.IP \(bu -Numbers can be in decimal, hex, or octal. - -.TP 10 ---help -.NL -Produces full help text. -.TP 10 --v/--verbose \fIarg\fR -.NL -Sets debugging level. Range is 1 - 7. - -.TP 10 --s/--slid \fIarg\fR -.NL -Specifies source LID. -.TP 10 --d/--dlid \fIarg\fR -.NL -Specifies destination LID. -.TP 10 --S/--sgid \fIarg\fR -.NL -Specifies source GID in GID format (0x00000000:0x00000000) or in Inet6 format (x:x:x:x:x:x:x:x). -.TP 10 --D/--dgid \fIarg\fR -.NL -Specifies destination GID in GID format (0x00000000:0x00000000) or in Inet6 format (x:x:x:x:x:x:x:x). -.TP 10 --k/--pkey \fIarg\fR -.NL -Specifies partition key. -.TP 10 --i/--sid \fIarg\fR -.NL -Specifies service ID. -.TP 10 --h/--hfi \fIarg\fR -.NL -Specifies the HFI to use. Default is first HFI. The HFI can be identified by name, for example, hfi1\(ul0 or by number, for example, 1, 2, 3, ... . -.TP 10 --p/--port \fIarg\fR -.NL -Specifies the port to use. Default is first port. -.SH Example -.NL -opa\(ulosd\(ulquery -s2 -d4 +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opa\(ulosd\(ulquery 1 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opa\(ulosd\(ulquery + + +.PP +Queries the opasadb for path records. This tool allows you to create an arbitrary path query and view the result. +.SH Syntax +opa\(ulosd\(ulquery [-v | -verbose] | [-s | --slid] | [-d | --dlid] | [-S | +.br +--sgid] | +[-D | --dgid]| [-k | --pkey] | [-i | --sid] | [-h | --hfi] | +.br +[-p | --port] +.SH Options + +.PP + +.B NOTE: + +.IP \(bu +All arguments are optional, but ill-formed queries can be expected to fail. You must provide at least a pair of LIDs or a pair of GIDs. +.IP \(bu +The mixing of lids and gids in a query is not permitted. +.IP \(bu +SID or PKey can be provided, but not both. +.IP \(bu +If you have multiple HFIs, the same LID can appear on more than one HFI, therefore you must specify which HFI to use when searching by LIDs. +.IP \(bu +Numbers can be in decimal, hex, or octal. + +.TP 10 +--help + +Produces full help text. +.TP 10 +-v/--verbose \fIarg\fR + +Sets debugging level. Range is 1 - 7. + +.TP 10 +-s/--slid \fIarg\fR + +Specifies source LID. +.TP 10 +-d/--dlid \fIarg\fR + +Specifies destination LID. +.TP 10 +-S/--sgid \fIarg\fR + +Specifies source GID in GID format (0x00000000:0x00000000) or in Inet6 format (x:x:x:x:x:x:x:x). +.TP 10 +-D/--dgid \fIarg\fR + +Specifies destination GID in GID format (0x00000000:0x00000000) or in Inet6 format (x:x:x:x:x:x:x:x). +.TP 10 +-k/--pkey \fIarg\fR + +Specifies partition key. +.TP 10 +-i/--sid \fIarg\fR + +Specifies service ID. +.TP 10 +-h/--hfi \fIarg\fR + +Specifies the HFI to use. Default is first HFI. The HFI can be identified by name, for example, hfi1\(ul0 or by number, for example, 1, 2, 3, ... . +.TP 10 +-p/--port \fIarg\fR + +Specifies the port to use. Default is first port. +.SH Example +opa\(ulosd\(ulquery -s2 -d4 diff --git a/IbaTools/man/opaallanalysis.manPage b/IbaTools/man/opaallanalysis.manPage index 96ee811..1a17618 100644 --- a/IbaTools/man/opaallanalysis.manPage +++ b/IbaTools/man/opaallanalysis.manPage @@ -1,173 +1,170 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opaallanalysis 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opaallanalysis - -.NL - -.PP - -\fB(All)\fR -opaallanalysis command performs the set of analysis specified in FF\(ulALL\(ulANALYSIS and can be specified for fabric, chassis, esm, or hostsm. -.SH Syntax -.NL -opaallanalysis [-b|-e] [-s] [-d \fIdir\fR] [-c \fIfile\fR] [-t \fIportsfile\fR] -.br -[-p \fIports\fR] [-F \fIchassisfile\fR] [-H \[aq]\fIchassis\fR\[aq]] [-G \fIesmchassisfile\fR] -.br -[-E \fIesmchassis\fR] [-T \fItopology\(ulinput\fR] -.SH Options -.NL - -.TP 10 ---help -.NL -Produces full help text. -.TP 10 --b -.NL -Sets the baseline mode. Default is compare/check mode. -.TP 10 --e -.NL -Evaluates health only. Default is compare/check mode. -.TP 10 --s -.NL -Saves history of failures (errors/differences). -.TP 10 --d \fIdir\fR -.NL -Identifies the top-level directory for saving baseline and history of failed checks. Default is /var/usr/lib/opa/analysis -.TP 10 --c \fIfile\fR -.NL -Specifies the error thresholds configuration file. Default is /etc/opa/opamon.conf -.TP 10 --t \fIportsfile\fR -.NL -Specifies the file with list of local HFI ports used to access fabric(s) for analysis. Default is /etc/opa/ports -.TP 10 --p \fIports\fR -.NL -Specifies the list of local HFI ports used to access fabric(s) for analysis. Default is the first active port. Specified as HFI:port as follows: -.RS -.TP 10 - -.sp -0:0 -First active port in system. -.RE - -.RS -.TP 10 - -.sp -0:\fIy\fR -Port \fIy\fR within system. -.RE - -.RS -.TP 10 - -.sp -\fIx\fR:0 -First active port on HFI \fIx\fR. -.RE - -.RS -.TP 10 - -.sp -\fIx\fR:\fIy\fR -HFI \fIx\fR, port \fIy\fR. -.RE - -.TP 10 --F \fIchassisfile\fR -.NL -Specifies the file with a chassis in a cluster. Default is /etc/opa/chassis -.TP 10 --H \[aq]\fIchassis\fR\[aq] -.NL -Specifies the list of chassis on which to execute the command. -.TP 10 --G \fIesmchassisfile\fR -.NL -Specifies the file with embedded SM chassis in the cluster. Default is /etc/opa/esm\(ulchassis -.TP 10 --E \fIesmchassis\fR -.NL -Specifies the list of embedded SM chassis to analyze. -.TP 10 --T \fItopology\(ulinput\fR -.NL -Specifies the name of topology input file to use. Any %P markers in this filename are replaced with the HFI:port being operated on, such as 0:0 or 1:2. Default is /etc/opa/topology.%P.xml. If -T NONE is specified, no topology input file is used. See -\fIopareport\fR -for more information. -.SH Example -.NL -opaallanalysis -.br -opaallanalysis -p \[aq]1:1 2:1\[aq] -.SH Environment Variables -.NL - -.PP -The following environment variables are also used by this command: -.TP 10 -\fBPORTS\fR -.NL -List of ports, used in absence of -t and -p. -.TP 10 -\fBPORTS\(ulFILE\fR -.NL -File containing list of ports, used in absence of -t and -p. -.TP 10 -\fBFF\(ulTOPOLOGY\(ulFILE\fR -.NL -File containing topology\(ulinput (may have %P marker in filename), used in absence of -T. -.TP 10 -\fBCHASSIS\fR -.NL -List of chassis, used if -F and -H options are not supplied. -.TP 10 -\fBCHASSIS\(ulFILE\fR -.NL -File containing list of chassis, used if -F and -H options are not supplied. -.TP 10 -\fBESM\(ulCHASSIS\fR -.NL -List of SM chassis, used if -G and -E options are not supplied. -.TP 10 -\fBESM\(ulCHASSIS\(ulFILE\fR -.NL -File containing list of SM chassis, used if -G and -E options are not supplied. -.TP 10 -\fBFF\(ulANALYSIS\(ulDIR\fR -.NL -Top level directory for baselines and failed health checks. -.TP 10 -\fBFF\(ulCHASSIS\(ulCMDS\fR -.NL -List of commands to issue during analysis, unused if -e option supplied. -.TP 10 -\fBFF\(ulCHASSIS\(ulHEALTH\fR -.NL -Single command to issue to check overall health during analysis, unused if -b option supplied -.SH Details -.NL - -.PP -The opaallanalysis command performs the set of analysis specified in \fBFF\(ulALL\(ulANALYSIS\fR, which must be a space-separated list. This can be provided by the environment or using /etc/opa/opafastfabric.conf. The analysis set includes the options: fabric, chassis, esm, or hostsm. For a fabric with only externally managed switches, \fBFF\(ulALL\(ulANALYSIS\fR should be set to -fabric in opafastfabric.conf. -.PP -Note that the opaallanalysis command has options which are a super-set of the options for all other analysis commands. The options are passed along to the respective tools as needed. For example, the -c file option is passed on to opafabricanalysis if it is specified in \fBFF\(ulALL\(ulANALYSIS\fR. -.PP -The output files are all the output files for the \fBFF\(ulALL\(ulANALYSIS\fR selected set of analysis. See the previous sections for the specific output files. +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opaallanalysis 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opaallanalysis + + +.PP + +\fB(All)\fR +opaallanalysis command performs the set of analysis specified in FF\(ulALL\(ulANALYSIS and can be specified for fabric, chassis, esm, or hostsm. +.SH Syntax +opaallanalysis [-b|-e] [-s] [-d \fIdir\fR] [-c \fIfile\fR] [-t \fIportsfile\fR] +.br +[-p \fIports\fR] +[-F \fIchassisfile\fR] [-H \[aq]\fIchassis\fR\[aq]] [-G \fIesmchassisfile\fR] +.br +[-E \fIesmchassis\fR] +[-T \fItopology\(ulinput\fR] +.SH Options + +.TP 10 +--help + +Produces full help text. +.TP 10 +-b + +Sets the baseline mode. Default is compare/check mode. +.TP 10 +-e + +Evaluates health only. Default is compare/check mode. +.TP 10 +-s + +Saves history of failures (errors/differences). +.TP 10 +-d \fIdir\fR + +Identifies the top-level directory for saving baseline and history of failed checks. Default is /var/usr/lib/opa/analysis +.TP 10 +-c \fIfile\fR + +Specifies the error thresholds configuration file. Default is /etc/opa/opamon.conf +.TP 10 +-t \fIportsfile\fR + +Specifies the file with list of local HFI ports used to access fabric(s) for analysis. Default is /etc/opa/ports +.TP 10 +-p \fIports\fR + +Specifies the list of local HFI ports used to access fabric(s) for analysis. Default is the first active port. Specified as HFI:port as follows: +.RS +.TP 10 + +.sp +0:0 +First active port in system. +.RE + +.RS +.TP 10 + +.sp +0:\fIy\fR +Port \fIy\fR within system. +.RE + +.RS +.TP 10 + +.sp +\fIx\fR:0 +First active port on HFI \fIx\fR. +.RE + +.RS +.TP 10 + +.sp +\fIx\fR:\fIy\fR +HFI \fIx\fR, port \fIy\fR. +.RE + +.TP 10 +-F \fIchassisfile\fR + +Specifies the file with a chassis in a cluster. Default is /etc/opa/chassis +.TP 10 +-H \[aq]\fIchassis\fR\[aq] + +Specifies the list of chassis on which to execute the command. +.TP 10 +-G \fIesmchassisfile\fR + +Specifies the file with embedded SM chassis in the cluster. Default is /etc/opa/esm\(ulchassis +.TP 10 +-E \fIesmchassis\fR + +Specifies the list of embedded SM chassis to analyze. +.TP 10 +-T \fItopology\(ulinput\fR + +Specifies the name of topology input file to use. Any %P markers in this filename are replaced with the HFI:port being operated on, such as 0:0 or 1:2. Default is /etc/opa/topology.%P.xml. If -T NONE is specified, no topology input file is used. See +\fIopareport\fR +for more information. +.SH Example +opaallanalysis +.br + +opaallanalysis -p \[aq]1:1 2:1\[aq] +.SH Environment Variables + +.PP +The following environment variables are also used by this command: +.TP 10 +\fBPORTS\fR + +List of ports, used in absence of -t and -p. +.TP 10 +\fBPORTS\(ulFILE\fR + +File containing list of ports, used in absence of -t and -p. +.TP 10 +\fBFF\(ulTOPOLOGY\(ulFILE\fR + +File containing topology\(ulinput (may have %P marker in filename), used in absence of -T. +.TP 10 +\fBCHASSIS\fR + +List of chassis, used if -F and -H options are not supplied. +.TP 10 +\fBCHASSIS\(ulFILE\fR + +File containing list of chassis, used if -F and -H options are not supplied. +.TP 10 +\fBESM\(ulCHASSIS\fR + +List of SM chassis, used if -G and -E options are not supplied. +.TP 10 +\fBESM\(ulCHASSIS\(ulFILE\fR + +File containing list of SM chassis, used if -G and -E options are not supplied. +.TP 10 +\fBFF\(ulANALYSIS\(ulDIR\fR + +Top level directory for baselines and failed health checks. +.TP 10 +\fBFF\(ulCHASSIS\(ulCMDS\fR + +List of commands to issue during analysis, unused if -e option supplied. +.TP 10 +\fBFF\(ulCHASSIS\(ulHEALTH\fR + +Single command to issue to check overall health during analysis, unused if -b option supplied +.SH Details + +.PP +The opaallanalysis command performs the set of analysis specified in \fBFF\(ulALL\(ulANALYSIS\fR, which must be a space-separated list. This can be provided by the environment or using /etc/opa/opafastfabric.conf. The analysis set includes the options: fabric, chassis, esm, or hostsm. For a fabric with only externally managed switches, \fBFF\(ulALL\(ulANALYSIS\fR should be set to -fabric in opafastfabric.conf. +.PP +Note that the opaallanalysis command has options which are a super-set of the options for all other analysis commands. The options are passed along to the respective tools as needed. For example, the -c file option is passed on to opafabricanalysis if it is specified in \fBFF\(ulALL\(ulANALYSIS\fR. +.PP +The output files are all the output files for the \fBFF\(ulALL\(ulANALYSIS\fR selected set of analysis. See the previous sections for the specific output files. diff --git a/IbaTools/man/opacabletest.manPage b/IbaTools/man/opacabletest.manPage index bcafbe2..19eee37 100644 --- a/IbaTools/man/opacabletest.manPage +++ b/IbaTools/man/opacabletest.manPage @@ -1,187 +1,187 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opacabletest 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opacabletest - -.NL - -.PP - -\fB(Switch)\fR -Initiates or stops Cable Bit Error Rate stress tests for Intel(R) Omni-Path Host Fabric Interface (HFI)-to-switch links and/or ISLs. -.SH Syntax -.NL -opacabletest [-C|-A] [-c \fIfile\fR] [-f \fIhostfile\fR] [-h \fI\[aq]hosts\[aq]\fR] [-n \fInumprocs\fR] -.br -[-t \fIportsfile\fR] [-p \fIports\fR] [start|start\(ulfi|start\(ulisl|stop|stop\(ulfi| -.br -stop\(ulisl] ... -.SH Options -.NL - -.TP 10 ---help -.NL -Produces full help text. - -.TP 10 --C -.NL -Clears error counters. - -.TP 10 --A -.NL -Forces the system to clear hardware error counters. Implies -C. - -.TP 10 --c \fIfile\fR -.NL -Specifies the error thresholds configuration file. Default is /etc/opa/opamon.si.conf file. Only used if -C or -A specified. - -.TP 10 --f \fIhostfile\fR -.NL -Specifies the file with hosts to include in HFI -to-SW test. Default is /etc/opa/hosts file. - -.TP 10 --h \fIhosts\fR -.NL -Specifies the list of hosts to include in HFI -SW test. - -.TP 10 --n \fInumprocs\fR -.NL -Specifies the number of processes per host for HFI -SW test. - -.TP 10 --t \fIportsfile\fR -.NL -Specifies the file with list of local HFI ports used to access fabrics when clearing counters. Default is /etc/opa/ports file. - -.TP 10 --p \fIports\fR -.NL -Specifies the list of local HFI ports used to access fabrics for counter clear. - -.IP -Default is first active port. The first HFI in the system is 1. The first port on an HFI is 1. Uses the format hfi:port, -.br -for example: -.RS -.TP 10 - -.sp -0:0 -First active port in system. - -.RE - -.RS -.TP 10 - -.sp -0:y -Port \fIy\fR within system. - -.RE - -.RS -.TP 10 - -.sp -x:0 -First active port on HFI \fIx\fR. - -.RE - -.RS -.TP 10 - -.sp -x:y -HFI \fIx\fR, port \fIy\fR. - -.RE - -.TP 10 -start -.NL -Starts the HFI -SW and ISL tests. - -.TP 10 -start\(ulfi -.NL -Starts the HFI -SW test. - -.TP 10 -start\(ulisl -.NL -Starts the ISL test. - -.TP 10 -stop -.NL -Stops the HFI -SW and ISL tests. - -.TP 10 -stop\(ulfi -.NL -Stops the HFI -SW test. - -.TP 10 -stop\(ulisl -.NL -Stops the ISL test. - -.PP -The HFI -SW cable test requires that the \fBFF\(ulMPI\(ulAPPS\(ulDIR\fR is set, and it contains a pre-built copy of the mpi\(ulapps for an appropriate message passing interface (MPI). -.PP -The ISL cable test started by this tool assumes that the master Host Subnet Manager (HSM) is running on this host. If using the Embedded Subnet Manager (ESM), or if a different host is the master HSM, the ISL cable test must be controlled by the switch CLI, or by Intel(R) Omni-Path Fabric Suite FastFabric on the master HSM respectively. -.SH Examples -.NL -opacabletest -A start -.br -opacabletest -f good -A start -.br -opacabletest -h \[aq]arwen elrond\[aq] start\(ulfi -.br -HOSTS=\[aq]arwen elrond\[aq] opacabletest stop -.br -opacabletest -A -.SH Environment Variables -.NL - -.PP -The following environment variables are also used by this command: -.TP 10 -\fBHOSTS\fR -.NL -List of hosts, used if -h option not supplied. - -.TP 10 -\fBHOSTS\(ulFILE\fR -.NL -File containing list of hosts, used in absence of -f and -h. - -.TP 10 -\fBPORTS\fR -.NL -List of ports, used in absence of -t and -p. - -.TP 10 -\fBPORTS\(ulFILE\fR -.NL -File containing list of ports, used in absence of -t and -p. - -.TP 10 -\fBFF\(ulMAX\(ulPARALLEL\fR -.NL -Maximum concurrent operations. +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opacabletest 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opacabletest + + +.PP + +\fB(Switch)\fR +Initiates or stops Cable Bit Error Rate stress tests for Intel(R) Omni-Path Host Fabric Interface (HFI)-to-switch links and/or ISLs. +.SH Syntax +opacabletest [-C|-A] [-c \fIfile\fR] [-f \fIhostfile\fR] [-h \fI\[aq]hosts\[aq]\fR] [-n \fInumprocs\fR] +.br + +[-t \fIportsfile\fR] [-p \fIports\fR] [start|start\(ulfi|start\(ulisl|stop|stop\(ulfi| +.br +stop\(ulisl] ... +.SH Options + +.TP 10 +--help + +Produces full help text. + +.TP 10 +-C + +Clears error counters. + +.TP 10 +-A + +Forces the system to clear hardware error counters. Implies -C. + +.TP 10 +-c \fIfile\fR + +Specifies the error thresholds configuration file. Default is /etc/opa/opamon.si.conf file. Only used if -C or -A specified. + +.TP 10 +-f \fIhostfile\fR + +Specifies the file with hosts to include in HFI -to-SW test. Default is /etc/opa/hosts file. + +.TP 10 +-h \fIhosts\fR + +Specifies the list of hosts to include in HFI -SW test. + +.TP 10 +-n \fInumprocs\fR + +Specifies the number of processes per host for HFI -SW test. + +.TP 10 +-t \fIportsfile\fR + +Specifies the file with list of local HFI ports used to access fabrics when clearing counters. Default is /etc/opa/ports file. + +.TP 10 +-p \fIports\fR + +Specifies the list of local HFI ports used to access fabrics for counter clear. + +.IP +Default is first active port. The first HFI in the system is 1. The first port on an HFI is 1. Uses the format hfi:port, +.br +for example: +.RS +.TP 10 + +.sp +0:0 +First active port in system. + +.RE + +.RS +.TP 10 + +.sp +0:y +Port \fIy\fR within system. + +.RE + +.RS +.TP 10 + +.sp +x:0 +First active port on HFI \fIx\fR. + +.RE + +.RS +.TP 10 + +.sp +x:y +HFI \fIx\fR, port \fIy\fR. + +.RE + +.TP 10 +start + +Starts the HFI -SW and ISL tests. + +.TP 10 +start\(ulfi + +Starts the HFI -SW test. + +.TP 10 +start\(ulisl + +Starts the ISL test. + +.TP 10 +stop + +Stops the HFI -SW and ISL tests. + +.TP 10 +stop\(ulfi + +Stops the HFI -SW test. + +.TP 10 +stop\(ulisl + +Stops the ISL test. + +.PP +The HFI -SW cable test requires that the \fBFF\(ulMPI\(ulAPPS\(ulDIR\fR is set, and it contains a pre-built copy of the mpi\(ulapps for an appropriate message passing interface (MPI). +.PP +The ISL cable test started by this tool assumes that the master Host Subnet Manager (HSM) is running on this host. If using the Embedded Subnet Manager (ESM), or if a different host is the master HSM, the ISL cable test must be controlled by the switch CLI, or by Intel(R) Omni-Path Fabric Suite FastFabric on the master HSM respectively. +.SH Examples +opacabletest -A start +.br + +opacabletest -f good -A start +.br + +opacabletest -h \[aq]arwen elrond\[aq] start\(ulfi +.br + +HOSTS=\[aq]arwen elrond\[aq] opacabletest stop +.br + +opacabletest -A +.SH Environment Variables + +.PP +The following environment variables are also used by this command: +.TP 10 +\fBHOSTS\fR + +List of hosts, used if -h option not supplied. + +.TP 10 +\fBHOSTS\(ulFILE\fR + +File containing list of hosts, used in absence of -f and -h. + +.TP 10 +\fBPORTS\fR + +List of ports, used in absence of -t and -p. + +.TP 10 +\fBPORTS\(ulFILE\fR + +File containing list of ports, used in absence of -t and -p. + +.TP 10 +\fBFF\(ulMAX\(ulPARALLEL\fR + +Maximum concurrent operations. diff --git a/IbaTools/man/opacapture.manPage b/IbaTools/man/opacapture.manPage index 66629c0..3504fd7 100644 --- a/IbaTools/man/opacapture.manPage +++ b/IbaTools/man/opacapture.manPage @@ -1,97 +1,94 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opacapture 1 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opacapture - -.NL - -.PP - -\fB(Host)\fR -Captures critical system information into a zipped tar file. The resulting tar file should be sent to Customer Support along with any Intel(R) Omni-Path Fabric problem report regarding this system. -.PP - -.B NOTE: -The resulting host capture file can require significant amounts of space on the host. The actual size varies, but sizes can be multiple megabytes. Intel recommends ensuring that adequate disk space is available on the host system. - - -.SH Syntax -.NL -opacapture [-d \fIdetail\fR] \fIoutput\(ultgz\(ulfile\fR -.SH Options -.NL - -.TP 10 ---help -.NL -Produces full help text. - -.TP 10 --d \fIdetail\fR -.NL -Captures level of detail: -.RS -.TP 10 - -.sp -1 (Local) -Obtains local information from host. This is the default if no options are entered. - -.RE - -.RS -.TP 10 - -.sp -2 (Fabric) -In addition to \fILocal\fR, also obtains basic fabric information by queries to the SM and fabric error analysis using \fBopareport\fR. - -.RE - -.RS -.TP 10 - -.sp -3 (Fabric+FDB) -In addition to \fIFabric\fR, also obtains the Forwarding Database (FDB), which includes the switch forwarding tables from the SM and the server multicast membership. - -.RE - -.RS -.TP 10 - -.sp -4 (Analysis) -In addition to \fIFabric+FDB\fR, also obtains opaallanalysis results. If opaallanalysis has not yet been run, it is run as part of the capture. - -.RE - - -.TP 10 -.BR - -.PP - -.B NOTE: -Detail levels 2 - 4 can be used when fabric operational problems occur. If the problem is node-specific, detail level 1 should be sufficient. Detail levels 2 - 4 require an operational Fabric Manager. Typically your support representative requests a given detail level. If a given detail level takes excessively long or fails to be gathered, try a lower detail level. - -.PP -For detail levels 2 - 4, the additional information is only available on a node with Intel(R) Omni-Path Fabric Suite FastFabric Toolset installed. The information is gathered for every fabric specified in the /etc/opa/ports file. - -.TP 10 -\fIoutput\(ultgz\(ulfile\fR -.NL -Specifies the name of a file to be created by opacapture. The file name specified is overwritten if it already exists. Intel recommends using the .tgz suffix in the file name supplied. If the filename given does not have a .tgz suffix, the .tgz suffix is added. - -.SH Examples -.NL -opacapture mycapture.tgz -.br -opacapture -d 3 030127capture.tgz +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opacapture 1 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opacapture + + +.PP + +\fB(Host)\fR +Captures critical system information into a zipped tar file. The resulting tar file should be sent to Customer Support along with any Intel(R) Omni-Path Fabric problem report regarding this system. +.PP + +.B NOTE: +The resulting host capture file can require significant amounts of space on the host. The actual size varies, but sizes can be multiple megabytes. Intel recommends ensuring that adequate disk space is available on the host system. + + +.SH Syntax +opacapture [-d \fIdetail\fR] \fIoutput\(ultgz\(ulfile\fR +.SH Options + +.TP 10 +--help + +Produces full help text. + +.TP 10 +-d \fIdetail\fR + +Captures level of detail: +.RS +.TP 10 + +.sp +1 (Local) +Obtains local information from host. This is the default if no options are entered. + +.RE + +.RS +.TP 10 + +.sp +2 (Fabric) +In addition to \fILocal\fR, also obtains basic fabric information by queries to the SM and fabric error analysis using \fBopareport\fR. + +.RE + +.RS +.TP 10 + +.sp +3 (Fabric+FDB) +In addition to \fIFabric\fR, also obtains the Forwarding Database (FDB), which includes the switch forwarding tables from the SM and the server multicast membership. + +.RE + +.RS +.TP 10 + +.sp +4 (Analysis) +In addition to \fIFabric+FDB\fR, also obtains opaallanalysis results. If opaallanalysis has not yet been run, it is run as part of the capture. + +.RE + + +.TP 10 +.BR + +.PP + +.B NOTE: +Detail levels 2 - 4 can be used when fabric operational problems occur. If the problem is node-specific, detail level 1 should be sufficient. Detail levels 2 - 4 require an operational Fabric Manager. Typically your support representative requests a given detail level. If a given detail level takes excessively long or fails to be gathered, try a lower detail level. + +.PP +For detail levels 2 - 4, the additional information is only available on a node with Intel(R) Omni-Path Fabric Suite FastFabric Toolset installed. The information is gathered for every fabric specified in the /etc/opa/ports file. + +.TP 10 +\fIoutput\(ultgz\(ulfile\fR + +Specifies the name of a file to be created by opacapture. The file name specified is overwritten if it already exists. Intel recommends using the .tgz suffix in the file name supplied. If the filename given does not have a .tgz suffix, the .tgz suffix is added. + +.SH Examples +opacapture mycapture.tgz +.br + +opacapture -d 3 030127capture.tgz diff --git a/IbaTools/man/opacaptureall.manPage b/IbaTools/man/opacaptureall.manPage index 69b222a..37de8a0 100644 --- a/IbaTools/man/opacaptureall.manPage +++ b/IbaTools/man/opacaptureall.manPage @@ -1,251 +1,262 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opacaptureall 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opacaptureall - -.NL - -.PP - -\fB(Chassis and Host)\fR -Captures supporting information for a problem report from all hosts or Intel(R) Omni-Path Chassis and uploads to this system. -.PP - -\fBFor Hosts:\fR -When a host opacaptureall is performed, opacapture is run to create the specified capture file within ~root on each host (with the .tgz suffix added as needed). The files are uploaded and unpacked into a matching directory name within upload\(uldir/\fIhostname\fR/ on the local system. The default file name is hostcapture. -.PP - -\fBFor Chassis:\fR -When a chassis opacaptureall is performed, opacapture is run on each chassis and its output is saved to upload\(uldir/\fIchassisname\fR/\fIfile\fR on the local system. The default file name is chassiscapture. -.PP -For both host and chassis capture, the uploaded captures are combined into a .tgz file with the file name specified and the suffix .all.tgz added. -.SH Syntax -.NL -opacaptureall [-C] [-p] [-f \fIhostfile\fR] [-F \fIchassisfile\fR] [-h \[aq]\fIhosts\fR\[aq]] -.br -[-H \[aq]\fIchassis\fR\[aq]] [-t \fIportsfile\fR] [-d \fIupload\(uldir\fR] [-S] [-D \fIdetail\(ullevel\fR] -.br -[ \fIfile\fR] -.SH Options -.NL - -.TP 10 ---help -.NL -Produces full help text. - -.TP 10 --C -.NL -Performs capture against chassis. Default is hosts. - -.TP 10 --p -.NL -Performs capture upload in parallel on all host/chassis. For a host capture, this only affects the upload phase. - -.TP 10 --f \fIhostfile\fR -.NL -Specifies the file with hosts in cluster. Default is /etc/opa/hosts file. - -.TP 10 --F \fIchassisfile\fR -.NL -Specifies the file containing a list of chassis in the cluster. Default is /etc/opa/chassis file. - -.TP 10 --h \fIhosts\fR -.NL -Specifies the list of hosts on which to perform a capture. - -.TP 10 --H \fIchassis\fR -.NL -Specifies the list of chassis on which to perform a capture. - -.TP 10 --t \fIportsfile\fR -.NL -Specifies the file with list of local HFI ports used to access fabric(s) for switch access. Default is /etc/opa/ports file. - -.TP 10 --d \fIupload\(uldir\fR -.NL -Specifies the directory to upload to. Default is uploads. If not specified, the environment variable \fBUPLOADS\(ulDIR\fR is used. If that is not exported, the default ./uploads is used. - -.TP 10 --S -.NL -Securely prompts for password for administrator on a chassis. - -.TP 10 --D \fIdetail\(ullevel\fR -.NL -Specifies the level of detail of the capture passed to host opacapture. (Only used for host captures; ignored for chassis captures.) -.RS -.TP 10 - -.sp -1 (Local) -Obtains local information from each host. -.RE - -.RS -.TP 10 - -.sp -2 (Fabric) -In addition to \fILocal\fR, also obtains basic fabric information by queries to the SM and fabric error analysis using opareport. - -.RE - -.RS -.TP 10 - -.sp -3 (Fabric+FDB) -In addition to \fIFabric\fR, also obtains the Forwarding Database (FDB), which includes the switch forwarding tables from the SM. - -.RE - -.RS -.TP 10 - -.sp -4 (Analysis) -In addition to \fIFabric+FDB\fR, also obtains opaallanalysis results. If opaallanalysis has not yet been run, it is run as part of the capture. - -.RE - - -.TP 10 -.BR - -.PP - -.B NOTE: -Detail levels 2-4 can be used when fabric operational problems occur. If the problem is node-specific, detail level 1 should be sufficient. Detail levels 2-4 require an operational Intel(R) Omni-Path Fabric Suite Fabric Manager. Typically your support representative requests a given detail level. If a given detail level takes excessively long or fails to be gathered, try a lower detail level. - -.PP -For detail levels 2-4, the additional information is only gathered on the node running the opacaptureall command. The information is gathered for every fabric specified in the /etc/opa/ports file. - -.TP 10 -\fIfile\fR -.NL -Specifies the name for capture file. The suffix .tgz is appended if it is not specified in the name. - -.SH Examples -.NL - -.NL - -.SH Host Capture Examples -.NL -opacaptureall -.br -# Creates a hostcapture directory in upload\(uldir/hostname/ for each host -.br -in /etc/opa/hosts file, then creates hostcapture.all.tgz. -.br - -.br -opacaptureall mycapture -.br -# Creates a mycapture directory in upload\(uldir/hostname/ for each host -.br -in /etc/opa/hosts file, then creates mycapture.all.tgz. -.br - -.br -opacaptureall -h \[aq]arwen elrond\[aq] 030127capture -.br -# Gets the list of hosts from arwen elrond file and creates -.br -030127capture.tgz file. -.NL - -.SH Chassis Capture Examples -.NL -opacaptureall -C -.br -# Creates a chassiscapture file in upload\(uldir/chassisname/ for each -.br -chassis in /etc/opa/chassis file, then creates chassiscapture.all.tgz. -.br - -.br -opacaptureall -C mycapture -.br -# Creates a mycapture.tgz file in upload\(uldir/chassisname/ for each -.br -chassis in /etc/opa/chassis file, then creates mycapture.all.tgz. -.br - -.br -opacaptureall -C -H \[aq]chassis1 chassis2\[aq] 030127capture -.br -# Captures from chassis1 and chassis2, and creates 030127capture.tgz file. -.SH Environment Variables -.NL - -.PP -The following environment variables are also used by this command: -.TP 10 -\fBHOSTS\fR -.NL -List of hosts, used if -h option not supplied. - -.TP 10 -\fBCHASSIS\fR -.NL -List of chassis, used if -C is used and -h option is not supplied. - -.TP 10 -\fBHOSTS\(ulFILE\fR -.NL -File containing a list of hosts, used in the absence of -f and -h. - -.TP 10 -\fBCHASSIS\(ulFILE\fR -.NL -File containing a list of chassis, used in the absence of -F and -H. - -.TP 10 -\fBUPLOADS\(ulDIR\fR -.NL -Directory to upload to, used in the absence of -d. - -.TP 10 -\fBFF\(ulMAX\(ulPARALLEL\fR -.NL -When -p option is used, maximum concurrent operations are performed. - -.TP 10 -\fBFF\(ulCHASSIS\(ulLOGIN\(ulMETHOD\fR -.NL -How to log into chassis. Can be Telnet or SSH. - -.TP 10 -\fBFF\(ulCHASSIS\(ulADMIN\(ulPASSWORD\fR -.NL -Password for administrator on all chassis. Used in absence of -S option. - -.SH More Information -.NL - -.PP -When performing opacaptureall against hosts, internally SSH is used. The command opacaptureall requires that password-less SSH be set up between the host running Intel(R) Omni-Path Fabric Suite FastFabric Toolset and the hosts opacaptureall is operating against. The opasetupssh command can aid in setting up password-less SSH. -.PP -When performing operations against chassis, Intel recommends that you set up SSH keys using opasetupssh. If SSH keys are not set up, Intel recommends that all chassis be configured with the same admin password and that you use of the -S option to avoid keeping the password in configuration files. -.PP - -.B NOTE: -The resulting host capture files can require significant amounts of space on the Intel(R) Omni-Path Fabric Suite FastFabric Toolset host. Actual size varies, but sizes can be multiple megabytes per host. Intel recommends that you ensure adequate space is available on the Intel(R) Omni-Path Fabric Suite FastFabric Toolset system. In many cases, it may not be necessary to run opacaptureall against all hosts or chassis; instead, a representative subset may be sufficient. Consult with your support representative for further information. +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opacaptureall 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opacaptureall + + +.PP + +\fB(Chassis and Host)\fR +Captures supporting information for a problem report from all hosts or Intel(R) Omni-Path Chassis and uploads to this system. +.PP + +\fBFor Hosts:\fR +When a host opacaptureall is performed, opacapture is run to create the specified capture file within ~root on each host (with the .tgz suffix added as needed). The files are uploaded and unpacked into a matching directory name within upload\(uldir/\fIhostname\fR/ on the local system. The default file name is hostcapture. +.PP + +\fBFor Chassis:\fR +When a chassis opacaptureall is performed, opacapture is run on each chassis and its output is saved to upload\(uldir/\fIchassisname\fR/\fIfile\fR on the local system. The default file name is chassiscapture. +.PP +For both host and chassis capture, the uploaded captures are combined into a .tgz file with the file name specified and the suffix .all.tgz added. +.SH Syntax +opacaptureall [-C] [-p] [-f \fIhostfile\fR] [-F \fIchassisfile\fR] [-h \[aq]\fIhosts\fR\[aq]] +.br + +[-H \[aq]\fIchassis\fR\[aq]] [-t \fIportsfile\fR] [-d \fIupload\(uldir\fR] [-S] [-D \fIdetail\(ullevel\fR] +.br + +[ \fIfile\fR] +.SH Options + +.TP 10 +--help + +Produces full help text. + +.TP 10 +-C + +Performs capture against chassis. Default is hosts. + +.TP 10 +-p + +Performs capture upload in parallel on all host/chassis. For a host capture, this only affects the upload phase. + +.TP 10 +-f \fIhostfile\fR + +Specifies the file with hosts in cluster. Default is /etc/opa/hosts file. + +.TP 10 +-F \fIchassisfile\fR + +Specifies the file containing a list of chassis in the cluster. Default is /etc/opa/chassis file. + +.TP 10 +-h \fIhosts\fR + +Specifies the list of hosts on which to perform a capture. + +.TP 10 +-H \fIchassis\fR + +Specifies the list of chassis on which to perform a capture. + +.TP 10 +-t \fIportsfile\fR + +Specifies the file with list of local HFI ports used to access fabric(s) for switch access. Default is /etc/opa/ports file. + +.TP 10 +-d \fIupload\(uldir\fR + +Specifies the directory to upload to. Default is uploads. If not specified, the environment variable \fBUPLOADS\(ulDIR\fR is used. If that is not exported, the default ./uploads is used. + +.TP 10 +-S + +Securely prompts for password for administrator on a chassis. + +.TP 10 +-D \fIdetail\(ullevel\fR + +Specifies the level of detail of the capture passed to host opacapture. (Only used for host captures; ignored for chassis captures.) +.RS +.TP 10 + +.sp +1 (Local) +Obtains local information from each host. +.RE + +.RS +.TP 10 + +.sp +2 (Fabric) +In addition to \fILocal\fR, also obtains basic fabric information by queries to the SM and fabric error analysis using opareport. + +.RE + +.RS +.TP 10 + +.sp +3 (Fabric+FDB) +In addition to \fIFabric\fR, also obtains the Forwarding Database (FDB), which includes the switch forwarding tables from the SM. + +.RE + +.RS +.TP 10 + +.sp +4 (Analysis) +In addition to \fIFabric+FDB\fR, also obtains opaallanalysis results. If opaallanalysis has not yet been run, it is run as part of the capture. + +.RE + + +.TP 10 +.BR + +.PP + +.B NOTE: +Detail levels 2-4 can be used when fabric operational problems occur. If the problem is node-specific, detail level 1 should be sufficient. Detail levels 2-4 require an operational Intel(R) Omni-Path Fabric Suite Fabric Manager. Typically your support representative requests a given detail level. If a given detail level takes excessively long or fails to be gathered, try a lower detail level. + +.PP +For detail levels 2-4, the additional information is only gathered on the node running the opacaptureall command. The information is gathered for every fabric specified in the /etc/opa/ports file. + +.TP 10 +\fIfile\fR + +Specifies the name for capture file. The suffix .tgz is appended if it is not specified in the name. + +.SH Examples + + +.SH Host Capture Examples +opacaptureall +.br + +# Creates a hostcapture directory in upload\(uldir/hostname/ for each host +.br +in +/etc/opa/hosts file, then creates hostcapture.all.tgz. +.br + + +.br + +opacaptureall mycapture +.br + +# Creates a mycapture directory in upload\(uldir/hostname/ for each host +.br +in +/etc/opa/hosts file, then creates mycapture.all.tgz. +.br + + +.br + +opacaptureall -h \[aq]arwen elrond\[aq] 030127capture +.br + +# Gets the list of hosts from arwen elrond file and creates +.br +030127capture.tgz file. + + +.SH Chassis Capture Examples +opacaptureall -C +.br + +# Creates a chassiscapture file in upload\(uldir/chassisname/ for each +.br +chassis +in /etc/opa/chassis file, then creates chassiscapture.all.tgz. +.br + + +.br + +opacaptureall -C mycapture +.br + +# Creates a mycapture.tgz file in upload\(uldir/chassisname/ for each +.br +chassis +in /etc/opa/chassis file, then creates mycapture.all.tgz. +.br + + +.br + +opacaptureall -C -H \[aq]chassis1 chassis2\[aq] 030127capture +.br + +# Captures from chassis1 and chassis2, and creates 030127capture.tgz file. +.SH Environment Variables + +.PP +The following environment variables are also used by this command: +.TP 10 +\fBHOSTS\fR + +List of hosts, used if -h option not supplied. + +.TP 10 +\fBCHASSIS\fR + +List of chassis, used if -C is used and -h option is not supplied. + +.TP 10 +\fBHOSTS\(ulFILE\fR + +File containing a list of hosts, used in the absence of -f and -h. + +.TP 10 +\fBCHASSIS\(ulFILE\fR + +File containing a list of chassis, used in the absence of -F and -H. + +.TP 10 +\fBUPLOADS\(ulDIR\fR + +Directory to upload to, used in the absence of -d. + +.TP 10 +\fBFF\(ulMAX\(ulPARALLEL\fR + +When -p option is used, maximum concurrent operations are performed. + +.TP 10 +\fBFF\(ulCHASSIS\(ulLOGIN\(ulMETHOD\fR + +How to log into chassis. Can be Telnet or SSH. + +.TP 10 +\fBFF\(ulCHASSIS\(ulADMIN\(ulPASSWORD\fR + +Password for administrator on all chassis. Used in absence of -S option. + +.SH More Information + +.PP +When performing opacaptureall against hosts, internally SSH is used. The command opacaptureall requires that password-less SSH be set up between the host running Intel(R) Omni-Path Fabric Suite FastFabric Toolset and the hosts opacaptureall is operating against. The opasetupssh command can aid in setting up password-less SSH. +.PP +When performing operations against chassis, Intel recommends that you set up SSH keys using opasetupssh. If SSH keys are not set up, Intel recommends that all chassis be configured with the same admin password and that you use of the -S option to avoid keeping the password in configuration files. +.PP + +.B NOTE: +The resulting host capture files can require significant amounts of space on the Intel(R) Omni-Path Fabric Suite FastFabric Toolset host. Actual size varies, but sizes can be multiple megabytes per host. Intel recommends that you ensure adequate space is available on the Intel(R) Omni-Path Fabric Suite FastFabric Toolset system. In many cases, it may not be necessary to run opacaptureall against all hosts or chassis; instead, a representative subset may be sufficient. Consult with your support representative for further information. diff --git a/IbaTools/man/opachassisadmin.manPage b/IbaTools/man/opachassisadmin.manPage index 1ae8856..5e00631 100644 --- a/IbaTools/man/opachassisadmin.manPage +++ b/IbaTools/man/opachassisadmin.manPage @@ -1,550 +1,546 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opachassisadmin 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opachassisadmin - -.NL - -.PP - -\fB(Switch)\fR -Performs a number of multi-step chassis initialization and verification operations, including initial chassis setup, firmware upgrades, chassis reboot, and others. -.SH Syntax -.NL -opachassisadmin [-c] [-F \fIchassisfile\fR] [-H \[aq]\fIchassis\fR\[aq]] [-P \fIpackages\fR] -.br -[-a \fIaction\fR] [-I \fIfm\(ulbootstate\fR] [-S] [-d \fIupload\(uldir\fR] [-s \fIsecurityfiles\fR] -.br -\fIoperation\fR... -.SH Options -.NL - -.TP 10 ---help -.NL -Produces full help text. - -.TP 10 --c -.NL -Overwrites the result files from any previous run before starting this run. - -.TP 10 --F \fIchassisfile\fR -.NL -Specifies the file with chassis in cluster. The default is /etc/opa/chassis. - -.TP 10 --H \fIchassis\fR -.NL -Specifies the list of chassis to execute the operation against. - -.TP 10 --P \fIpackages\fR -.NL -Specifies the filenames and directories of firmware images to install. - -.RS - -.IP \(bu -For directories specified, all .pkg, .dpkg, and .spkg files in directory tree are used. shell wild cards may also be used within quotes. -.IP \(bu -For fmconfig, filename of FM config file is used. -.IP \(bu -For fmgetconfig, filename to upload to is used. Default opafm.xml. - -.RE - -.TP 10 --a \fIaction\fR -.NL -Specifies the action for the supplied file. The default is push. -.RS -.TP 10 - -.sp -For chassis upgrade: - -.RS -.TP 10 - -.sp -push -Ensures firmware is in primary or alternate. - -.RE - -.RS -.TP 10 - -.sp -select -Ensures firmware is in primary. - -.RE - -.RS -.TP 10 - -.sp -run -Ensures firmware is in primary and running. - -.RE - -.RE - - -.RS -.TP 10 - -.sp -For chassis fmconfig : - -.RS -.TP 10 - -.sp -push -Ensures the configuration file is in chassis. - -.RE - -.RS -.TP 10 - -.sp -run -After push, restarts FM on master, stops on secondary. - -.RE - -.RS -.TP 10 - -.sp -runall -After push, restarts FM on all management modules. - -.RE - -.RE - -.RS -.TP 10 - -.sp -For chassis fmcontrol : - -.RS -.TP 10 - -.sp -stop -Stops FM on all management modules. - -.RE - -.RS -.TP 10 - -.sp -run -Ensures FM running on master, stopped on secondary. - -.RE - -.RS -.TP 10 - -.sp -runall -Ensures FM running on all management modules. - -.RE - -.RS -.TP 10 - -.sp -restart -Restarts FM on master, stops on secondary. - -.RE - -.RS -.TP 10 - -.sp -restartall -Restarts FM on all MM. - -.RE - -.RE - -.RS -.TP 10 - -.sp -For chassis fmsecurityfiles : - -.RS -.TP 10 - -.sp -push -Ensures FM security files are in chassis. - -.RE - -.RS -.TP 10 - -.sp -restart -After push, restarts FM on master, stop on slave. - -.RE - -.RS -.TP 10 - -.sp -restartall -After push, restarts FM on all MM - -.RE - -.RE - -.TP 10 --I \fIfm\(ulbootstate\fR -.NL -Specifies the fmconfig and fmcontrol install options. -.RS -.TP 10 - -.sp -disable -Disables FM start at chassis boot. - -.RE - -.RS -.TP 10 - -.sp -enable -Enables FM start on master at chassis boot. - -.RE - -.RS -.TP 10 - -.sp -enableall -Enables FM start on all MM at chassis boot. - -.RE - - -.TP 10 --d \fIupload\(uldir\fR -.NL -Specifies the directory to upload FM configuration files to. Default is uploads. - -.TP 10 --S -.NL -Securely prompts for password for user on chassis. - -.TP 10 --s \fIsecurityFiles\fR -.NL -Specifies the security files to install. Default is *.pem. For Chassis \fIfmsecurityfiles\fR, filenames/directories of security files to install. For directories specified, all security files in directory tree are used. Shell wildcards may also be used within quotes. - -.IP -For Chassis \fIfmgetsecurityfiles\fR, filename to upload to. Default is *.pem -.TP 10 -\fIoperation\fR -.NL -Specifies the operation to perform. Can be one or more of: -.RS -.TP 10 - -.sp -reboot -Reboots chassis, ensures they go down and come back. - -.RE - -.RS -.TP 10 - -.sp -configure -Runs wizard to perform chassis configuration. - -.RE - -.RS -.TP 10 - -.sp -upgrade -Upgrades install of all chassis. - -.RE - -.RS -.TP 10 - -.sp -getconfig -Gets basic configuration of chassis. - -.RE - -.RS -.TP 10 - -.sp -fmconfig -FM configuration operation on all chassis. - -.RE - -.RS -.TP 10 - -.sp -fmgetconfig -Fetches FM configuration from all chassis. - -.RE - -.RS -.TP 10 - -.sp -fmcontrol -Controls FM on all chassis. - -.RE - -.RS -.TP 10 - -.sp -fmsecurityfiles -FM security files operation on all chassis. - -.RE - -.RS -.TP 10 - -.sp -fmgetsecurityfiles -Fetches FM security files from all chassis. - -.RE - -For more information on the operations that can be performed, see -\fIOperation Details\fR -. - -.SH Example -.NL -opachassisadmin -c reboot -.br -opachassisadmin -P /root/ChassisFw4.2.0.0.1 upgrade -.br -opachassisadmin -H \[aq]chassis1 chassis2\[aq] reboot -.br -CHASSIS=\[aq]chassis1 chassis2\[aq] opachassis\(uladmin reboot -.br -opachassisadmin -a run -P \[aq]*.pkg\[aq] upgrade -.SH Environment Variables -.NL - -.PP -The following environment variables are also used by this command: -.TP 10 -\fBCHASSIS\fR -.NL -List of chassis, used if -H and -F option not supplied. - -.TP 10 -\fBCHASSIS\(ulFILE\fR -.NL -File containing list of chassis, used in absence of -F and -H. - -.TP 10 -\fBFF\(ulMAX\(ulPARALLEL\fR -.NL -Maximum concurrent operations. - -.TP 10 -\fBFF\(ulSERIALIZE\(ulOUTPUT\fR -.NL -Serializes output of parallel operations (yes or no). - -.TP 10 -\fBFF\(ulTIMEOUT\(ulMULT\fR -.NL -Multiplier for all timeouts associated with this command. Used if the systems are slow for some reason. - -.TP 10 -\fBUPLOADS\(ulDIR\fR -.NL -Directory to upload to, used in absence of -d. - -.NL - -.SH Operation Details -.NL - -.PP - -\fB(Switch)\fR -All chassis operations log into the chassis as chassis user admin. Intel recommends using the -S option to securely prompt for a password, in which case the same password is used for all chassis. Alternately, the password may be put in the environment or the opafastfabric.conf file using \fBFF\(ulCHASSIS\(ulADMIN\(ulPASSWORD\fR. -.PP -All versions of Intel(R) Omni-Path Switch 100 Series firmware permit SSH keys to be configured within the chassis for secure password-less login. In this case, there is no need to configure a \fBFF\(ulCHASSIS\(ulADMIN\(ulPASSWORD\fR ; and, \fBFF\(ulCHASSIS\(ulLOGIN\(ulMETHOD\fR can be SSH. Refer to the -\fIIntel(R) Omni-Path Fabric Suite FastFabric User Guide\fR - - for more information. -.TP 10 -upgrade -.NL -Upgrades the firmware on each chassis or slot specified. The -P option selects a directory containing .pkg files or provides an explicit list of .pkg files for the chassis and/or slots. The -a option selects the desired minimal state for the new firmware. For each chassis and/or slot selected for upgrade, the .pkg file applicable to that slot is selected and used. If more than one .pkg file is specified of a given card type, the operation is undefined. - -.IP -The upgrade is intelligent and does not upgrade chassis that already have the desired firmware in the desired state (as specified by -a). -.IP -When the -a option specifies run, chassis that are not already running the desired firmware are rebooted. By selecting the proper \fBFF\(ulMAX\(ulPARALLEL\fR value, a rolling upgrade or a parallel upgrade may be accomplished. In most cases, a parallel upgrade is recommended for expediency. -.IP -For more information about chassis firmware, refer to the -\fIIntel(R) Omni-Path Fabric Switches GUI User Guide\fR - -and -\fIIntel(R) Omni-Path Fabric Switches Release Notes\fR - -. -.TP 10 -configure -.NL -Runs the chassis setup wizard, which asks a series of questions. Once the wizard has finished prompting for configuration information, all the selected chassis are configured through the CLI interface according to the responses. The following options may be configured for all chassis: - -.RS - -.IP \(bu -Syslog server IP address, TCP/UDP port number, syslog facility code, and the chassis LogMode. - -.IP \(bu -NTP server - -.IP \(bu -Local time zone - -.IP \(bu -Link CRC Mode - -.IP \(bu -Link width supported - -.IP \(bu -Node description - - -.RE - -.TP 10 -reboot -.NL -Reboots the given chassis and ensures they go down and come back up by pinging them during the reboot process. - -.IP -By selecting the proper \fBFF\(ulMAX\(ulPARALLEL\fR value, a rolling reboot or a parallel reboot may be accomplished. In most cases, a parallel upgrade is recommended for expediency. -.TP 10 -getconfig -.NL -Retrieves basic information from a chassis such as syslog, NTP configuration, timezone info, Link CRC Mode, Link Width, and node description. - -.TP 10 -fmconfig -.NL -Updates the Fabric Manager configuration file on each chassis specified. The -P option selects a file to transfer to the chassis. The -a option selects the desired minimal state for the new configuration and controls whether the FM is started/restarted after the file is updated. The -I option can be used to configure the FM start at boot for the selected chassis. - -.TP 10 -fmgetconfig -.NL -Uploads the FM configuration file from all selected chassis. The file is uploaded to the selected uploads directory. The -P option specifies the desired destination filename within the uploads directory. - -.TP 10 -fmcontrol -.NL -Allows the FM to be controlled on each chassis specified. The -a option selects the desired state for the FM. - -.IP -The -I option configures the FM start at boot for the selected chassis. -.TP 10 -fmsecurityfiles -.NL -Updates the FM security files on each chassis specified. The -s option selects file(s) to transfer to the chassis. The -a option selects the desired minimal state for the new security files. In this release, push is the only supported action. - -.TP 10 -fmgetsecurityfiles -.NL -Uploads the FM security files from all selected chassis. The files are uploaded to the selected uploads directory. The -s option specifies the desired destination filename within the uploads directory. - -.SH Logging -.NL - -.PP -opachassisadmin provides detailed logging of its results. During each run, the following files are produced: -.TP 10 -test.res -.NL -This file is appended with summary results of run. - -.TP 10 -test.log -.NL -This file is appended with detailed results of run. - -.TP 10 -save\(ultmp/ -.NL -This file is contains a directory per failed test with detailed logs. - -.TP 10 -test\(ultmp*/ -.NL -This file contains the intermediate results while the test is running. - -.PP -The -c option removes all log files. -.SH ssh Keys -.NL - -.PP -When performing operations against chassis, Intel recommends setting up SSH keys. If SSH keys are not set up, all chassis must be configured with the same admin password. In this case, Intel recommends using the -S option. The -S option avoids the need to keep the password in configuration files. -.SH Results -.NL - -.PP -Results from opachassisadmin are grouped into test suites, test cases, and test items. A given run of opachassisadmin represents a single test suite. Within a test suite, multiple test cases occur; typically one test case per chassis being operated on. Some of the more complex operations may have multiple test items per test case. Each test item represents a major step in the overall test case. -.PP -Each opachassisadmin run appends to test.res and test.log, and creates temporary files in test\(ultmp$PID in the current directory. The test.res file provides an overall summary of operations performed and their results. The same information is also displayed while opachassisadmin is executing. test.log contains detailed information about what was performed, including the specific commands executed and the resulting output. The test\(ultmp directories contain temporary files that reflect tests in progress (or killed). The logs for any failures are logged in the save\(ultemp directory with a directory per failed test case. If the same test case fails more than once, save\(ultemp retains the information from the first failure. Subsequent runs of opachassisadmin are appended to test.log. Intel recommends reviewing failures and using the -c option to remove old logs before subsequent runs of opachassisadmin. -.PP -opachassisadmin implicitly performs its operations in parallel. However, as for the other tools, \fBFF\(ulMAX\(ulPARALLEL\fR can be exported to change the degree of parallelism. 1000 parallel operations is the default. +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opachassisadmin 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opachassisadmin + + +.PP + +\fB(Switch)\fR +Performs a number of multi-step chassis initialization and verification operations, including initial chassis setup, firmware upgrades, chassis reboot, and others. +.SH Syntax +opachassisadmin [-c] [-F \fIchassisfile\fR] [-H \[aq]\fIchassis\fR\[aq]] [-P \fIpackages\fR] +.br + +[-a \fIaction\fR] [-I \fIfm\(ulbootstate\fR] [-S] [-d \fIupload\(uldir\fR] [-s \fIsecurityfiles\fR] +.br + +\fIoperation\fR ... +.SH Options + +.TP 10 +--help + +Produces full help text. + +.TP 10 +-c + +Overwrites the result files from any previous run before starting this run. + +.TP 10 +-F \fIchassisfile\fR + +Specifies the file with chassis in cluster. The default is /etc/opa/chassis. + +.TP 10 +-H \fIchassis\fR + +Specifies the list of chassis to execute the operation against. + +.TP 10 +-P \fIpackages\fR + +Specifies the filenames and directories of firmware images to install. + +.RS + +.IP \(bu +For directories specified, all .pkg, .dpkg, and .spkg files in directory tree are used. shell wild cards may also be used within quotes. +.IP \(bu +For fmconfig, filename of FM config file is used. +.IP \(bu +For fmgetconfig, filename to upload to is used. Default opafm.xml. + +.RE + +.TP 10 +-a \fIaction\fR + +Specifies the action for the supplied file. The default is push. +.RS +.TP 10 + +.sp +For chassis upgrade: + +.RS +.TP 10 + +.sp +push +Ensures firmware is in primary or alternate. + +.RE + +.RS +.TP 10 + +.sp +select +Ensures firmware is in primary. + +.RE + +.RS +.TP 10 + +.sp +run +Ensures firmware is in primary and running. + +.RE + +.RE + + +.RS +.TP 10 + +.sp +For chassis fmconfig : + +.RS +.TP 10 + +.sp +push +Ensures the configuration file is in chassis. + +.RE + +.RS +.TP 10 + +.sp +run +After push, restarts FM on master, stops on secondary. + +.RE + +.RS +.TP 10 + +.sp +runall +After push, restarts FM on all management modules. + +.RE + +.RE + +.RS +.TP 10 + +.sp +For chassis fmcontrol : + +.RS +.TP 10 + +.sp +stop +Stops FM on all management modules. + +.RE + +.RS +.TP 10 + +.sp +run +Ensures FM running on master, stopped on secondary. + +.RE + +.RS +.TP 10 + +.sp +runall +Ensures FM running on all management modules. + +.RE + +.RS +.TP 10 + +.sp +restart +Restarts FM on master, stops on secondary. + +.RE + +.RS +.TP 10 + +.sp +restartall +Restarts FM on all MM. + +.RE + +.RE + +.RS +.TP 10 + +.sp +For chassis fmsecurityfiles : + +.RS +.TP 10 + +.sp +push +Ensures FM security files are in chassis. + +.RE + +.RS +.TP 10 + +.sp +restart +After push, restarts FM on master, stop on slave. + +.RE + +.RS +.TP 10 + +.sp +restartall +After push, restarts FM on all MM + +.RE + +.RE + +.TP 10 +-I \fIfm\(ulbootstate\fR + +Specifies the fmconfig and fmcontrol install options. +.RS +.TP 10 + +.sp +disable +Disables FM start at chassis boot. + +.RE + +.RS +.TP 10 + +.sp +enable +Enables FM start on master at chassis boot. + +.RE + +.RS +.TP 10 + +.sp +enableall +Enables FM start on all MM at chassis boot. + +.RE + + +.TP 10 +-d \fIupload\(uldir\fR + +Specifies the directory to upload FM configuration files to. Default is uploads. + +.TP 10 +-S + +Securely prompts for password for user on chassis. + +.TP 10 +-s \fIsecurityFiles\fR + +Specifies the security files to install. Default is *.pem. For Chassis \fIfmsecurityfiles\fR, filenames/directories of security files to install. For directories specified, all security files in directory tree are used. Shell wildcards may also be used within quotes. + +.IP +For Chassis \fIfmgetsecurityfiles\fR, filename to upload to. Default is *.pem +.TP 10 +\fIoperation\fR + +Specifies the operation to perform. Can be one or more of: +.RS +.TP 10 + +.sp +reboot +Reboots chassis, ensures they go down and come back. + +.RE + +.RS +.TP 10 + +.sp +configure +Runs wizard to perform chassis configuration. + +.RE + +.RS +.TP 10 + +.sp +upgrade +Upgrades install of all chassis. + +.RE + +.RS +.TP 10 + +.sp +getconfig +Gets basic configuration of chassis. + +.RE + +.RS +.TP 10 + +.sp +fmconfig +FM configuration operation on all chassis. + +.RE + +.RS +.TP 10 + +.sp +fmgetconfig +Fetches FM configuration from all chassis. + +.RE + +.RS +.TP 10 + +.sp +fmcontrol +Controls FM on all chassis. + +.RE + +.RS +.TP 10 + +.sp +fmsecurityfiles +FM security files operation on all chassis. + +.RE + +.RS +.TP 10 + +.sp +fmgetsecurityfiles +Fetches FM security files from all chassis. + +.RE + +For more information on the operations that can be performed, see +\fIOperation Details\fR +. + +.SH Example +opachassisadmin -c reboot +.br + +opachassisadmin -P /root/ChassisFw4.2.0.0.1 upgrade +.br + +opachassisadmin -H \[aq]chassis1 chassis2\[aq] reboot +.br + +CHASSIS=\[aq]chassis1 chassis2\[aq] opachassis\(uladmin reboot +.br + +opachassisadmin -a run -P \[aq]*.pkg\[aq] upgrade +.SH Environment Variables + +.PP +The following environment variables are also used by this command: +.TP 10 +\fBCHASSIS\fR + +List of chassis, used if -H and -F option not supplied. + +.TP 10 +\fBCHASSIS\(ulFILE\fR + +File containing list of chassis, used in absence of -F and -H. + +.TP 10 +\fBFF\(ulMAX\(ulPARALLEL\fR + +Maximum concurrent operations. + +.TP 10 +\fBFF\(ulSERIALIZE\(ulOUTPUT\fR + +Serializes output of parallel operations (yes or no). + +.TP 10 +\fBFF\(ulTIMEOUT\(ulMULT\fR + +Multiplier for all timeouts associated with this command. Used if the systems are slow for some reason. + +.TP 10 +\fBUPLOADS\(ulDIR\fR + +Directory to upload to, used in absence of -d. + + +.SH Operation Details + +.PP + +\fB(Switch)\fR +All chassis operations log into the chassis as chassis user admin. Intel recommends using the -S option to securely prompt for a password, in which case the same password is used for all chassis. Alternately, the password may be put in the environment or the opafastfabric.conf file using \fBFF\(ulCHASSIS\(ulADMIN\(ulPASSWORD\fR. +.PP +All versions of Intel(R) Omni-Path Switch 100 Series firmware permit SSH keys to be configured within the chassis for secure password-less login. In this case, there is no need to configure a \fBFF\(ulCHASSIS\(ulADMIN\(ulPASSWORD\fR ; and, \fBFF\(ulCHASSIS\(ulLOGIN\(ulMETHOD\fR can be SSH. Refer to the +\fIIntel(R) Omni-Path Fabric Suite FastFabric User Guide\fR + + for more information. +.TP 10 +upgrade + +Upgrades the firmware on each chassis or slot specified. The -P option selects a directory containing .pkg files or provides an explicit list of .pkg files for the chassis and/or slots. The -a option selects the desired minimal state for the new firmware. For each chassis and/or slot selected for upgrade, the .pkg file applicable to that slot is selected and used. If more than one .pkg file is specified of a given card type, the operation is undefined. + +.IP +The upgrade is intelligent and does not upgrade chassis that already have the desired firmware in the desired state (as specified by -a). +.IP +When the -a option specifies run, chassis that are not already running the desired firmware are rebooted. By selecting the proper \fBFF\(ulMAX\(ulPARALLEL\fR value, a rolling upgrade or a parallel upgrade may be accomplished. In most cases, a parallel upgrade is recommended for expediency. +.IP +For more information about chassis firmware, refer to the +\fIIntel(R) Omni-Path Fabric Switches GUI User Guide\fR + +and +\fIIntel(R) Omni-Path Fabric Switches Release Notes\fR + +. +.TP 10 +configure + +Runs the chassis setup wizard, which asks a series of questions. Once the wizard has finished prompting for configuration information, all the selected chassis are configured through the CLI interface according to the responses. The following options may be configured for all chassis: + +.RS + +.IP \(bu +Syslog server IP address, TCP/UDP port number, syslog facility code, and the chassis LogMode. + +.IP \(bu +NTP server + +.IP \(bu +Local time zone + +.IP \(bu +Link CRC Mode + +.IP \(bu +Link width supported + +.IP \(bu +Node description + + +.RE + +.TP 10 +reboot + +Reboots the given chassis and ensures they go down and come back up by pinging them during the reboot process. + +.IP +By selecting the proper \fBFF\(ulMAX\(ulPARALLEL\fR value, a rolling reboot or a parallel reboot may be accomplished. In most cases, a parallel upgrade is recommended for expediency. +.TP 10 +getconfig + +Retrieves basic information from a chassis such as syslog, NTP configuration, timezone info, Link CRC Mode, Link Width, and node description. + +.TP 10 +fmconfig + +Updates the Fabric Manager configuration file on each chassis specified. The -P option selects a file to transfer to the chassis. The -a option selects the desired minimal state for the new configuration and controls whether the FM is started/restarted after the file is updated. The -I option can be used to configure the FM start at boot for the selected chassis. + +.TP 10 +fmgetconfig + +Uploads the FM configuration file from all selected chassis. The file is uploaded to the selected uploads directory. The -P option specifies the desired destination filename within the uploads directory. + +.TP 10 +fmcontrol + +Allows the FM to be controlled on each chassis specified. The -a option selects the desired state for the FM. + +.IP +The -I option configures the FM start at boot for the selected chassis. +.TP 10 +fmsecurityfiles + +Updates the FM security files on each chassis specified. The -s option selects file(s) to transfer to the chassis. The -a option selects the desired minimal state for the new security files. In this release, push is the only supported action. + +.TP 10 +fmgetsecurityfiles + +Uploads the FM security files from all selected chassis. The files are uploaded to the selected uploads directory. The -s option specifies the desired destination filename within the uploads directory. + +.SH Logging + +.PP +opachassisadmin provides detailed logging of its results. During each run, the following files are produced: +.TP 10 +test.res + +This file is appended with summary results of run. + +.TP 10 +test.log + +This file is appended with detailed results of run. + +.TP 10 +save\(ultmp/ + +This file is contains a directory per failed test with detailed logs. + +.TP 10 +test\(ultmp*/ + +This file contains the intermediate results while the test is running. + +.PP +The -c option removes all log files. +.SH ssh Keys + +.PP +When performing operations against chassis, Intel recommends setting up SSH keys. If SSH keys are not set up, all chassis must be configured with the same admin password. In this case, Intel recommends using the -S option. The -S option avoids the need to keep the password in configuration files. +.SH Results + +.PP +Results from opachassisadmin are grouped into test suites, test cases, and test items. A given run of opachassisadmin represents a single test suite. Within a test suite, multiple test cases occur; typically one test case per chassis being operated on. Some of the more complex operations may have multiple test items per test case. Each test item represents a major step in the overall test case. +.PP +Each opachassisadmin run appends to test.res and test.log, and creates temporary files in test\(ultmp$PID in the current directory. The test.res file provides an overall summary of operations performed and their results. The same information is also displayed while opachassisadmin is executing. test.log contains detailed information about what was performed, including the specific commands executed and the resulting output. The test\(ultmp directories contain temporary files that reflect tests in progress (or killed). The logs for any failures are logged in the save\(ultemp directory with a directory per failed test case. If the same test case fails more than once, save\(ultemp retains the information from the first failure. Subsequent runs of opachassisadmin are appended to test.log. Intel recommends reviewing failures and using the -c option to remove old logs before subsequent runs of opachassisadmin. +.PP +opachassisadmin implicitly performs its operations in parallel. However, as for the other tools, \fBFF\(ulMAX\(ulPARALLEL\fR can be exported to change the degree of parallelism. 1000 parallel operations is the default. diff --git a/IbaTools/man/opachassisanalysis.manPage b/IbaTools/man/opachassisanalysis.manPage index 4e21e35..c711822 100644 --- a/IbaTools/man/opachassisanalysis.manPage +++ b/IbaTools/man/opachassisanalysis.manPage @@ -1,268 +1,261 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opachassisanalysis 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opachassisanalysis - -.NL - -.PP - -\fB(Switch)\fR -Performs analysis of the chassis. -.PP -The opachassisanalysis tool checks the following for the Intel(R) Omni-Path Fabric Chassis: -.IP \(bu -Chassis configuration (as reported by the chassis commands specified in \fBFF\(ulCHASSIS\(ulCMDS\fR in opafastfabric.conf). -.IP \(bu -Chassis health (as reported by the chassis command specified in \fBFF\(ulCHASSIS\(ulHEALTH\fR in opafastfabric.conf). -.SH Syntax -.NL -opachassisanalysis [-b|-e] [-s] [-d \fIdir\fR] [-F \fIchassisfile\fR] -.br -[-H \[aq]\fIchassis\fR\[aq]] -.SH Options -.NL - -.TP 10 ---help -.NL -Produces full help text. -.TP 10 --b -.NL -Specifies the baseline mode. Default is the compare/check mode. -.TP 10 --e -.NL -Evaluates health only. Default is the compare/check mode. -.TP 10 --s -.NL -Saves history of failures (errors/differences). -.TP 10 --d \fIdir\fR -.NL -Specifies the top-level directory for saving baseline and history of failed checks. Default is /var/usr/lib/opa/analysis -.TP 10 --F \fIchassisfile\fR -.NL -Specifies the file with the chassis in the cluster. Default is /etc/opa/chassis -.TP 10 --H \[aq]\fIchassis\fR\[aq] -.NL -Specifies the list of chassis on which to execute the command. -.SH Example -.NL -opachassisanalysis -.SH Environment Variables -.NL - -.PP -The following environment variables are also used by this command: -.TP 10 -\fBCHASSIS\fR -.NL -List of chassis, used if -F and -H options are not supplied. -.TP 10 -\fBCHASSIS\(ulFILE\fR -.NL -File containing list of chassis, used if -F and -H options are not supplied. -.TP 10 -\fBFF\(ulANALYSIS\(ulDIR\fR -.NL -Top-level directory for baselines and failed health checks. -.TP 10 -\fBFF\(ulCHASSIS\(ulCMDS\fR -.NL -List of commands to issue during analysis, unused if -e option supplied. - -.TP 10 -\fBFF\(ulCHASSIS\(ulHEALTH\fR -.NL -Single command to issue to check overall health during analysis, unused if -b option supplied. - -.SH Details -.NL - -.PP -Intel recommends that you set up SSH keys for chassis (see -\fIopasetupssh\fR -). If SSH keys are not set up, all chassis must be configured with the same admin password and the password must be kept in the /etc/opa/opafastfabric.conf configuration file. -.PP -The default set of \fBFF\(ulCHASSIS\(ulCMDS\fR is: -.PP - -.br -showInventory fwVersion showNodeDesc timeZoneConf timeDSTConf -.br -snmpCommunityConf snmpTargetAddr showChassisIpAddr showDefaultRoute - -.br - -.PP -The commands specified in \fBFF\(ulCHASSIS\(ulCMDS\fR must be simple commands with no arguments. The output of these commands are compared to the baseline using \fBFF\(ulDIFF\(ulCMD\fR. Therefore, commands that include dynamically changing values, such as port packet counters, should not be included in this list. -.PP -\fBFF\(ulCHASSIS\(ulHEALTH\fR can specify one command (with arguments) to be used to check the chassis health. For chassis with newer firmware, the hwCheck command is recommended. For chassis with older firmware, a benign command, such as fruInfo, should be used. The default is hwCheck. Note that only the exit status of the FF\(ulCHASSIS\(ulHEALTH command is checked. The output is not captured and compared in a snapshot. However, on failure its output is saved to aid diagnosis. -.PP -The opachassisanalysis tool performs its analysis against one or more chassis in the fabric. As such, it permits the chassis to be specified using the -H, -F, CHASSIS, chassis\(ulfile or opafastfabric.conf. The handling of these options and settings is comparable to opacmdall -C and similar FastFabric Toolset commands against a chassis. -.PP -All files generated by opafabricanalysis start with chassis. in the file name. -.PP -The opachassisanalysis tool generates files such as the following within FF\(ulANALYSIS\(ulDIR. The actual file names reflect the individual chassis commands that have been configured through the FF\(ulCHASSIS\(ulHEALTH and FF\(ulCHASSIS\(ulCMDS parameters: -.PP - -\fBHealth Check\fR - -.IP \(bu -latest/chassis.hwCheck Output of hwCheck command for all selected chassis - -.PP - -\fBBaseline:\fR -During a baseline run, the following files are also created in \fIFF\(ulANALYSIS\(ulDIR\fR /latest. -.IP \(bu -baseline/chassis.fwVersion Output of fwVersion command for all selected chassis. - -.IP \(bu -baseline/chassis.showChassisIpAddr Output of the showChassisIpAddr. command for all selected chassis. - -.IP \(bu -baseline/chassis.showDefaultRoute Output of the showDefaultRoute command for all selected chassis. - -.IP \(bu -baseline/chassis.showNodeDesc Output of the showNodeDesc command for all selected chassis. - -.IP \(bu -baseline/chassis.showInventory Output of the showInventory command for all selected chassis. - -.IP \(bu -baseline/chassis.snmpCommunityConf Output of the snmpCommunityConf command for all selected chassis. - -.IP \(bu -baseline/chassis.snmpTargetAddr Output of the snmpTargetAddr command for all selected chassis. - -.IP \(bu -baseline/chassis.timeDSTConf Output of the timeDSTConf command for all selected chassis. - -.IP \(bu -baseline/chassis.timeZoneConf Output of the timeZoneConf command for all selected chassis. - -.PP - -\fBFull Analysis:\fR -The following .diff files are only created if differences are detected. -.IP \(bu -latest/chassis.hwCheck Output of the hwCheck command for all selected chassis. - -.IP \(bu -latest/chassis.fwVersion Output of the fwVersion command for all selected chassis. - -.IP \(bu -latest/chassis.fwVersion.diff diff of the baseline and latest fwVersion. - -.IP \(bu -latest/chassis.showChassisIpAddr Output of the showChassisIpAddr command for all selected chassis. - -.IP \(bu -latest/chassis.showChassisIpAddr.diff diff of baseline and latest showChassisIpAddr. - -.IP \(bu -latest/chassis.showDefaultRoute Output of the showDefaultRoute command for all selected chassis. - -.IP \(bu -latest/chassis.showDefaultRoute.diff diff of the baseline and the latest showDefaultRoute. - -.IP \(bu -latest/chassis.showNodeDesc Output of the showNodeDesc command for all selected chassis. - -.IP \(bu -latest/chassis.showNodeDesc.diff diff of the baseline and latest showNodeDesc. - -.IP \(bu -latest/chassis.showInventory Output of the showInventory command for all selected chassis. - -.IP \(bu -latest/chassis.showInventory.diff diff of the baseline and latest showInventory. - -.IP \(bu -latest/chassis.snmpCommunityConf Output of the snmpCommunityConf command for all selected chassis. - -.IP \(bu -latest/chassis.snmpCommunityConf.diff diff of the baseline and latest snmpCommunityConf. - -.IP \(bu -latest/chassis.snmpTargetAddr Output of the snmpTargetAddr command for all selected chassis. - -.IP \(bu -latest/chassis.snmpTargetAddr.diff diff of the baseline and latest snmpTargetAddr. - -.IP \(bu -latest/chassis.timeDSTConf Output of the timeDSTConf command for all selected chassis. - -.IP \(bu -latest/chassis.timeDSTConf.diff diff of the baseline and latest timeDSTConf. - -.IP \(bu -latest/chassis.timeZoneConf Output of the timeZoneConf command for all selected chassis. - -.IP \(bu -latest/chassis.timeZoneConf.diff diff of the baseline and latest timeZonfConf. - -.PP -If the -s option is used and failures are detected, files related to the checks that failed are also copied to a time-stamped directory name under FF\(ulANALYSIS\(ulDIR. -.SH Chassis Items Checked Against the Baseline -.NL - -.PP -Based upon showInventory : -.IP \(bu -Addition/removal of Chassis FRUsReplacement is only checked for FRUs that showInventory displays the serial number. - -.IP \(bu -Removal of redundant FRUs (spines, power supply, fan) -.PP -Based upon fwVersion: -.IP \(bu -Changes to primary or alternate FW versions installed in cards in chassis. -.PP -Based upon showNodeDesc: -.IP \(bu -Changes to configured node description for chassis. Note changes detected here would also be detected in fabric level analysis. -.PP -Based upon timeZoneConf and timeDSTConf: -.IP \(bu -Changes to the chassis time zone and daylight savings time configuration. -.PP -Based upon snmpCommunityConf and snmpTargetAddr: -.IP \(bu -Changes to SNMP persistent configuration within the chassis. -.PP -The following Chassis items are not checked against baseline: -.IP \(bu -Changes to the chassis configuration on the management LAN (for example, showChassisIpAddr, showDefaultRoute). Such changes typically result in the chassis not responding on the LAN at the expected address that is detected by failures that perform other chassis checks. -.SH Chassis Items Also Checked During Health Check -.NL - -.PP -Based upon hwCheck: -.IP \(bu -Overall health of FRUs in chassis: -.IP \(bu -Status of Fans in chassis -.IP \(bu -Status of Power Supplies in chassis -.IP \(bu -Temp/Voltage for each card -.IP \(bu -Presence of adequate power/cooling of FRUs -.IP \(bu -Presence of N+1 power/cooling of FRUs -.IP \(bu -Presence of Redundant AC input +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opachassisanalysis 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opachassisanalysis + + +.PP + +\fB(Switch)\fR +Performs analysis of the chassis. +.PP +The opachassisanalysis tool checks the following for the Intel(R) Omni-Path Fabric Chassis: +.IP \(bu +Chassis configuration (as reported by the chassis commands specified in \fBFF\(ulCHASSIS\(ulCMDS\fR in opafastfabric.conf). +.IP \(bu +Chassis health (as reported by the chassis command specified in \fBFF\(ulCHASSIS\(ulHEALTH\fR in opafastfabric.conf). +.SH Syntax +opachassisanalysis [-b|-e] [-s] [-d \fIdir\fR] [-F \fIchassisfile\fR] +.br +[-H \[aq]\fIchassis\fR\[aq]] +.SH Options + +.TP 10 +--help + +Produces full help text. +.TP 10 +-b + +Specifies the baseline mode. Default is the compare/check mode. +.TP 10 +-e + +Evaluates health only. Default is the compare/check mode. +.TP 10 +-s + +Saves history of failures (errors/differences). +.TP 10 +-d \fIdir\fR + +Specifies the top-level directory for saving baseline and history of failed checks. Default is /var/usr/lib/opa/analysis +.TP 10 +-F \fIchassisfile\fR + +Specifies the file with the chassis in the cluster. Default is /etc/opa/chassis +.TP 10 +-H \[aq]\fIchassis\fR\[aq] + +Specifies the list of chassis on which to execute the command. +.SH Example +opachassisanalysis +.SH Environment Variables + +.PP +The following environment variables are also used by this command: +.TP 10 +\fBCHASSIS\fR + +List of chassis, used if -F and -H options are not supplied. +.TP 10 +\fBCHASSIS\(ulFILE\fR + +File containing list of chassis, used if -F and -H options are not supplied. +.TP 10 +\fBFF\(ulANALYSIS\(ulDIR\fR + +Top-level directory for baselines and failed health checks. +.TP 10 +\fBFF\(ulCHASSIS\(ulCMDS\fR + +List of commands to issue during analysis, unused if -e option supplied. + +.TP 10 +\fBFF\(ulCHASSIS\(ulHEALTH\fR + +Single command to issue to check overall health during analysis, unused if -b option supplied. + +.SH Details + +.PP +Intel recommends that you set up SSH keys for chassis (see +\fIopasetupssh\fR +). If SSH keys are not set up, all chassis must be configured with the same admin password and the password must be kept in the /etc/opa/opafastfabric.conf configuration file. +.PP +The default set of \fBFF\(ulCHASSIS\(ulCMDS\fR is: +.PP + +.br +showInventory fwVersion showNodeDesc timeZoneConf timeDSTConf +.br + +snmpCommunityConf snmpTargetAddr showChassisIpAddr showDefaultRoute + +.br + +.PP +The commands specified in \fBFF\(ulCHASSIS\(ulCMDS\fR must be simple commands with no arguments. The output of these commands are compared to the baseline using \fBFF\(ulDIFF\(ulCMD\fR. Therefore, commands that include dynamically changing values, such as port packet counters, should not be included in this list. +.PP +\fBFF\(ulCHASSIS\(ulHEALTH\fR can specify one command (with arguments) to be used to check the chassis health. For chassis with newer firmware, the hwCheck command is recommended. For chassis with older firmware, a benign command, such as fruInfo, should be used. The default is hwCheck. Note that only the exit status of the FF\(ulCHASSIS\(ulHEALTH command is checked. The output is not captured and compared in a snapshot. However, on failure its output is saved to aid diagnosis. +.PP +The opachassisanalysis tool performs its analysis against one or more chassis in the fabric. As such, it permits the chassis to be specified using the -H, -F, CHASSIS, chassis\(ulfile or opafastfabric.conf. The handling of these options and settings is comparable to opacmdall -C and similar FastFabric Toolset commands against a chassis. +.PP +All files generated by opafabricanalysis start with chassis. in the file name. +.PP +The opachassisanalysis tool generates files such as the following within FF\(ulANALYSIS\(ulDIR. The actual file names reflect the individual chassis commands that have been configured through the FF\(ulCHASSIS\(ulHEALTH and FF\(ulCHASSIS\(ulCMDS parameters: +.PP + +\fBHealth Check\fR + +.IP \(bu +latest/chassis.hwCheck Output of hwCheck command for all selected chassis + +.PP + +\fBBaseline:\fR +During a baseline run, the following files are also created in \fIFF\(ulANALYSIS\(ulDIR\fR /latest. +.IP \(bu +baseline/chassis.fwVersion Output of fwVersion command for all selected chassis. + +.IP \(bu +baseline/chassis.showChassisIpAddr Output of the showChassisIpAddr. command for all selected chassis. + +.IP \(bu +baseline/chassis.showDefaultRoute Output of the showDefaultRoute command for all selected chassis. + +.IP \(bu +baseline/chassis.showNodeDesc Output of the showNodeDesc command for all selected chassis. + +.IP \(bu +baseline/chassis.showInventory Output of the showInventory command for all selected chassis. + +.IP \(bu +baseline/chassis.snmpCommunityConf Output of the snmpCommunityConf command for all selected chassis. + +.IP \(bu +baseline/chassis.snmpTargetAddr Output of the snmpTargetAddr command for all selected chassis. + +.IP \(bu +baseline/chassis.timeDSTConf Output of the timeDSTConf command for all selected chassis. + +.IP \(bu +baseline/chassis.timeZoneConf Output of the timeZoneConf command for all selected chassis. + +.PP + +\fBFull Analysis:\fR +The following .diff files are only created if differences are detected. +.IP \(bu +latest/chassis.hwCheck Output of the hwCheck command for all selected chassis. + +.IP \(bu +latest/chassis.fwVersion Output of the fwVersion command for all selected chassis. + +.IP \(bu +latest/chassis.fwVersion.diff diff of the baseline and latest fwVersion. + +.IP \(bu +latest/chassis.showChassisIpAddr Output of the showChassisIpAddr command for all selected chassis. + +.IP \(bu +latest/chassis.showChassisIpAddr.diff diff of baseline and latest showChassisIpAddr. + +.IP \(bu +latest/chassis.showDefaultRoute Output of the showDefaultRoute command for all selected chassis. + +.IP \(bu +latest/chassis.showDefaultRoute.diff diff of the baseline and the latest showDefaultRoute. + +.IP \(bu +latest/chassis.showNodeDesc Output of the showNodeDesc command for all selected chassis. + +.IP \(bu +latest/chassis.showNodeDesc.diff diff of the baseline and latest showNodeDesc. + +.IP \(bu +latest/chassis.showInventory Output of the showInventory command for all selected chassis. + +.IP \(bu +latest/chassis.showInventory.diff diff of the baseline and latest showInventory. + +.IP \(bu +latest/chassis.snmpCommunityConf Output of the snmpCommunityConf command for all selected chassis. + +.IP \(bu +latest/chassis.snmpCommunityConf.diff diff of the baseline and latest snmpCommunityConf. + +.IP \(bu +latest/chassis.snmpTargetAddr Output of the snmpTargetAddr command for all selected chassis. + +.IP \(bu +latest/chassis.snmpTargetAddr.diff diff of the baseline and latest snmpTargetAddr. + +.IP \(bu +latest/chassis.timeDSTConf Output of the timeDSTConf command for all selected chassis. + +.IP \(bu +latest/chassis.timeDSTConf.diff diff of the baseline and latest timeDSTConf. + +.IP \(bu +latest/chassis.timeZoneConf Output of the timeZoneConf command for all selected chassis. + +.IP \(bu +latest/chassis.timeZoneConf.diff diff of the baseline and latest timeZonfConf. + +.PP +If the -s option is used and failures are detected, files related to the checks that failed are also copied to a time-stamped directory name under FF\(ulANALYSIS\(ulDIR. +.SH Chassis Items Checked Against the Baseline + +.PP +Based upon showInventory : +.IP \(bu +Addition/removal of Chassis FRUsReplacement is only checked for FRUs that showInventory displays the serial number. + +.IP \(bu +Removal of redundant FRUs (spines, power supply, fan) +.PP +Based upon fwVersion: +.IP \(bu +Changes to primary or alternate FW versions installed in cards in chassis. +.PP +Based upon showNodeDesc: +.IP \(bu +Changes to configured node description for chassis. Note changes detected here would also be detected in fabric level analysis. +.PP +Based upon timeZoneConf and timeDSTConf: +.IP \(bu +Changes to the chassis time zone and daylight savings time configuration. +.PP +Based upon snmpCommunityConf and snmpTargetAddr: +.IP \(bu +Changes to SNMP persistent configuration within the chassis. +.PP +The following Chassis items are not checked against baseline: +.IP \(bu +Changes to the chassis configuration on the management LAN (for example, showChassisIpAddr, showDefaultRoute). Such changes typically result in the chassis not responding on the LAN at the expected address that is detected by failures that perform other chassis checks. +.SH Chassis Items Also Checked During Health Check + +.PP +Based upon hwCheck: +.IP \(bu +Overall health of FRUs in chassis: +.IP \(bu +Status of Fans in chassis +.IP \(bu +Status of Power Supplies in chassis +.IP \(bu +Temp/Voltage for each card +.IP \(bu +Presence of adequate power/cooling of FRUs +.IP \(bu +Presence of N+1 power/cooling of FRUs +.IP \(bu +Presence of Redundant AC input diff --git a/IbaTools/man/opacheckload.manPage b/IbaTools/man/opacheckload.manPage index cf72a61..a6943bb 100644 --- a/IbaTools/man/opacheckload.manPage +++ b/IbaTools/man/opacheckload.manPage @@ -1,88 +1,85 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opacheckload 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opacheckload - -.NL - -.PP -Returns load information on hosts in the fabric. -.SH Syntax -.NL -opacheckload [-f \fIhostfile\fR] [-h \[aq]\fIhosts\fR\[aq]] [-r] [-a|-n numprocs] -.br -[-d uploaddir] -.SH Options -.NL - -.TP 10 ---help -.NL -Produces full help text. - -.TP 10 --f \fIhostfile\fR -.NL -Specifies the file with hosts to check. Default is /etc/opa/hosts - -.TP 10 --h \fIhosts\fR -.NL -Specifies the list of hosts to check. - -.TP 10 --r -.NL -Reverses output to show the least busy hosts. Default is busiest hosts. -.TP 10 --n \fInumprocs\fR -.NL -Shows the specified number of top \fInumprocs\fR hosts. Default is 10. -.TP 10 --a -.NL -Shows all hosts. Default is 10. - -.TP 10 --d \fIupload\(uldir\fR -.NL -Specifies the target directory to upload loadavg. Default is uploads. - -.SH Examples -.NL -opacheckload -.br -opacheckload -h \[aq]arwen elrond\[aq] -.br -HOSTS=\[aq]arwen elrond\[aq] opacheckload -.SH Environment Variables -.NL - -.PP -The following environment variables are also used by this command: -.TP 10 -\fBHOSTS\fR -.NL -List of hosts, used if -h option not supplied. - -.TP 10 -\fBHOSTS\(ulFILE\fR -.NL -File containing list of hosts, used in absence of -f and -h. - -.TP 10 -\fBUPLOADS\(ulDIR\fR -.NL -Directory to upload loadavg, used in absence of -d. - -.TP 10 -\fBFF\(ulMAX\(ulPARALLEL\fR -.NL -Maximum concurrent operations. +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opacheckload 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opacheckload + + +.PP +Returns load information on hosts in the fabric. +.SH Syntax +opacheckload [-f \fIhostfile\fR] [-h \[aq]\fIhosts\fR\[aq]] [-r] [-a|-n numprocs] +.br +[-d uploaddir] +.SH Options + +.TP 10 +--help + +Produces full help text. + +.TP 10 +-f \fIhostfile\fR + +Specifies the file with hosts to check. Default is /etc/opa/hosts + +.TP 10 +-h \fIhosts\fR + +Specifies the list of hosts to check. + +.TP 10 +-r + +Reverses output to show the least busy hosts. Default is busiest hosts. +.TP 10 +-n \fInumprocs\fR + +Shows the specified number of top \fInumprocs\fR hosts. Default is 10. +.TP 10 +-a + +Shows all hosts. Default is 10. + +.TP 10 +-d \fIupload\(uldir\fR + +Specifies the target directory to upload loadavg. Default is uploads. + +.SH Examples +opacheckload +.br + +opacheckload -h \[aq]arwen elrond\[aq] +.br + +HOSTS=\[aq]arwen elrond\[aq] opacheckload +.SH Environment Variables + +.PP +The following environment variables are also used by this command: +.TP 10 +\fBHOSTS\fR + +List of hosts, used if -h option not supplied. + +.TP 10 +\fBHOSTS\(ulFILE\fR + +File containing list of hosts, used in absence of -f and -h. + +.TP 10 +\fBUPLOADS\(ulDIR\fR + +Directory to upload loadavg, used in absence of -d. + +.TP 10 +\fBFF\(ulMAX\(ulPARALLEL\fR + +Maximum concurrent operations. diff --git a/IbaTools/man/opacmdall.manPage b/IbaTools/man/opacmdall.manPage index 314fe73..5c1a7fa 100644 --- a/IbaTools/man/opacmdall.manPage +++ b/IbaTools/man/opacmdall.manPage @@ -1,187 +1,183 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opacmdall 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opacmdall - -.NL - -.PP - -\fB(Linux and Switch)\fR -Executes a command on all hosts or Intel(R) Omni-Path Chassis. This powerful command can be used for configuring servers or chassis, verifying that they are running, starting and stopping host processes, and other tasks. -.PP - -.B NOTE: -opacmdall depends on the Linux* convention that utilities return 0 for success and >0 for failure. If opacmdall is used to execute a non-standard utility like diff or a program that uses custom exit codes, then opacmdall may erroneously report "Command execution FAILED" when it encounters a non-zero exit code. However, command output is still returned normally and the error may be safely ignored. - -.SH Syntax -.NL -opacmdall [-CpqPS] [-f \fIhostfile\fR] [-F \fIchassisfile\fR] [-h \fIhosts\fR] -.br -[-H \fIchassis\fR] [-u \fIuser\fR] [-m \fImarker\fR] [-T \fItimelimit\fR] \fIcmd\fR -.SH Options -.NL - -.TP 10 ---help -.NL -Produces full help text. - -.TP 10 --C -.NL -Performs command against chassis. Default is hosts. - -.TP 10 --p -.NL -Runs command in parallel on all hosts/chassis. - -.TP 10 --q -.NL -Quiet mode, do not show command to execute. - -.TP 10 --P -.NL -Outputs the hostname/chassis name as prefix to each output line. This can make script processing of output easier. - -.TP 10 --S -.NL -Securely prompts for password for user on chassis. - -.TP 10 --f \fIhostfile\fR -.NL -Specifies the file with hosts in cluster. Default is /etc/opa/hosts file. - -.TP 10 --F \fIchassisfile\fR -.NL -Specifies the file with chassis in cluster. Default is /etc/opa/chassis file. - -.TP 10 --h \fIhost\fR -.NL -Specifies the list of hosts to execute command on. - -.TP 10 --H \fIchassis\fR -.NL -Specifies the list of chassis to execute command on. - -.TP 10 --u \fIuser\fR -.NL -Specifies the user to perform the command as: -.RS - -.IP \(bu -For hosts, the default is current user code. -.IP \(bu -For chassis, the default is admin. - -.RE - - -.TP 10 --m \fImarker\fR -.NL -Specifies the marker for end of chassis command output. If omitted, defaults to chassis command prompt. This may be a regular expression. - -.TP 10 --T \fItimelimit\fR -.NL -Specifies the time limit in seconds when running host commands. Default is -1 (infinite). - -.SH Examples -.NL - -.NL - -.SH Operations on Host -.NL -opacmdall date -.br -opacmdall \[aq]uname -a\[aq] -.br -opacmdall -h \[aq]elrond arwen\[aq] date -.br -HOSTS=\[aq]elrond arwen\[aq] opacmdall date -.NL - -.SH Operations on Chassis -.NL -opacmdall -C \[aq]ismPortStats -noprompt\[aq] -.br -opacmdall -C -H \[aq]chassis1 chassis2\[aq] ismPortStats -noprompt\[aq] -.br -CHASSIS=\[aq]chassis1 chassis2\[aq] opacmdall -C ismPortStats -noprompt\[aq] -.SH Environment Variables -.NL - -.PP -The following environment variables are also used by this command: -.TP 10 -\fBHOSTS\fR -.NL -List of hosts, used if -h option not supplied. - -.TP 10 -\fBCHASSIS\fR -.NL -List of chassis, used if -C is used and -H and -F options not supplied. - -.TP 10 -\fBHOSTS\(ulFILE\fR -.NL -File containing list of hosts, used in absence of -f and -h. - -.TP 10 -\fBCHASSIS\(ulFILE\fR -.NL -File containing list of chassis, used in absence of -F and -H. - -.TP 10 -\fBFF\(ulMAX\(ulPARALLEL\fR -.NL -When -p option is used, maximum concurrent operations are performed. - -.TP 10 -\fBFF\(ulSERIALIZE\(ulOUTPUT\fR -.NL -Serialize output of parallel operations (yes or no). - -.TP 10 -\fBFF\(ulCHASSIS\(ulLOGIN\(ulMETHOD\fR -.NL -How to log into chassis. Can be Telnet or SSH. - -.TP 10 -\fBFF\(ulCHASSIS\(ulADMIN\(ulPASSWORD\fR -.NL -Password for admin on all chassis. Used in absence of -S option. - -.SH Notes -.NL - -.PP -All commands performed with opacmdall must be non-interactive in nature. opacmdall waits for the command to complete before proceeding. For example, when running host commands such as rm, the -i option (interactively prompt before removal) should not be used. (Note that this option is sometimes part of a standard bash alias list.) Similarly, when running chassis commands such as fwUpdateChassis, the -reboot option should not be used because this option causes an immediate reboot and therefore the command never returns. Also, the chassis command reboot should not be executed using opacmdall. Instead, use the opachassisadmin reboot command to reboot one or more chassis. For further information about individual chassis CLI commands, consult the -\fIIntel(R) Omni-Path Fabric Switches Command Line Interface Reference Guide\fR - -. For further information about Linux* operating system commands, consult the man pages. -.PP -When performing opacmdall against hosts, internally SSH is used. The command opacmdall requires that password-less SSH be set up between the host running the Intel(R) Omni-Path Fabric Suite FastFabric Toolset and the hosts opacmdall is operating against. The opasetupssh FastFabric tool can aid in setting up password-less SSH. -.PP -When performing opacmdall against a set of chassis, all chassis must be configured with the same admin password. Alternatively, the opasetupssh FastFabric tool can be used to set up password-less SSH to the chassis. -.PP -When performing operations against chassis, Intel recommends that you set up SSH keys using opasetupssh. If SSH keys are not set up, Intel recommends that you use the -S option to avoid keeping the password in configuration files. +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opacmdall 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opacmdall + + +.PP + +\fB(Linux and Switch)\fR +Executes a command on all hosts or Intel(R) Omni-Path Chassis. This powerful command can be used for configuring servers or chassis, verifying that they are running, starting and stopping host processes, and other tasks. +.PP + +.B NOTE: +opacmdall depends on the Linux* convention that utilities return 0 for success and >0 for failure. If opacmdall is used to execute a non-standard utility like diff or a program that uses custom exit codes, then opacmdall may erroneously report "Command execution FAILED" when it encounters a non-zero exit code. However, command output is still returned normally and the error may be safely ignored. + +.SH Syntax +opacmdall [-CpqPS] [-f \fIhostfile\fR] [-F \fIchassisfile\fR] [-h \fIhosts\fR] +.br +[-H \fIchassis\fR] +[-u \fIuser\fR] [-m \fImarker\fR] [-T \fItimelimit\fR] \fIcmd\fR +.SH Options + +.TP 10 +--help + +Produces full help text. + +.TP 10 +-C + +Performs command against chassis. Default is hosts. + +.TP 10 +-p + +Runs command in parallel on all hosts/chassis. + +.TP 10 +-q + +Quiet mode, do not show command to execute. + +.TP 10 +-P + +Outputs the hostname/chassis name as prefix to each output line. This can make script processing of output easier. + +.TP 10 +-S + +Securely prompts for password for user on chassis. + +.TP 10 +-f \fIhostfile\fR + +Specifies the file with hosts in cluster. Default is /etc/opa/hosts file. + +.TP 10 +-F \fIchassisfile\fR + +Specifies the file with chassis in cluster. Default is /etc/opa/chassis file. + +.TP 10 +-h \fIhost\fR + +Specifies the list of hosts to execute command on. + +.TP 10 +-H \fIchassis\fR + +Specifies the list of chassis to execute command on. + +.TP 10 +-u \fIuser\fR + +Specifies the user to perform the command as: +.RS + +.IP \(bu +For hosts, the default is current user code. +.IP \(bu +For chassis, the default is admin. + +.RE + + +.TP 10 +-m \fImarker\fR + +Specifies the marker for end of chassis command output. If omitted, defaults to chassis command prompt. This may be a regular expression. + +.TP 10 +-T \fItimelimit\fR + +Specifies the time limit in seconds when running host commands. Default is -1 (infinite). + +.SH Examples + + +.SH Operations on Host +opacmdall date +.br + +opacmdall \[aq]uname -a\[aq] +.br + +opacmdall -h \[aq]elrond arwen\[aq] date +.br + +HOSTS=\[aq]elrond arwen\[aq] opacmdall date + +.SH Operations on Chassis +opacmdall -C \[aq]ismPortStats -noprompt\[aq] +.br + +opacmdall -C -H \[aq]chassis1 chassis2\[aq] ismPortStats -noprompt\[aq] +.br + +CHASSIS=\[aq]chassis1 chassis2\[aq] opacmdall -C ismPortStats -noprompt\[aq] +.SH Environment Variables + +.PP +The following environment variables are also used by this command: +.TP 10 +\fBHOSTS\fR + +List of hosts, used if -h option not supplied. + +.TP 10 +\fBCHASSIS\fR + +List of chassis, used if -C is used and -H and -F options not supplied. + +.TP 10 +\fBHOSTS\(ulFILE\fR + +File containing list of hosts, used in absence of -f and -h. + +.TP 10 +\fBCHASSIS\(ulFILE\fR + +File containing list of chassis, used in absence of -F and -H. + +.TP 10 +\fBFF\(ulMAX\(ulPARALLEL\fR + +When -p option is used, maximum concurrent operations are performed. + +.TP 10 +\fBFF\(ulSERIALIZE\(ulOUTPUT\fR + +Serialize output of parallel operations (yes or no). + +.TP 10 +\fBFF\(ulCHASSIS\(ulLOGIN\(ulMETHOD\fR + +How to log into chassis. Can be Telnet or SSH. + +.TP 10 +\fBFF\(ulCHASSIS\(ulADMIN\(ulPASSWORD\fR + +Password for admin on all chassis. Used in absence of -S option. + +.SH Notes + +.PP +All commands performed with opacmdall must be non-interactive in nature. opacmdall waits for the command to complete before proceeding. For example, when running host commands such as rm, the -i option (interactively prompt before removal) should not be used. (Note that this option is sometimes part of a standard bash alias list.) Similarly, when running chassis commands such as fwUpdateChassis, the -reboot option should not be used because this option causes an immediate reboot and therefore the command never returns. Also, the chassis command reboot should not be executed using opacmdall. Instead, use the opachassisadmin reboot command to reboot one or more chassis. For further information about individual chassis CLI commands, consult the +\fIIntel(R) Omni-Path Fabric Switches Command Line Interface Reference Guide\fR + +. For further information about Linux* operating system commands, consult the man pages. +.PP +When performing opacmdall against hosts, internally SSH is used. The command opacmdall requires that password-less SSH be set up between the host running the Intel(R) Omni-Path Fabric Suite FastFabric Toolset and the hosts opacmdall is operating against. The opasetupssh FastFabric tool can aid in setting up password-less SSH. +.PP +When performing opacmdall against a set of chassis, all chassis must be configured with the same admin password. Alternatively, the opasetupssh FastFabric tool can be used to set up password-less SSH to the chassis. +.PP +When performing operations against chassis, Intel recommends that you set up SSH keys using opasetupssh. If SSH keys are not set up, Intel recommends that you use the -S option to avoid keeping the password in configuration files. diff --git a/IbaTools/man/opaconfig.manPage b/IbaTools/man/opaconfig.manPage index a996925..56b8a43 100644 --- a/IbaTools/man/opaconfig.manPage +++ b/IbaTools/man/opaconfig.manPage @@ -1,168 +1,184 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opaconfig 1 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opaconfig - -.NL - -.PP - -\fB(Switch and Host)\fR -Configures the Intel(R) Omni-Path Software through command line interface or TUI menus. -.SH Syntax -.NL -opaconfig [-G] [-v|-vv] [-u|-s|-e \fIcomp\fR] [-E \fIcomp\fR] [-D \fIcomp\fR] -.br -[--user\(ulqueries|--no\(uluser\(ulqueries] [--answer \fIkeyword=value\fR] -.PP -or -.br -opaconfig -C -.PP -or -.br -opaconfig -V -.SH Options -.NL - -.TP 10 -No option -.NL -Starts the Intel(R) Omni-Path Software TUI. - -.TP 10 ---help -.NL -Produces full help text. - -.TP 10 --G -.NL -Installs GPU Direct components (must have NVidia drivers installed). - -.TP 10 --v -.NL -Specifies verbose logging. - -.TP 10 --vv -.NL -Specifies very verbose debug logging. - -.TP 10 --u -.NL -Uninstalls all ULPs and drivers with default options. - -.TP 10 --s -.NL -Enables autostart for all installed drivers. - -.TP 10 --e \fIcomp\fR -.NL -Uninstalls the given component with default options. This option can appear more than once on the command line. - -.TP 10 --E \fIcomp\fR -.NL -Enables autostart of a given component. This option can appear with -D or more than once on the command line. - -.TP 10 --D \fIcomp\fR -.NL -Disables autostart of given component. This option can appear with -E or more than once on the command line. - -.TP 10 --C -.NL -Outputs list of supported components. - -.IP - -\fBNOTE:\fR -Supported components may vary according to OS. Refer to -\fIIntel(R) Omni-Path Fabric Software Release Notes\fR - -, OS RPMs Installation Prerequisites for the list of components by supported OS. -.IP -Supported components include: opa\(ulstack oftools intel\(ulhfi opa\(ulstack\(uldev delta\(ulipoib opamgt\(ulsdk mvapich2\(ulgcc\(ulhfi openmpi\(ulgcc\(ulhfi openmpi\(ulgcc\(ulcuda\(ulhfi sandiashmem mpisrc delta\(uldebug -.IP -Supported components when using command on a Management Node with Intel(R) Omni-Path Fabric Suite installed, include: fastfabric opafm -.IP -Supported component name aliases include: opa ipoib mpi psm\(ulmpi verbs\(ulmpi pgas opadev -.IP -Additional component names allowed for -E and -D options: ibacm rdma\(ulndd delta\(ulsrp delta\(ulsrpt -.TP 10 --V -.NL -Outputs version. - -.TP 10 ---user\(ulqueries -.NL -Permits non-root users to query the fabric (Default). - -.TP 10 ---no\(uluser\(ulqueries -.NL -Prohibits non-root users from querying the fabric. - -.TP 10 ---answer \fIkeyword=value\fR -.NL -Provides an answer to a question that may occur during the operation. Answers to questions not asked are ignored. Invalid answers result in prompting for interactive installs, or using default options for non-interactive installs. - -.IP - -\fBPossible Questions\fR -(\fIkeyword=value\fR): -.RS -.TP 10 - -.sp -UserQueries -Allow non-root users to access the UMAD interface? - -.TP 10 -.BR - -.PP - -.B NOTE: -Allowing access to UMAD device files may present a security risk. However, this allows tools such as opasaquery and opaportinfo to be used by non-root users. - -.RE - -.SH Example -.NL -# opaconfig -.br -Intel OPA \fIx.x.x.x.x\fR Software -.br - -.br - 1) Show Installed Software -.br - 2) Reconfigure OFED IP over IB -.br - 3) Reconfigure Driver Autostart -.br - 4) Generate Supporting Information for Problem Report -.br - 5) FastFabric (Host/Chassis/Switch Setup/Admin) -.br - 6) Uninstall Software -.br - -.br - X) Exit +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opaconfig 1 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opaconfig + + +.PP + +\fB(Switch and Host)\fR +Configures the Intel(R) Omni-Path Software through command line interface or TUI menus. +.SH Syntax +opaconfig [-G] [-v|-vv] [-u|-s|-e \fIcomp\fR] [-E \fIcomp\fR] [-D \fIcomp\fR] +.br + +[--user\(ulqueries|--no\(uluser\(ulqueries] [--answer \fIkeyword=value\fR] +.PP +or +.br +opaconfig -C +.PP +or +.br +opaconfig -V +.SH Options + +.TP 10 +No option + +Starts the Intel(R) Omni-Path Software TUI. + +.TP 10 +--help + +Produces full help text. + +.TP 10 +-G + +Installs GPU Direct components (must have NVidia drivers installed). + +.TP 10 +-v + +Specifies verbose logging. + +.TP 10 +-vv + +Specifies very verbose debug logging. + +.TP 10 +-u + +Uninstalls all ULPs and drivers with default options. + +.TP 10 +-s + +Enables autostart for all installed drivers. + +.TP 10 +-e \fIcomp\fR + +Uninstalls the given component with default options. This option can appear more than once on the command line. + +.TP 10 +-E \fIcomp\fR + +Enables autostart of a given component. This option can appear with -D or more than once on the command line. + +.TP 10 +-D \fIcomp\fR + +Disables autostart of given component. This option can appear with -E or more than once on the command line. + +.TP 10 +-C + +Outputs list of supported components. + +.IP + +\fBNOTE:\fR +Supported components may vary according to OS. Refer to +\fIIntel(R) Omni-Path Fabric Software Release Notes\fR + +, OS RPMs Installation Prerequisites for the list of components by supported OS. +.IP +Supported components include: opa\(ulstack oftools intel\(ulhfi opa\(ulstack\(uldev delta\(ulipoib opamgt\(ulsdk mvapich2\(ulgcc\(ulhfi openmpi\(ulgcc\(ulhfi openmpi\(ulgcc\(ulcuda\(ulhfi sandiashmem mpisrc delta\(uldebug +.IP +Supported components when using command on a Management Node with Intel(R) Omni-Path Fabric Suite installed, include: fastfabric opafm +.IP +Supported component name aliases include: opa ipoib mpi psm\(ulmpi verbs\(ulmpi pgas opadev +.IP +Additional component names allowed for -E and -D options: ibacm rdma\(ulndd delta\(ulsrp delta\(ulsrpt +.TP 10 +-V + +Outputs version. + +.TP 10 +--user\(ulqueries + +Permits non-root users to query the fabric (Default). + +.TP 10 +--no\(uluser\(ulqueries + +Prohibits non-root users from querying the fabric. + +.TP 10 +--answer \fIkeyword=value\fR + +Provides an answer to a question that may occur during the operation. Answers to questions not asked are ignored. Invalid answers result in prompting for interactive installs, or using default options for non-interactive installs. + +.IP + +\fBPossible Questions\fR +(\fIkeyword=value\fR): +.RS +.TP 10 + +.sp +UserQueries +Allow non-root users to access the UMAD interface? + +.TP 10 +.BR + +.PP + +.B NOTE: +Allowing access to UMAD device files may present a security risk. However, this allows tools such as opasaquery and opaportinfo to be used by non-root users. + +.RE + +.RS +.TP 10 + +.sp +ARPTABLE\(ulTUNING +Adjust kernel ARP table size for large fabrics? + +.RE + +.SH Example +# opaconfig +.br + +Intel OPA \fIx.x.x.x.x\fR Software +.br + + +.br + + 1) Show Installed Software +.br + + 2) Reconfigure OFED IP over IB +.br + + 3) Reconfigure Driver Autostart +.br + + 4) Generate Supporting Information for Problem Report +.br + + 5) FastFabric (Host/Chassis/Switch Setup/Admin) +.br + + 6) Uninstall Software +.br + + +.br + + X) Exit diff --git a/IbaTools/man/opadisablehosts.manPage b/IbaTools/man/opadisablehosts.manPage index 3a3b2ac..85c1a2a 100644 --- a/IbaTools/man/opadisablehosts.manPage +++ b/IbaTools/man/opadisablehosts.manPage @@ -1,93 +1,88 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opadisablehosts 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opadisablehosts - -.NL - -.PP - -\fB(Linux)\fR -Searches for a set of hosts in the fabric and disables their corresponding switch port. -.SH Syntax -.NL -opadisablehosts [-h \fIhfi\fR] [-p \fIport\fR] \fIreason\fR \fIhost ...\fR -.SH Options -.NL - -.TP 10 ---help -.NL -Produces full help text. - -.TP 10 --h \fIhfi\fR -.NL -Specifies the HFI, numbered 1..n. Using 0 specifies that the -p \fIport\fR port is a system-wide port number. Default is 0. - -.TP 10 --p \fIport\fR -.NL -Specifies the port, numbered 1..n. Using 0 specifies the first active port. Default is 0. - -.TP 10 -\fIreason\fR -.NL -Specifies the text describing the reason hosts are being disabled. \fIreason\fR is saved in the reason field of the output file. - -.IP -Information about the links disabled is written to a CSV file. By default, this file is named /etc/opa/disabled:hfi:port.csv where the hfi:port part of the file name is replaced by the HFI number and the port number being operated on (such as 1:1 or 2:1). This CSV file can be used as input to opaenableports. -.IP -The list is of the form: NodeGUID;PortNum;NodeType;NodeDesc;NodeGUID; PortNum;NodeType;NodeDesc;Reason For each listed link, the switch port closer to this is the one that has been disabled. -.TP 10 -\fIhost ...\fR -.NL -Defines one or more hosts that are affected by the \fIreason\fR. - -.NL - -.SH -h and -p options permit a variety of selections: -.NL - -.TP 10 --h 0 -.NL -First active port in system (Default). - -.TP 10 --h 0 -p 0 -.NL -First active port in system. - -.TP 10 --h \fIx\fR -.NL -First active port on HFI \fIx\fR. - -.TP 10 --h \fIx\fR \fI\fR-p 0 -.NL -First active port on HFI \fIx\fR. - -.TP 10 --h 0 -p \fIy\fR -.NL -Port \fIy\fR within system (no matter which ports are active). - -.TP 10 --h \fIx\fR \fI\fR-p \fIy\fR -.NL -HFI \fIx\fR, port \fIy\fR. - -.SH Examples -.NL -opadisablehosts \[aq]bad DRAM\[aq] compute001 compute045 -.br -opadisablehosts -h 1 -p 2 \[aq]crashed\[aq] compute001 compute045 +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opadisablehosts 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opadisablehosts + + +.PP + +\fB(Linux)\fR +Searches for a set of hosts in the fabric and disables their corresponding switch port. +.SH Syntax +opadisablehosts [-h \fIhfi\fR] [-p \fIport\fR] \fIreason\fR \fIhost ...\fR +.SH Options + +.TP 10 +--help + +Produces full help text. + +.TP 10 +-h \fIhfi\fR + +Specifies the HFI, numbered 1..n. Using 0 specifies that the -p \fIport\fR port is a system-wide port number. Default is 0. + +.TP 10 +-p \fIport\fR + +Specifies the port, numbered 1..n. Using 0 specifies the first active port. Default is 0. + +.TP 10 +\fIreason\fR + +Specifies the text describing the reason hosts are being disabled. \fIreason\fR is saved in the reason field of the output file. + +.IP +Information about the links disabled is written to a CSV file. By default, this file is named /etc/opa/disabled:hfi:port.csv where the hfi:port part of the file name is replaced by the HFI number and the port number being operated on (such as 1:1 or 2:1). This CSV file can be used as input to opaenableports. +.IP +The list is of the form: NodeGUID;PortNum;NodeType;NodeDesc;NodeGUID; PortNum;NodeType;NodeDesc;Reason For each listed link, the switch port closer to this is the one that has been disabled. +.TP 10 +\fIhost ...\fR + +Defines one or more hosts that are affected by the \fIreason\fR. + + +.SH -h and -p options permit a variety of selections: + +.TP 10 +-h 0 + +First active port in system (Default). + +.TP 10 +-h 0 -p 0 + +First active port in system. + +.TP 10 +-h \fIx\fR + +First active port on HFI \fIx\fR. + +.TP 10 +-h \fIx\fR \fI\fR-p 0 + +First active port on HFI \fIx\fR. + +.TP 10 +-h 0 -p \fIy\fR + +Port \fIy\fR within system (no matter which ports are active). + +.TP 10 +-h \fIx\fR \fI\fR-p \fIy\fR + +HFI \fIx\fR, port \fIy\fR. + +.SH Examples +opadisablehosts \[aq]bad DRAM\[aq] compute001 compute045 +.br + +opadisablehosts -h 1 -p 2 \[aq]crashed\[aq] compute001 compute045 diff --git a/IbaTools/man/opadisableports.manPage b/IbaTools/man/opadisableports.manPage index b34fbe0..ace2192 100644 --- a/IbaTools/man/opadisableports.manPage +++ b/IbaTools/man/opadisableports.manPage @@ -1,102 +1,99 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opadisableports 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opadisableports - -.NL - -.PP - -\fB(Linux)\fR -Accepts a CSV file listing links to disable. For each HFI-SW link, the switch side of the link is disabled. For each SW-SW link, the switch port closer to this node is disabled. This approach generally permits a future opaenableports operation to re-enable the port once the issue is corrected or ready to be retested. The list of disabled ports is tracked in /etc/opa/disabled*.csv. -.SH Syntax -.NL -opadisableports [-R] [-h \fIhfi\fR] [-p \fIport\fR] [ \fIreason\fR] < disable.csv -.SH Options -.NL - -.TP 10 ---help -.NL -Produces full help text. - -.TP 10 --R -.NL -Does not attempt to get routes for computation of distance. Instead, it disables the port of the switch with the lower LID (which is often the side closest to the SM) assuming that it is closer to this node. - -.TP 10 --h \fIhfi\fR -.NL -Specifies the HFI, numbered 1..n. Using 0 specifies that the -p \fIport\fR port is a system-wide port number. Default is 0. - -.TP 10 --p \fIport\fR -.NL -Specifies the port, numbered 1..n. Using 0 specifies the first active port. Default is 0. - -.TP 10 -\fIreason\fR -.NL -Specifies optional text describing why ports are being disabled. If used, text is saved in the reason field of the output file. - -.TP 10 -disable.csv -.NL -Specifies the input file listing the links to disable. The list is of the form: NodeGUID;PortNum;NodeType;NodeDesc;NodeGUID;PortNum; NodeType;NodeDesc;Reason - -.IP -The \fIreason\fR field is optional. An input file such as this can be generated by using opaextractbadlinks, opaextractmissinglinks, or opaextractsellinks. -.PP -Information about the links disabled and the reason is saved (in the same format) to an output file named /etc/opa/disabled:hfi:port.csv where the hfi:port part of the file name is replaced by the HFI number and the port number being operated on (such as 1:1 or 2:1). This CSV file can be used as input to opaenableports. -.NL - -.SH -h and -p options permit a variety of selections: -.NL - -.TP 10 --h 0 -.NL -First active port in system (Default). - -.TP 10 --h 0 -p 0 -.NL -First active port in system. - -.TP 10 --h \fIx\fR -.NL -First active port on HFI \fIx\fR. - -.TP 10 --h \fIx\fR \fI\fR-p 0 -.NL -First active port on HFI \fIx\fR. - -.TP 10 --h 0 -p \fIy\fR -.NL -Port \fIy\fR within system (no matter which ports are active). - -.TP 10 --h \fIx\fR \fI\fR-p \fIy\fR -.NL -HFI \fIx\fR, port \fIy\fR. - -.SH Examples -.NL -opadisableports \[aq]bad cable\[aq] < disable.csv -.br -opadisableports -h 1 -p 1 \[aq]dead servers\[aq] < disable.csv -.br -opaextractsellinks -F lid:3 | opadisableports \[aq]bad server\[aq] -.br -opaextractmissinglinks -T /etc/opa/topology.0:0.xml | opadisableports +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opadisableports 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opadisableports + + +.PP + +\fB(Linux)\fR +Accepts a CSV file listing links to disable. For each HFI-SW link, the switch side of the link is disabled. For each SW-SW link, the switch port closer to this node is disabled. This approach generally permits a future opaenableports operation to re-enable the port once the issue is corrected or ready to be retested. The list of disabled ports is tracked in /etc/opa/disabled*.csv. +.SH Syntax +opadisableports [-R] [-h \fIhfi\fR] [-p \fIport\fR] [ \fIreason\fR] < disable.csv +.SH Options + +.TP 10 +--help + +Produces full help text. + +.TP 10 +-R + +Does not attempt to get routes for computation of distance. Instead, it disables the port of the switch with the lower LID (which is often the side closest to the SM) assuming that it is closer to this node. + +.TP 10 +-h \fIhfi\fR + +Specifies the HFI, numbered 1..n. Using 0 specifies that the -p \fIport\fR port is a system-wide port number. Default is 0. + +.TP 10 +-p \fIport\fR + +Specifies the port, numbered 1..n. Using 0 specifies the first active port. Default is 0. + +.TP 10 +\fIreason\fR + +Specifies optional text describing why ports are being disabled. If used, text is saved in the reason field of the output file. + +.TP 10 +disable.csv + +Specifies the input file listing the links to disable. The list is of the form: NodeGUID;PortNum;NodeType;NodeDesc;NodeGUID;PortNum; NodeType;NodeDesc;Reason + +.IP +The \fIreason\fR field is optional. An input file such as this can be generated by using opaextractbadlinks, opaextractmissinglinks, or opaextractsellinks. +.PP +Information about the links disabled and the reason is saved (in the same format) to an output file named /etc/opa/disabled:hfi:port.csv where the hfi:port part of the file name is replaced by the HFI number and the port number being operated on (such as 1:1 or 2:1). This CSV file can be used as input to opaenableports. + +.SH -h and -p options permit a variety of selections: + +.TP 10 +-h 0 + +First active port in system (Default). + +.TP 10 +-h 0 -p 0 + +First active port in system. + +.TP 10 +-h \fIx\fR + +First active port on HFI \fIx\fR. + +.TP 10 +-h \fIx\fR \fI\fR-p 0 + +First active port on HFI \fIx\fR. + +.TP 10 +-h 0 -p \fIy\fR + +Port \fIy\fR within system (no matter which ports are active). + +.TP 10 +-h \fIx\fR \fI\fR-p \fIy\fR + +HFI \fIx\fR, port \fIy\fR. + +.SH Examples +opadisableports \[aq]bad cable\[aq] < disable.csv +.br + +opadisableports -h 1 -p 1 \[aq]dead servers\[aq] < disable.csv +.br + +opaextractsellinks -F lid:3 | opadisableports \[aq]bad server\[aq] +.br + +opaextractmissinglinks -T /etc/opa/topology.0:0.xml | opadisableports diff --git a/IbaTools/man/opadownloadall.manPage b/IbaTools/man/opadownloadall.manPage index 233b633..55047dc 100644 --- a/IbaTools/man/opadownloadall.manPage +++ b/IbaTools/man/opadownloadall.manPage @@ -1,125 +1,125 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opadownloadall 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opadownloadall - -.NL - -.PP - -\fB(Linux)\fR -Copies one or more files to a group of hosts from a system. Since the file contents to copy may be different for each host, a separate directory on this system is used for the source files for each host. This can also be used in conjunction with opauploadall to upload a host-specific configuration file, edit it for each host, and download the new version to all the hosts. -.PP - -.B NOTE: -The tool opadownloadall can only copy from this system to a group of hosts in the cluster. To copy files from hosts in the cluster to this host, use opauploadall. - - -.SH Syntax -.NL -opadownloadall [-rp] [-f \fIhostfile\fR] [-d \fIdownload\(uldir\fR] [-h \[aq]\fIHOSTS\fR\[aq]] -.br -[-u \fIuser\fR] source\(ulfile ... \fIdest\(ulfile\fR -.SH Options -.NL - -.TP 10 ---help -.NL -Produces full help text. - -.TP 10 --r -.NL -Performs recursive download of directories. - -.TP 10 --p -.NL -Performs copy in parallel on all hosts. - -.TP 10 --f \fIhostfile\fR -.NL -Specifies the file with hosts in cluster. Default is /etc/opa/hosts. - -.TP 10 --d \fIdownload\(uldir\fR -.NL -Specifies the directory to download files from. Default is downloads. If not specified, the environment variable \fBDOWNLOADS\(ulDIR\fR is used. If that is not exported, the default is used. - -.TP 10 --h \fIHOSTS\fR -.NL -Specifies the list of hosts to download files to. - -.TP 10 --u \fIuser\fR -.NL -Specifies the user to perform the copy. Default is the current user code. - -.TP 10 -.BR - -.PP - -.B NOTE: -The user@ style syntax cannot be used in the arguments to opadownloadall. - - -.TP 10 -\fIsource\(ulfile\fR -.NL -Specifies the list of source files to copy from the system. - -.IP -The option \fIsource\(ulfile\fR is relative to \fIdownload\(uldir\fR/\fIhostname\fR. A local directory within \fIdownload\(uldir\fR/ must exist for each host being downloaded to. Each downloaded file is copied from \fIdownload\(uldir\fR/\fIhostname\fR/\fIsource\(ulfile\fR. -.TP 10 -\fIdest\(ulfile\fR -.NL -Specifies the name of the file or directory on the destination hosts to copy to. - -.IP -If more than one source file is specified, \fIdest\(ulfile\fR is treated as a directory name. The given directory must already exist on the destination host. The copy fails for hosts where the directory does not exist. -.SH Example -.NL -opadownloadall -h \[aq]arwen elrond\[aq] irqbalance vncservers /etc -.br -# Copies two files to 2 hosts -.br - -.br -opadownloadall -p irqbalance vncservers /etc -.br -# Copies two files to all hosts -.SH Environment Variables -.NL - -.PP -The following environment variables are also used by this command: -.TP 10 -\fBHOSTS\fR -.NL -List of hosts; used if -h option not supplied. - -.TP 10 -\fBHOSTS\(ulFILE\fR -.NL -File containing list of hosts; used in absence of -f and -h. - -.TP 10 -\fBFF\(ulMAX\(ulPARALLEL\fR -.NL -When the -p option is used, the maximum concurrent operations are performed. - -.TP 10 -\fBDOWNLOADS\(ulDIR\fR -.NL -Directory to download from, used in absence of -d. +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opadownloadall 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opadownloadall + + +.PP + +\fB(Linux)\fR +Copies one or more files to a group of hosts from a system. Since the file contents to copy may be different for each host, a separate directory on this system is used for the source files for each host. This can also be used in conjunction with opauploadall to upload a host-specific configuration file, edit it for each host, and download the new version to all the hosts. +.PP + +.B NOTE: +The tool opadownloadall can only copy from this system to a group of hosts in the cluster. To copy files from hosts in the cluster to this host, use opauploadall. + + +.SH Syntax +opadownloadall [-rp] [-f \fIhostfile\fR] [-d \fIdownload\(uldir\fR] [-h \[aq]\fIHOSTS\fR\[aq]] +.br +[-u \fIuser\fR] +source\(ulfile ... \fIdest\(ulfile\fR +.SH Options + +.TP 10 +--help + +Produces full help text. + +.TP 10 +-r + +Performs recursive download of directories. + +.TP 10 +-p + +Performs copy in parallel on all hosts. + +.TP 10 +-f \fIhostfile\fR + +Specifies the file with hosts in cluster. Default is /etc/opa/hosts. + +.TP 10 +-d \fIdownload\(uldir\fR + +Specifies the directory to download files from. Default is downloads. If not specified, the environment variable \fBDOWNLOADS\(ulDIR\fR is used. If that is not exported, the default is used. + +.TP 10 +-h \fIHOSTS\fR + +Specifies the list of hosts to download files to. + +.TP 10 +-u \fIuser\fR + +Specifies the user to perform the copy. Default is the current user code. + +.TP 10 +.BR + +.PP + +.B NOTE: +The user@ style syntax cannot be used in the arguments to opadownloadall. + + +.TP 10 +\fIsource\(ulfile\fR + +Specifies the list of source files to copy from the system. + +.IP +The option \fIsource\(ulfile\fR is relative to \fIdownload\(uldir\fR/\fIhostname\fR. A local directory within \fIdownload\(uldir\fR/ must exist for each host being downloaded to. Each downloaded file is copied from \fIdownload\(uldir\fR/\fIhostname\fR/\fIsource\(ulfile\fR. +.TP 10 +\fIdest\(ulfile\fR + +Specifies the name of the file or directory on the destination hosts to copy to. + +.IP +If more than one source file is specified, \fIdest\(ulfile\fR is treated as a directory name. The given directory must already exist on the destination host. The copy fails for hosts where the directory does not exist. +.SH Example +opadownloadall -h \[aq]arwen elrond\[aq] irqbalance vncservers /etc +.br + +# Copies two files to 2 hosts +.br + + +.br + +opadownloadall -p irqbalance vncservers /etc +.br + +# Copies two files to all hosts +.SH Environment Variables + +.PP +The following environment variables are also used by this command: +.TP 10 +\fBHOSTS\fR + +List of hosts; used if -h option not supplied. + +.TP 10 +\fBHOSTS\(ulFILE\fR + +File containing list of hosts; used in absence of -f and -h. + +.TP 10 +\fBFF\(ulMAX\(ulPARALLEL\fR + +When the -p option is used, the maximum concurrent operations are performed. + +.TP 10 +\fBDOWNLOADS\(ulDIR\fR + +Directory to download from, used in absence of -d. diff --git a/IbaTools/man/opaenableports.manPage b/IbaTools/man/opaenableports.manPage index 711abdf..7082b24 100644 --- a/IbaTools/man/opaenableports.manPage +++ b/IbaTools/man/opaenableports.manPage @@ -1,93 +1,88 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opaenableports 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opaenableports - -.NL - -.PP - -\fB(Linux)\fR -Accepts a disabled ports input file and re-enables the specified ports. The input file can be /etc/opa/disabled*.csv or a user-created subset of such a file. After enabling the port, it is removed from /etc/opa/disabled*.csv. -.SH Syntax -.NL -opaenableports [-h \fIhfi\fR] [-p \fIport\fR] < disabled.csv -.SH Options -.NL - -.TP 10 ---help -.NL -Produces full help text. - -.TP 10 --h \fIhfi\fR -.NL -Specifies the HFI, numbered 1..n. Using 0 specifies that the -p \fIport\fR port is a system-wide port number. Default is 0. - -.TP 10 --p \fIport\fR -.NL -Specifies the port, numbered 1..n. Using 0 specifies the first active port. Default is 0. - -.TP 10 -disabled.csv -.NL -Specifies the input file listing the ports to enable. The list is of the form: NodeGUID;PortNum;NodeType;NodeDesc;Ignored. - -.IP -An input file like this is generated in /etc/opa/disabled* by opadisableports. -.NL - -.SH -h and -p options permit a variety of selections: -.NL - -.TP 10 --h 0 -.NL -First active port in system (Default). - -.TP 10 --h 0 -p 0 -.NL -First active port in system. - -.TP 10 --h \fIx\fR -.NL -First active port on HFI \fIx\fR. - -.TP 10 --h \fIx\fR \fI\fR-p 0 -.NL -First active port on HFI \fIx\fR. - -.TP 10 --h 0 -p \fIy\fR -.NL -Port \fIy\fR within system (no matter which ports are active). - -.TP 10 --h \fIx\fR \fI\fR-p \fIy\fR -.NL -HFI \fIx\fR, port \fIy\fR. - -.SH Examples -.NL -opaenableports < disabled.csv -.br -opaenableports < /etc/opa/disabled:1:1.csv -.br -opaenableports -h 1 -p 1 < disabled.csv -.SH Other Information -.NL - -.PP -For messages containing skipping ports, either the device is offline or the other end of the link has been disabled and the device is no longer accessible in-band. The end of the link previously disabled by opedisableports or opadisablehosts can be found in /etc/opa/disabled:1:1.csv. +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opaenableports 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opaenableports + + +.PP + +\fB(Linux)\fR +Accepts a disabled ports input file and re-enables the specified ports. The input file can be /etc/opa/disabled*.csv or a user-created subset of such a file. After enabling the port, it is removed from /etc/opa/disabled*.csv. +.SH Syntax +opaenableports [-h \fIhfi\fR] [-p \fIport\fR] < disabled.csv +.SH Options + +.TP 10 +--help + +Produces full help text. + +.TP 10 +-h \fIhfi\fR + +Specifies the HFI, numbered 1..n. Using 0 specifies that the -p \fIport\fR port is a system-wide port number. Default is 0. + +.TP 10 +-p \fIport\fR + +Specifies the port, numbered 1..n. Using 0 specifies the first active port. Default is 0. + +.TP 10 +disabled.csv + +Specifies the input file listing the ports to enable. The list is of the form: NodeGUID;PortNum;NodeType;NodeDesc;Ignored. + +.IP +An input file like this is generated in /etc/opa/disabled* by opadisableports. + +.SH -h and -p options permit a variety of selections: + +.TP 10 +-h 0 + +First active port in system (Default). + +.TP 10 +-h 0 -p 0 + +First active port in system. + +.TP 10 +-h \fIx\fR + +First active port on HFI \fIx\fR. + +.TP 10 +-h \fIx\fR \fI\fR-p 0 + +First active port on HFI \fIx\fR. + +.TP 10 +-h 0 -p \fIy\fR + +Port \fIy\fR within system (no matter which ports are active). + +.TP 10 +-h \fIx\fR \fI\fR-p \fIy\fR + +HFI \fIx\fR, port \fIy\fR. + +.SH Examples +opaenableports < disabled.csv +.br + +opaenableports < /etc/opa/disabled:1:1.csv +.br + +opaenableports -h 1 -p 1 < disabled.csv +.SH Other Information + +.PP +For messages containing skipping ports, either the device is offline or the other end of the link has been disabled and the device is no longer accessible in-band. The end of the link previously disabled by opedisableports or opadisablehosts can be found in /etc/opa/disabled:1:1.csv. diff --git a/IbaTools/man/opaesmanalysis.manPage b/IbaTools/man/opaesmanalysis.manPage index 270a005..c9df5ee 100644 --- a/IbaTools/man/opaesmanalysis.manPage +++ b/IbaTools/man/opaesmanalysis.manPage @@ -1,84 +1,79 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opaesmanalysis 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opaesmanalysis - -.NL - -.PP - -\fB(Switch)\fR -Performs analysis of the embedded Subnet Manager (SM) for configuration and health. The opaesmanalysis tool checks the opafm.xml file for the chassis. -.PP -All files generated by opaesmanalysis start with esm in the file name. -.PP -Intel recommends that you set up SSH keys for chassis (see -.br - -\fIopasetupssh\fR -). If SSH keys are not set up, all chassis must be configured with the same admin password and the password must be kept in the opafastfabric.conf configuration file. -.SH Syntax -.NL -opaesmanalysis [-b|-e] [-s] [-d \fIdir\fR] [-G \fIesmchassisfile\fR] -.br -[-E \[aq]\fIesmchassis\fR\[aq]] -.SH Options -.NL - -.TP 10 ---help -.NL -Produces full help text. -.TP 10 --b -.NL -Specifies the baseline mode. Default is the compare/check mode. -.TP 10 --e -.NL -Evaluates health only. Default is the compare/check mode. -.TP 10 --s -.NL -Saves history of failures (errors/differences). -.TP 10 --d \fIdir\fR -.NL -Specifies the top-level directory for saving baseline and history of failed checks. Default is /var/usr/lib/opa/analysis -.TP 10 --G \fIesmchassisfile\fR -.NL -Specifies the file with SM chassis in the cluster. Default is /etc/opa/esm\(ulchassis -.TP 10 --E \[aq]\fIesmchassis\fR\[aq] -.NL -Specifies the list of SM chassis on which to execute the command. -.SH Example -.NL -opaesmanalysis -.SH Environment Variables -.NL - -.PP -The following environment variables are also used by this command: -.TP 10 -\fBESM\(ulCHASSIS\fR -.NL -List of SM chassis, used if -G and -E options are not supplied. - -.TP 10 -\fBESM\(ulCHASSIS\(ulFILE\fR -.NL -File containing list of SM chassis, used if -G and -E options are not supplied. - -.TP 10 -\fBFF\(ulANALYSIS\(ulDIR\fR -.NL -Top-level directory for baselines and failed health checks. +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opaesmanalysis 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opaesmanalysis + + +.PP + +\fB(Switch)\fR +Performs analysis of the embedded Subnet Manager (SM) for configuration and health. The opaesmanalysis tool checks the opafm.xml file for the chassis. +.PP +All files generated by opaesmanalysis start with esm in the file name. +.PP +Intel recommends that you set up SSH keys for chassis (see +.br + +\fIopasetupssh\fR +). If SSH keys are not set up, all chassis must be configured with the same admin password and the password must be kept in the opafastfabric.conf configuration file. +.SH Syntax +opaesmanalysis [-b|-e] [-s] [-d \fIdir\fR] [-G \fIesmchassisfile\fR] +.br +[-E \[aq]\fIesmchassis\fR\[aq]] +.SH Options + +.TP 10 +--help + +Produces full help text. +.TP 10 +-b + +Specifies the baseline mode. Default is the compare/check mode. +.TP 10 +-e + +Evaluates health only. Default is the compare/check mode. +.TP 10 +-s + +Saves history of failures (errors/differences). +.TP 10 +-d \fIdir\fR + +Specifies the top-level directory for saving baseline and history of failed checks. Default is /var/usr/lib/opa/analysis +.TP 10 +-G \fIesmchassisfile\fR + +Specifies the file with SM chassis in the cluster. Default is /etc/opa/esm\(ulchassis +.TP 10 +-E \[aq]\fIesmchassis\fR\[aq] + +Specifies the list of SM chassis on which to execute the command. +.SH Example +opaesmanalysis +.SH Environment Variables + +.PP +The following environment variables are also used by this command: +.TP 10 +\fBESM\(ulCHASSIS\fR + +List of SM chassis, used if -G and -E options are not supplied. + +.TP 10 +\fBESM\(ulCHASSIS\(ulFILE\fR + +File containing list of SM chassis, used if -G and -E options are not supplied. + +.TP 10 +\fBFF\(ulANALYSIS\(ulDIR\fR + +Top-level directory for baselines and failed health checks. diff --git a/IbaTools/man/opaexpandfile.manPage b/IbaTools/man/opaexpandfile.manPage index 22af73c..fe1bd87 100644 --- a/IbaTools/man/opaexpandfile.manPage +++ b/IbaTools/man/opaexpandfile.manPage @@ -1,37 +1,33 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opaexpandfile 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opaexpandfile - -.NL - -.PP - -\fB(Linux)\fR -Expands a Intel(R) Omni-Path Fabric Suite FastFabric hosts, chassis, or switches file. This tool expands and filter outs blank and commented lines. This can be useful when building other scripts that may use these files as input. -.SH Syntax -.NL -opaexpandfile \fIfile\fR -.SH Options -.NL - -.TP 10 ---help -.NL -Produces full help text. - -.TP 10 -\fIfile\fR -.NL -Specifies the FastFabric file to be processed. - -.SH Example -.NL -opaexpandfile allhosts +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opaexpandfile 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opaexpandfile + + +.PP + +\fB(Linux)\fR +Expands a Intel(R) Omni-Path Fabric Suite FastFabric hosts, chassis, or switches file. This tool expands and filter outs blank and commented lines. This can be useful when building other scripts that may use these files as input. +.SH Syntax +opaexpandfile \fIfile\fR +.SH Options + +.TP 10 +--help + +Produces full help text. + +.TP 10 +\fIfile\fR + +Specifies the FastFabric file to be processed. + +.SH Example +opaexpandfile allhosts diff --git a/IbaTools/man/opaextractbadlinks.manPage b/IbaTools/man/opaextractbadlinks.manPage index 7b1add4..6a41f23 100644 --- a/IbaTools/man/opaextractbadlinks.manPage +++ b/IbaTools/man/opaextractbadlinks.manPage @@ -1,473 +1,485 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opaextractbadlinks 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opaextractbadlinks - -.NL - -.PP -Produces a CSV file listing all or some of the links that exceed opareport -o error thresholds. opaextractbadlinks is a front end to the opareport tool. The output from this tool can be imported into a spreadsheet or parsed by other scripts. -.SH Syntax -.NL -opaextractbadlinks [opareport \fIoptions\fR] -.SH Options -.NL - -.TP 10 ---help -.NL -Produces full help text. - -.TP 10 -opareport \fIoptions\fR -.NL -The following options are passed to opareport. This subset is considered typical and useful for this command. By design, the tool ignores -o/--output report option. - -.RS -.TP 10 - -.sp --h/--hfi \fIhfi\fR -Specifies the HFI, numbered 1..n. Using 0 specifies that the -p \fIport\fR port is a system-wide port number. Default is 0. - -.RE - -.RS -.TP 10 - -.sp --p/--port \fIport\fR -Specifies the port, numbered 1..n. Using 0 specifies the first active port. Default is 0. - -.RE - -.RS -.TP 10 - -.sp --X/--infile \fIsnapshot\(ulinput\fR -Generates a report using the data in the snapshot\(ulinput file. snapshot\(ulinput must have been generated during a previous -o \fIsnapshot\fR run. When used, the -s, -i, -C, and -a options are ignored. \[aq]-\[aq] may be used as the snapshot\(ulinput to specify stdin. - -.RE - -.RS -.TP 10 - -.sp --T/--topology \fItopology\(ulinput\fR -Uses topology\(ulinput file to augment and verify fabric information. When used, various reports can be augmented with information not available electronically (such as cable labels). \[aq]-\[aq] may be used to specify stdin. - -.RE - -.RS -.TP 10 - -.sp --i/--interval \fIseconds\fR -Obtains performance statistics over interval \fIseconds\fR. Clears all statistics, waits interval \fIseconds\fR, then generates report. Implies -s option. - -.RE - -.RS -.TP 10 - -.sp --b / --begin \fIdate\(ultime\fR -Obtains past performance stats over an interval beginning at \fIdate\(ultime\fR. Implies -s option. \fIdate\(ultime\fR may be a time entered as HH:MM[:SS] or date as mm/dd/YYYY, dd.mm.YYYY, YYYY-mm-dd or date followed by time; for example, "2016-07-04 14:40". Relative times are taken as "x [second|minute|hour|day](s) ago. - -.RE - -.RS -.TP 10 - -.sp --e / --end \fIdate\(ultime\fR -Obtains past performance stats over an interval ending at \fIdate\(ultime\fR. Implies -s option. - -.IP -\fIdate\(ultime\fR may be a time entered as HH:MM[:SS] or date as mm/dd/YYYY, dd.mm.YYYY, YYYY-mm-dd or date followed by time; for example, "2016-07-04 14:40". Relative times are taken as "x [second|minute|hour|day](s) ago. -.RE - -.RS -.TP 10 - -.sp --C/--clear -Clears performance statistics for all ports. Only statistics with error thresholds are cleared. A clear occurs after generating the report. - -.RE - -.RS -.TP 10 - -.sp --a/--clearall -Clears all performance statistics for all ports. - -.RE - -.RS -.TP 10 - -.sp --M/--pmadirect -Accesses performance statistics using direct PMA. - -.RE - -.RS -.TP 10 - -.sp --A/--allports -Gets PortInfo for down switch ports. Uses direct SMA to get this data. If used with -M, also gets PMA stats for down switch ports. - -.RE - -.RS -.TP 10 - -.sp --c/--config \fIfile\fR -Specifies the error thresholds configuration file. Default is /etc/opa/opamon.conf file. - -.RE - -.RS -.TP 10 - -.sp --L/--limit -Limits operation to exact specified focus with -F for port error counters check (-o \fIerrors\fR) and port counters clear (-C or -i). Normally, the neighbor of each selected port is also checked/cleared. Does not affect other reports. - -.RE - -.RS -.TP 10 - -.sp --F/--focus \fIpoint\fR -Specifies the focus area for report. Used for all reports except route to limit scope of report. Refer to -\fIPoint Syntax\fR -for details. - -.RE - -.NL - -.SH -h and -p options permit a variety of selections: -.NL - -.TP 10 --h 0 -.NL -First active port in system (Default). - -.TP 10 --h 0 -p 0 -.NL -First active port in system. - -.TP 10 --h \fIx\fR -.NL -First active port on HFI \fIx\fR. - -.TP 10 --h \fIx\fR \fI\fR-p 0 -.NL -First active port on HFI \fIx\fR. - -.TP 10 --h 0 -p \fIy\fR -.NL -Port \fIy\fR within system (no matter which ports are active). - -.TP 10 --h \fIx\fR \fI\fR-p \fIy\fR -.NL -HFI \fIx\fR, port \fIy\fR. - -.NL - -.SH Point Syntax -.NL - -.TP 10 -gid:\fIvalue\fR -.NL -\fIvalue\fR is numeric port GID of form: subnet:guid. - -.TP 10 -lid:\fIvalue\fR -.NL -\fIvalue\fR is numeric LID. - -.TP 10 -lid:value:node -.NL -\fIvalue\fR is numeric LID, selects entire node with given LID. - -.TP 10 -lid:\fIvalue\fR:port:\fIvalue2\fR -.NL -\fIvalue\fR is numeric LID of node, \fIvalue2\fR is port number. - -.TP 10 -portguid:\fIvalue\fR -.NL -\fIvalue\fR is numeric port GUID. - -.TP 10 -nodeguid:\fIvalue\fR -.NL -\fIvalue\fR is numeric node GUID. - -.TP 10 -nodeguid:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is numeric node GUID, \fIvalue2\fR is port number. - -.TP 10 -iocguid:\fIvalue\fR -.NL -\fIvalue\fR is numeric IOC GUID. - -.TP 10 -iocguid:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is numeric IOC GUID, \fIvalue2\fR is port number. - -.TP 10 -systemguid:\fIvalue\fR -.NL -\fIvalue\fR is numeric system image GUID. - -.TP 10 -systemguid:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is the numeric system image GUID, \fIvalue2\fR is port number. - -.TP 10 -ioc:\fIvalue\fR -.NL -\fIvalue\fR is IOC Profile ID String (IOC Name). - -.TP 10 -ioc:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is IOC Profile ID String (IOC Name), \fIvalue2\fR is port number. - -.TP 10 -iocpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for IOC Profile ID String (IOC Name). - -.TP 10 -iocpat:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is glob pattern for IOC Profile ID String (IOC Name), \fIvalue2\fR is port number. - -.TP 10 -ioctype:\fIvalue\fR -.NL -\fIvalue\fR is IOC type (SRP or OTHER). - -.TP 10 -ioctype:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is IOC type (SRP or OTHER); \fIvalue2\fR is port number. - -.TP 10 -node:\fIvalue\fR -.NL -\fIvalue\fR is node description (node name). - -.TP 10 -node:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is node description (node name), \fIvalue2\fR is port number. - -.TP 10 -nodepat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for node description (node name). - -.TP 10 -nodepat:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is the glob pattern for the node description (node name), \fIvalue2\fR is port number. - -.TP 10 -nodedetpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for node details. - -.TP 10 -nodedetpat:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is the glob pattern for the node details, \fIvalue2\fR is port number. - -.TP 10 -nodetype:\fIvalue\fR -.NL -\fIvalue\fR is node type (SW or FI). - -.TP 10 -nodetype:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is node type (SW or FI), \fIvalue2\fR is port number. - -.TP 10 -rate:\fIvalue\fR -.NL -\fIvalue\fR is string for rate (25g, 50g, 75g, 100g), omits switch mgmt port 0. - -.TP 10 -portstate:\fIvalue\fR -.NL -\fIvalue\fR is a string for state (down, init, armed, active, notactive, initarmed). - -.TP 10 -portphysstate:\fIvalue\fR -.NL -\fIvalue\fR is a string for PHYs state (polling, disabled, training, linkup, recovery, offline, test) - -.TP 10 -mtucap:\fIvalue\fR -.NL -\fIvalue\fR is MTU size (2048, 4096, 8192, 10240), omits switch mgmt port 0. - -.TP 10 -labelpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable label. - -.TP 10 -lengthpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable length. - -.TP 10 -cabledetpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable details. - -.TP 10 -cabinflenpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable info length. - -.TP 10 -cabinfvendnamepat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable info vendor name. - -.TP 10 -cabinfvendpnpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable info vendor part number. - -.TP 10 -cabinfvendrevpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable info vendor revision. - -.TP 10 -cabinfvendsnpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable info vendor serial number. - -.TP 10 -cabinftype:\fIvalue\fR -.NL -\fIvalue\fR is either optical, passive\(ulcopper, active\(ulcopper, or unknown. - -.TP 10 -linkdetpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for link details. - -.TP 10 -portdetpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for port details. - -.TP 10 -sm -.NL -Specifies the master subnet manager (SM). - -.TP 10 -smdetpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for SM details. - -.TP 10 -route:\fIpoint1\fR:\fIpoint2\fR -.NL -Specifies all ports along the routes between the two given points. - -.TP 10 -led:\fIvalue\fR -.NL -\fIvalue\fR is either on or off for LED port beacon. - -.TP 10 -linkqual:\fIvalue\fR -.NL -Specifies the ports with a link quality equal to \fIvalue\fR. - -.TP 10 -linkqualLE:\fIvalue\fR -.NL -Specifies the ports with a link quality less than or equal to \fIvalue\fR. - -.TP 10 -linkqualGE:\fIvalue\fR -.NL -Specifies the ports with a link quality greater than or equal to \fIvalue\fR. - -.TP 10 -nodepatfile:\fIFILENAME\fR -.NL -Specifies the name of file with the list of nodes. - -.TP 10 -nodepairpatfile:\fIFILENAME\fR -.NL -Specifies the name of file with the list of node pairs, separated by a colon. - -.SH Examples -.NL -# List all the bad links in the fabric: -.br -opaextractbadlinks -.br - -.br -# List all the bad links to a switch named "coresw1": -.br -opaextractbadlinks -F "node:coresw1" -.br - -.br -# List all the bad links to end-nodes: -.br -opaextractbadlinks -F "nodetype:FI" -.br - -.br -# List all the bad links on the 2nd HFI\[aq]s fabric of a multi-plane fabric: -.br -opaextractbadlinks -h 2 -.br - -.br +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opaextractbadlinks 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opaextractbadlinks + + +.PP +Produces a CSV file listing all or some of the links that exceed opareport -o error thresholds. opaextractbadlinks is a front end to the opareport tool. The output from this tool can be imported into a spreadsheet or parsed by other scripts. +.SH Syntax +opaextractbadlinks [opareport \fIoptions\fR] +.SH Options + +.TP 10 +--help + +Produces full help text. + +.TP 10 +opareport \fIoptions\fR + +The following options are passed to opareport. This subset is considered typical and useful for this command. By design, the tool ignores -o/--output report option. + +.RS +.TP 10 + +.sp +-h/--hfi \fIhfi\fR +Specifies the HFI, numbered 1..n. Using 0 specifies that the -p \fIport\fR port is a system-wide port number. Default is 0. + +.RE + +.RS +.TP 10 + +.sp +-p/--port \fIport\fR +Specifies the port, numbered 1..n. Using 0 specifies the first active port. Default is 0. + +.RE + +.RS +.TP 10 + +.sp +-X/--infile \fIsnapshot\(ulinput\fR +Generates a report using the data in the snapshot\(ulinput file. snapshot\(ulinput must have been generated during a previous -o \fIsnapshot\fR run. When used, the -s, -i, -C, and -a options are ignored. \[aq]-\[aq] may be used as the snapshot\(ulinput to specify stdin. + +.RE + +.RS +.TP 10 + +.sp +-T/--topology \fItopology\(ulinput\fR +Uses topology\(ulinput file to augment and verify fabric information. When used, various reports can be augmented with information not available electronically (such as cable labels). \[aq]-\[aq] may be used to specify stdin. + +.RE + +.RS +.TP 10 + +.sp +-i/--interval \fIseconds\fR +Obtains performance statistics over interval \fIseconds\fR. Clears all statistics, waits interval \fIseconds\fR, then generates report. Implies -s option. + +.RE + +.RS +.TP 10 + +.sp +-b / --begin \fIdate\(ultime\fR +Obtains past performance stats over an interval beginning at \fIdate\(ultime\fR. Implies -s option. \fIdate\(ultime\fR may be a time entered as HH:MM[:SS] or date as mm/dd/YYYY, dd.mm.YYYY, YYYY-mm-dd or date followed by time; for example, "2016-07-04 14:40". Relative times are taken as "x [second|minute|hour|day](s) ago. + +.RE + +.RS +.TP 10 + +.sp +-e / --end \fIdate\(ultime\fR +Obtains past performance stats over an interval ending at \fIdate\(ultime\fR. Implies -s option. + +.IP +\fIdate\(ultime\fR may be a time entered as HH:MM[:SS] or date as mm/dd/YYYY, dd.mm.YYYY, YYYY-mm-dd or date followed by time; for example, "2016-07-04 14:40". Relative times are taken as "x [second|minute|hour|day](s) ago. +.RE + +.RS +.TP 10 + +.sp +-C/--clear +Clears performance statistics for all ports. Only statistics with error thresholds are cleared. A clear occurs after generating the report. + +.RE + +.RS +.TP 10 + +.sp +-a/--clearall +Clears all performance statistics for all ports. + +.RE + +.RS +.TP 10 + +.sp +-M/--pmadirect +Accesses performance statistics using direct PMA. + +.RE + +.RS +.TP 10 + +.sp +-A/--allports +Gets PortInfo for down switch ports. Uses direct SMA to get this data. If used with -M, also gets PMA stats for down switch ports. + +.RE + +.RS +.TP 10 + +.sp +-c/--config \fIfile\fR +Specifies the error thresholds configuration file. Default is /etc/opa/opamon.conf file. + +.RE + +.RS +.TP 10 + +.sp +-L/--limit +Limits operation to exact specified focus with -F for port error counters check (-o \fIerrors\fR) and port counters clear (-C or -i). Normally, the neighbor of each selected port is also checked/cleared. Does not affect other reports. + +.RE + +.RS +.TP 10 + +.sp +-F/--focus \fIpoint\fR +Specifies the focus area for report. Used for all reports except route to limit scope of report. Refer to +\fIPoint Syntax\fR +for details. + +.RE + + +.SH -h and -p options permit a variety of selections: + +.TP 10 +-h 0 + +First active port in system (Default). + +.TP 10 +-h 0 -p 0 + +First active port in system. + +.TP 10 +-h \fIx\fR + +First active port on HFI \fIx\fR. + +.TP 10 +-h \fIx\fR \fI\fR-p 0 + +First active port on HFI \fIx\fR. + +.TP 10 +-h 0 -p \fIy\fR + +Port \fIy\fR within system (no matter which ports are active). + +.TP 10 +-h \fIx\fR \fI\fR-p \fIy\fR + +HFI \fIx\fR, port \fIy\fR. + + +.SH Point Syntax + +.TP 10 +gid:\fIvalue\fR + +\fIvalue\fR is numeric port GID of form: subnet:guid. + +.TP 10 +lid:\fIvalue\fR + +\fIvalue\fR is numeric LID. + +.TP 10 +lid:value:node + +\fIvalue\fR is numeric LID, selects entire node with given LID. + +.TP 10 +lid:\fIvalue\fR:port:\fIvalue2\fR + +\fIvalue\fR is numeric LID of node, \fIvalue2\fR is port number. + +.TP 10 +portguid:\fIvalue\fR + +\fIvalue\fR is numeric port GUID. + +.TP 10 +nodeguid:\fIvalue\fR + +\fIvalue\fR is numeric node GUID. + +.TP 10 +nodeguid:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is numeric node GUID, \fIvalue2\fR is port number. + +.TP 10 +iocguid:\fIvalue\fR + +\fIvalue\fR is numeric IOC GUID. + +.TP 10 +iocguid:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is numeric IOC GUID, \fIvalue2\fR is port number. + +.TP 10 +systemguid:\fIvalue\fR + +\fIvalue\fR is numeric system image GUID. + +.TP 10 +systemguid:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is the numeric system image GUID, \fIvalue2\fR is port number. + +.TP 10 +ioc:\fIvalue\fR + +\fIvalue\fR is IOC Profile ID String (IOC Name). + +.TP 10 +ioc:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is IOC Profile ID String (IOC Name), \fIvalue2\fR is port number. + +.TP 10 +iocpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for IOC Profile ID String (IOC Name). + +.TP 10 +iocpat:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is glob pattern for IOC Profile ID String (IOC Name), \fIvalue2\fR is port number. + +.TP 10 +ioctype:\fIvalue\fR + +\fIvalue\fR is IOC type (SRP or OTHER). + +.TP 10 +ioctype:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is IOC type (SRP or OTHER); \fIvalue2\fR is port number. + +.TP 10 +node:\fIvalue\fR + +\fIvalue\fR is node description (node name). + +.TP 10 +node:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is node description (node name), \fIvalue2\fR is port number. + +.TP 10 +nodepat:\fIvalue\fR + +\fIvalue\fR is glob pattern for node description (node name). + +.TP 10 +nodepat:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is the glob pattern for the node description (node name), \fIvalue2\fR is port number. + +.TP 10 +nodedetpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for node details. + +.TP 10 +nodedetpat:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is the glob pattern for the node details, \fIvalue2\fR is port number. + +.TP 10 +nodetype:\fIvalue\fR + +\fIvalue\fR is node type (SW or FI). + +.TP 10 +nodetype:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is node type (SW or FI), \fIvalue2\fR is port number. + +.TP 10 +rate:\fIvalue\fR + +\fIvalue\fR is string for rate (25g, 50g, 75g, 100g), omits switch mgmt port 0. + +.TP 10 +portstate:\fIvalue\fR + +\fIvalue\fR is a string for state (down, init, armed, active, notactive, initarmed). + +.TP 10 +portphysstate:\fIvalue\fR + +\fIvalue\fR is a string for PHYs state (polling, disabled, training, linkup, recovery, offline, test) + +.TP 10 +mtucap:\fIvalue\fR + +\fIvalue\fR is MTU size (2048, 4096, 8192, 10240), omits switch mgmt port 0. + +.TP 10 +labelpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable label. + +.TP 10 +lengthpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable length. + +.TP 10 +cabledetpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable details. + +.TP 10 +cabinflenpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable info length. + +.TP 10 +cabinfvendnamepat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable info vendor name. + +.TP 10 +cabinfvendpnpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable info vendor part number. + +.TP 10 +cabinfvendrevpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable info vendor revision. + +.TP 10 +cabinfvendsnpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable info vendor serial number. + +.TP 10 +cabinftype:\fIvalue\fR + +\fIvalue\fR is either optical, passive\(ulcopper, active\(ulcopper, or unknown. + +.TP 10 +linkdetpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for link details. + +.TP 10 +portdetpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for port details. + +.TP 10 +sm + +Specifies the master subnet manager (SM). + +.TP 10 +smdetpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for SM details. + +.TP 10 +route:\fIpoint1\fR:\fIpoint2\fR + +Specifies all ports along the routes between the two given points. + +.TP 10 +led:\fIvalue\fR + +\fIvalue\fR is either on or off for LED port beacon. + +.TP 10 +linkqual:\fIvalue\fR + +Specifies the ports with a link quality equal to \fIvalue\fR. + +.TP 10 +linkqualLE:\fIvalue\fR + +Specifies the ports with a link quality less than or equal to \fIvalue\fR. + +.TP 10 +linkqualGE:\fIvalue\fR + +Specifies the ports with a link quality greater than or equal to \fIvalue\fR. + +.TP 10 +nodepatfile:\fIFILENAME\fR + +Specifies the name of file with the list of nodepats or node descriptions. + +.TP 10 +nodepairpatfile:\fIFILENAME\fR + +Specifies the name of file with the list of node pairs, separated by a colon. + +.TP 10 +ldr + +Specifies the ports with a non-zero link down reason or neighbor link down reason. + +.TP 10 +ldr:\fIvalue\fR + +Specifies the ports with a link down reason or neighbor link down reason equal to \fIvalue\fR. + +.SH Examples +# List all the bad links in the fabric: +.br + +opaextractbadlinks +.br + + +.br + +# List all the bad links to a switch named "coresw1": +.br + +opaextractbadlinks -F "node:coresw1" +.br + + +.br + +# List all the bad links to end-nodes: +.br + +opaextractbadlinks -F "nodetype:FI" +.br + + +.br + +# List all the bad links on the 2nd HFI\[aq]s fabric of a multi-plane fabric: +.br + +opaextractbadlinks -h 2 +.br + +.br diff --git a/IbaTools/man/opaextracterror.manPage b/IbaTools/man/opaextracterror.manPage index e26503c..f5fb8c4 100644 --- a/IbaTools/man/opaextracterror.manPage +++ b/IbaTools/man/opaextracterror.manPage @@ -1,452 +1,464 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opaextracterror 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opaextracterror - -.NL - -.PP -Produces a CSV file listing all or some of the errors in the current fabric. opaextracterror is a front end to the opareport tool. The output from this tool can be imported into a spreadsheet or parsed by other scripts. -.SH Syntax -.NL -opaextracterror [opareport \fIoptions\fR] -.SH Options -.NL - -.TP 10 ---help -.NL -Produces full help text. - -.TP 10 -opareport \fIoptions\fR -.NL -The following options are passed to opareport. This subset is considered typical and useful for this command. By design, the tool ignores -o/--output report option. - -.RS -.TP 10 - -.sp --h/--hfi \fIhfi\fR -Specifies the HFI, numbered 1..n. Using 0 specifies that the -p \fIport\fR port is a system-wide port number. Default is 0. - -.RE - -.RS -.TP 10 - -.sp --p/--port \fIport\fR -Specifies the port, numbered 1..n. Using 0 specifies the first active port. Default is 0. - -.RE - -.RS -.TP 10 - -.sp --X/--infile \fIsnapshot\(ulinput\fR -Generates a report using the data in the snapshot\(ulinput file. snapshot\(ulinput must have been generated during a previous -o \fIsnapshot\fR run. When used, the -s, -i, -C, and -a options are ignored. \[aq]-\[aq] may be used as the snapshot\(ulinput to specify stdin. - -.RE - -.RS -.TP 10 - -.sp --T/--topology \fItopology\(ulinput\fR -Uses topology\(ulinput file to augment and verify fabric information. When used, various reports can be augmented with information not available electronically (such as cable labels). \[aq]-\[aq] may be used to specify stdin. - -.RE - -.RS -.TP 10 - -.sp --i/--interval \fIseconds\fR -Obtains performance statistics over interval \fIseconds\fR. Clears all statistics, waits interval \fIseconds\fR, then generates report. Implies -s option. - -.RE - -.RS -.TP 10 - -.sp --b / --begin \fIdate\(ultime\fR -Obtains past performance stats over an interval beginning at \fIdate\(ultime\fR. Implies -s option. \fIdate\(ultime\fR may be a time entered as HH:MM[:SS] or date as mm/dd/YYYY, dd.mm.YYYY, YYYY-mm-dd or date followed by time; for example, "2016-07-04 14:40". Relative times are taken as "x [second|minute|hour|day](s) ago. - -.RE - -.RS -.TP 10 - -.sp --e / --end \fIdate\(ultime\fR -Obtains past performance stats over an interval ending at \fIdate\(ultime\fR. Implies -s option. - -.IP -\fIdate\(ultime\fR may be a time entered as HH:MM[:SS] or date as mm/dd/YYYY, dd.mm.YYYY, YYYY-mm-dd or date followed by time; for example, "2016-07-04 14:40". Relative times are taken as "x [second|minute|hour|day](s) ago. -.RE - -.RS -.TP 10 - -.sp --C/--clear -Clears performance statistics for all ports. Only statistics with error thresholds are cleared. A clear occurs after generating the report. - -.RE - -.RS -.TP 10 - -.sp --a/--clearall -Clears all performance statistics for all ports. - -.RE - -.RS -.TP 10 - -.sp --M/--pmadirect -Accesses performance statistics using direct PMA. - -.RE - -.RS -.TP 10 - -.sp --A/--allports -Gets PortInfo for down switch ports. Uses direct SMA to get this data. If used with -M, also gets PMA stats for down switch ports. - -.RE - -.RS -.TP 10 - -.sp --F/--focus \fIpoint\fR -Specifies the focus area for report. Used for all reports except route to limit scope of report. Refer to -\fIPoint Syntax\fR -for details. - -.RE - -.NL - -.SH -h and -p options permit a variety of selections: -.NL - -.TP 10 --h 0 -.NL -First active port in system (Default). - -.TP 10 --h 0 -p 0 -.NL -First active port in system. - -.TP 10 --h \fIx\fR -.NL -First active port on HFI \fIx\fR. - -.TP 10 --h \fIx\fR \fI\fR-p 0 -.NL -First active port on HFI \fIx\fR. - -.TP 10 --h 0 -p \fIy\fR -.NL -Port \fIy\fR within system (no matter which ports are active). - -.TP 10 --h \fIx\fR \fI\fR-p \fIy\fR -.NL -HFI \fIx\fR, port \fIy\fR. - -.NL - -.SH Point Syntax -.NL - -.TP 10 -gid:\fIvalue\fR -.NL -\fIvalue\fR is numeric port GID of form: subnet:guid. - -.TP 10 -lid:\fIvalue\fR -.NL -\fIvalue\fR is numeric LID. - -.TP 10 -lid:value:node -.NL -\fIvalue\fR is numeric LID, selects entire node with given LID. - -.TP 10 -lid:\fIvalue\fR:port:\fIvalue2\fR -.NL -\fIvalue\fR is numeric LID of node, \fIvalue2\fR is port number. - -.TP 10 -portguid:\fIvalue\fR -.NL -\fIvalue\fR is numeric port GUID. - -.TP 10 -nodeguid:\fIvalue\fR -.NL -\fIvalue\fR is numeric node GUID. - -.TP 10 -nodeguid:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is numeric node GUID, \fIvalue2\fR is port number. - -.TP 10 -iocguid:\fIvalue\fR -.NL -\fIvalue\fR is numeric IOC GUID. - -.TP 10 -iocguid:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is numeric IOC GUID, \fIvalue2\fR is port number. - -.TP 10 -systemguid:\fIvalue\fR -.NL -\fIvalue\fR is numeric system image GUID. - -.TP 10 -systemguid:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is the numeric system image GUID, \fIvalue2\fR is port number. - -.TP 10 -ioc:\fIvalue\fR -.NL -\fIvalue\fR is IOC Profile ID String (IOC Name). - -.TP 10 -ioc:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is IOC Profile ID String (IOC Name), \fIvalue2\fR is port number. - -.TP 10 -iocpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for IOC Profile ID String (IOC Name). - -.TP 10 -iocpat:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is glob pattern for IOC Profile ID String (IOC Name), \fIvalue2\fR is port number. - -.TP 10 -ioctype:\fIvalue\fR -.NL -\fIvalue\fR is IOC type (SRP or OTHER). - -.TP 10 -ioctype:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is IOC type (SRP or OTHER); \fIvalue2\fR is port number. - -.TP 10 -node:\fIvalue\fR -.NL -\fIvalue\fR is node description (node name). - -.TP 10 -node:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is node description (node name), \fIvalue2\fR is port number. - -.TP 10 -nodepat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for node description (node name). - -.TP 10 -nodepat:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is the glob pattern for the node description (node name), \fIvalue2\fR is port number. - -.TP 10 -nodedetpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for node details. - -.TP 10 -nodedetpat:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is the glob pattern for the node details, \fIvalue2\fR is port number. - -.TP 10 -nodetype:\fIvalue\fR -.NL -\fIvalue\fR is node type (SW or FI). - -.TP 10 -nodetype:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is node type (SW or FI), \fIvalue2\fR is port number. - -.TP 10 -rate:\fIvalue\fR -.NL -\fIvalue\fR is string for rate (25g, 50g, 75g, 100g), omits switch mgmt port 0. - -.TP 10 -portstate:\fIvalue\fR -.NL -\fIvalue\fR is a string for state (down, init, armed, active, notactive, initarmed). - -.TP 10 -portphysstate:\fIvalue\fR -.NL -\fIvalue\fR is a string for PHYs state (polling, disabled, training, linkup, recovery, offline, test) - -.TP 10 -mtucap:\fIvalue\fR -.NL -\fIvalue\fR is MTU size (2048, 4096, 8192, 10240), omits switch mgmt port 0. - -.TP 10 -labelpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable label. - -.TP 10 -lengthpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable length. - -.TP 10 -cabledetpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable details. - -.TP 10 -cabinflenpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable info length. - -.TP 10 -cabinfvendnamepat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable info vendor name. - -.TP 10 -cabinfvendpnpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable info vendor part number. - -.TP 10 -cabinfvendrevpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable info vendor revision. - -.TP 10 -cabinfvendsnpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable info vendor serial number. - -.TP 10 -cabinftype:\fIvalue\fR -.NL -\fIvalue\fR is either optical, passive\(ulcopper, active\(ulcopper, or unknown. - -.TP 10 -linkdetpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for link details. - -.TP 10 -portdetpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for port details. - -.TP 10 -sm -.NL -Specifies the master subnet manager (SM). - -.TP 10 -smdetpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for SM details. - -.TP 10 -route:\fIpoint1\fR:\fIpoint2\fR -.NL -Specifies all ports along the routes between the two given points. - -.TP 10 -led:\fIvalue\fR -.NL -\fIvalue\fR is either on or off for LED port beacon. - -.TP 10 -linkqual:\fIvalue\fR -.NL -Specifies the ports with a link quality equal to \fIvalue\fR. - -.TP 10 -linkqualLE:\fIvalue\fR -.NL -Specifies the ports with a link quality less than or equal to \fIvalue\fR. - -.TP 10 -linkqualGE:\fIvalue\fR -.NL -Specifies the ports with a link quality greater than or equal to \fIvalue\fR. - -.TP 10 -nodepatfile:\fIFILENAME\fR -.NL -Specifies the name of file with the list of nodes. - -.TP 10 -nodepairpatfile:\fIFILENAME\fR -.NL -Specifies the name of file with the list of node pairs, separated by a colon. - -.SH Examples -.NL -# List all the link errors in the fabric: -.br -opaextracterror -.br - -.br -# List all the link errors related to a switch named "coresw1": -.br -opaextracterror -F "node:coresw1" -.br - -.br -# List all the link errors for end-nodes: -.br -opaextracterror -F "nodetype:FI" -.br - -.br -# List all the link errors on the 2nd HFI\[aq]s fabric of a multi-plane fabric: -.br -opaextracterror -h 2 +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opaextracterror 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opaextracterror + + +.PP +Produces a CSV file listing all or some of the errors in the current fabric. opaextracterror is a front end to the opareport tool. The output from this tool can be imported into a spreadsheet or parsed by other scripts. +.SH Syntax +opaextracterror [opareport \fIoptions\fR] +.SH Options + +.TP 10 +--help + +Produces full help text. + +.TP 10 +opareport \fIoptions\fR + +The following options are passed to opareport. This subset is considered typical and useful for this command. By design, the tool ignores -o/--output report option. + +.RS +.TP 10 + +.sp +-h/--hfi \fIhfi\fR +Specifies the HFI, numbered 1..n. Using 0 specifies that the -p \fIport\fR port is a system-wide port number. Default is 0. + +.RE + +.RS +.TP 10 + +.sp +-p/--port \fIport\fR +Specifies the port, numbered 1..n. Using 0 specifies the first active port. Default is 0. + +.RE + +.RS +.TP 10 + +.sp +-X/--infile \fIsnapshot\(ulinput\fR +Generates a report using the data in the snapshot\(ulinput file. snapshot\(ulinput must have been generated during a previous -o \fIsnapshot\fR run. When used, the -s, -i, -C, and -a options are ignored. \[aq]-\[aq] may be used as the snapshot\(ulinput to specify stdin. + +.RE + +.RS +.TP 10 + +.sp +-T/--topology \fItopology\(ulinput\fR +Uses topology\(ulinput file to augment and verify fabric information. When used, various reports can be augmented with information not available electronically (such as cable labels). \[aq]-\[aq] may be used to specify stdin. + +.RE + +.RS +.TP 10 + +.sp +-i/--interval \fIseconds\fR +Obtains performance statistics over interval \fIseconds\fR. Clears all statistics, waits interval \fIseconds\fR, then generates report. Implies -s option. + +.RE + +.RS +.TP 10 + +.sp +-b / --begin \fIdate\(ultime\fR +Obtains past performance stats over an interval beginning at \fIdate\(ultime\fR. Implies -s option. \fIdate\(ultime\fR may be a time entered as HH:MM[:SS] or date as mm/dd/YYYY, dd.mm.YYYY, YYYY-mm-dd or date followed by time; for example, "2016-07-04 14:40". Relative times are taken as "x [second|minute|hour|day](s) ago. + +.RE + +.RS +.TP 10 + +.sp +-e / --end \fIdate\(ultime\fR +Obtains past performance stats over an interval ending at \fIdate\(ultime\fR. Implies -s option. + +.IP +\fIdate\(ultime\fR may be a time entered as HH:MM[:SS] or date as mm/dd/YYYY, dd.mm.YYYY, YYYY-mm-dd or date followed by time; for example, "2016-07-04 14:40". Relative times are taken as "x [second|minute|hour|day](s) ago. +.RE + +.RS +.TP 10 + +.sp +-C/--clear +Clears performance statistics for all ports. Only statistics with error thresholds are cleared. A clear occurs after generating the report. + +.RE + +.RS +.TP 10 + +.sp +-a/--clearall +Clears all performance statistics for all ports. + +.RE + +.RS +.TP 10 + +.sp +-M/--pmadirect +Accesses performance statistics using direct PMA. + +.RE + +.RS +.TP 10 + +.sp +-A/--allports +Gets PortInfo for down switch ports. Uses direct SMA to get this data. If used with -M, also gets PMA stats for down switch ports. + +.RE + +.RS +.TP 10 + +.sp +-F/--focus \fIpoint\fR +Specifies the focus area for report. Used for all reports except route to limit scope of report. Refer to +\fIPoint Syntax\fR +for details. + +.RE + + +.SH -h and -p options permit a variety of selections: + +.TP 10 +-h 0 + +First active port in system (Default). + +.TP 10 +-h 0 -p 0 + +First active port in system. + +.TP 10 +-h \fIx\fR + +First active port on HFI \fIx\fR. + +.TP 10 +-h \fIx\fR \fI\fR-p 0 + +First active port on HFI \fIx\fR. + +.TP 10 +-h 0 -p \fIy\fR + +Port \fIy\fR within system (no matter which ports are active). + +.TP 10 +-h \fIx\fR \fI\fR-p \fIy\fR + +HFI \fIx\fR, port \fIy\fR. + + +.SH Point Syntax + +.TP 10 +gid:\fIvalue\fR + +\fIvalue\fR is numeric port GID of form: subnet:guid. + +.TP 10 +lid:\fIvalue\fR + +\fIvalue\fR is numeric LID. + +.TP 10 +lid:value:node + +\fIvalue\fR is numeric LID, selects entire node with given LID. + +.TP 10 +lid:\fIvalue\fR:port:\fIvalue2\fR + +\fIvalue\fR is numeric LID of node, \fIvalue2\fR is port number. + +.TP 10 +portguid:\fIvalue\fR + +\fIvalue\fR is numeric port GUID. + +.TP 10 +nodeguid:\fIvalue\fR + +\fIvalue\fR is numeric node GUID. + +.TP 10 +nodeguid:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is numeric node GUID, \fIvalue2\fR is port number. + +.TP 10 +iocguid:\fIvalue\fR + +\fIvalue\fR is numeric IOC GUID. + +.TP 10 +iocguid:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is numeric IOC GUID, \fIvalue2\fR is port number. + +.TP 10 +systemguid:\fIvalue\fR + +\fIvalue\fR is numeric system image GUID. + +.TP 10 +systemguid:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is the numeric system image GUID, \fIvalue2\fR is port number. + +.TP 10 +ioc:\fIvalue\fR + +\fIvalue\fR is IOC Profile ID String (IOC Name). + +.TP 10 +ioc:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is IOC Profile ID String (IOC Name), \fIvalue2\fR is port number. + +.TP 10 +iocpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for IOC Profile ID String (IOC Name). + +.TP 10 +iocpat:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is glob pattern for IOC Profile ID String (IOC Name), \fIvalue2\fR is port number. + +.TP 10 +ioctype:\fIvalue\fR + +\fIvalue\fR is IOC type (SRP or OTHER). + +.TP 10 +ioctype:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is IOC type (SRP or OTHER); \fIvalue2\fR is port number. + +.TP 10 +node:\fIvalue\fR + +\fIvalue\fR is node description (node name). + +.TP 10 +node:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is node description (node name), \fIvalue2\fR is port number. + +.TP 10 +nodepat:\fIvalue\fR + +\fIvalue\fR is glob pattern for node description (node name). + +.TP 10 +nodepat:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is the glob pattern for the node description (node name), \fIvalue2\fR is port number. + +.TP 10 +nodedetpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for node details. + +.TP 10 +nodedetpat:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is the glob pattern for the node details, \fIvalue2\fR is port number. + +.TP 10 +nodetype:\fIvalue\fR + +\fIvalue\fR is node type (SW or FI). + +.TP 10 +nodetype:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is node type (SW or FI), \fIvalue2\fR is port number. + +.TP 10 +rate:\fIvalue\fR + +\fIvalue\fR is string for rate (25g, 50g, 75g, 100g), omits switch mgmt port 0. + +.TP 10 +portstate:\fIvalue\fR + +\fIvalue\fR is a string for state (down, init, armed, active, notactive, initarmed). + +.TP 10 +portphysstate:\fIvalue\fR + +\fIvalue\fR is a string for PHYs state (polling, disabled, training, linkup, recovery, offline, test) + +.TP 10 +mtucap:\fIvalue\fR + +\fIvalue\fR is MTU size (2048, 4096, 8192, 10240), omits switch mgmt port 0. + +.TP 10 +labelpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable label. + +.TP 10 +lengthpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable length. + +.TP 10 +cabledetpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable details. + +.TP 10 +cabinflenpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable info length. + +.TP 10 +cabinfvendnamepat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable info vendor name. + +.TP 10 +cabinfvendpnpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable info vendor part number. + +.TP 10 +cabinfvendrevpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable info vendor revision. + +.TP 10 +cabinfvendsnpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable info vendor serial number. + +.TP 10 +cabinftype:\fIvalue\fR + +\fIvalue\fR is either optical, passive\(ulcopper, active\(ulcopper, or unknown. + +.TP 10 +linkdetpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for link details. + +.TP 10 +portdetpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for port details. + +.TP 10 +sm + +Specifies the master subnet manager (SM). + +.TP 10 +smdetpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for SM details. + +.TP 10 +route:\fIpoint1\fR:\fIpoint2\fR + +Specifies all ports along the routes between the two given points. + +.TP 10 +led:\fIvalue\fR + +\fIvalue\fR is either on or off for LED port beacon. + +.TP 10 +linkqual:\fIvalue\fR + +Specifies the ports with a link quality equal to \fIvalue\fR. + +.TP 10 +linkqualLE:\fIvalue\fR + +Specifies the ports with a link quality less than or equal to \fIvalue\fR. + +.TP 10 +linkqualGE:\fIvalue\fR + +Specifies the ports with a link quality greater than or equal to \fIvalue\fR. + +.TP 10 +nodepatfile:\fIFILENAME\fR + +Specifies the name of file with the list of nodepats or node descriptions. + +.TP 10 +nodepairpatfile:\fIFILENAME\fR + +Specifies the name of file with the list of node pairs, separated by a colon. + +.TP 10 +ldr + +Specifies the ports with a non-zero link down reason or neighbor link down reason. + +.TP 10 +ldr:\fIvalue\fR + +Specifies the ports with a link down reason or neighbor link down reason equal to \fIvalue\fR. + +.SH Examples +# List all the link errors in the fabric: +.br + +opaextracterror +.br + + +.br + +# List all the link errors related to a switch named "coresw1": +.br + +opaextracterror -F "node:coresw1" +.br + + +.br + +# List all the link errors for end-nodes: +.br + +opaextracterror -F "nodetype:FI" +.br + + +.br + +# List all the link errors on the 2nd HFI\[aq]s fabric of a multi-plane fabric: +.br + +opaextracterror -h 2 diff --git a/IbaTools/man/opaextractlids.manPage b/IbaTools/man/opaextractlids.manPage index b8e3bc2..96d6a62 100644 --- a/IbaTools/man/opaextractlids.manPage +++ b/IbaTools/man/opaextractlids.manPage @@ -1,372 +1,381 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opaextractlids 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opaextractlids - -.NL - -.PP -Produces a CSV file listing all or some of the LIDs in the fabric. opaextractlids is a front end to the opareport tool. The output from this tool can be imported into a spreadsheet or parsed by other scripts. -.SH Syntax -.NL -opaextractlids [opareport \fIoptions\fR] -.SH Options -.NL - -.TP 10 ---help -.NL -Produces full help text. - -.TP 10 -opareport \fIoptions\fR -.NL -The following options are passed to opareport. This subset is considered typical and useful for this command. By design, the tool ignores -o/--output report option. - -.RS -.TP 10 - -.sp --h/--hfi \fIhfi\fR -Specifies the HFI, numbered 1..n. Using 0 specifies that the -p \fIport\fR port is a system-wide port number. Default is 0. - -.RE - -.RS -.TP 10 - -.sp --p/--port \fIport\fR -Specifies the port, numbered 1..n. Using 0 specifies the first active port. Default is 0. - -.RE - -.RS -.TP 10 - -.sp --X/--infile \fIsnapshot\(ulinput\fR -Generates a report using the data in the snapshot\(ulinput file. snapshot\(ulinput must have been generated during a previous -o \fIsnapshot\fR run. When used, the -s, -i, -C, and -a options are ignored. \[aq]-\[aq] may be used as the snapshot\(ulinput to specify stdin. - -.RE - -.RS -.TP 10 - -.sp --F/--focus \fIpoint\fR -Specifies the focus area for report. Used for all reports except route to limit scope of report. Refer to -\fIPoint Syntax\fR -for details. - -.RE - -.NL - -.SH -h and -p options permit a variety of selections: -.NL - -.TP 10 --h 0 -.NL -First active port in system (Default). - -.TP 10 --h 0 -p 0 -.NL -First active port in system. - -.TP 10 --h \fIx\fR -.NL -First active port on HFI \fIx\fR. - -.TP 10 --h \fIx\fR \fI\fR-p 0 -.NL -First active port on HFI \fIx\fR. - -.TP 10 --h 0 -p \fIy\fR -.NL -Port \fIy\fR within system (no matter which ports are active). - -.TP 10 --h \fIx\fR \fI\fR-p \fIy\fR -.NL -HFI \fIx\fR, port \fIy\fR. - -.NL - -.SH Point Syntax -.NL - -.TP 10 -gid:\fIvalue\fR -.NL -\fIvalue\fR is numeric port GID of form: subnet:guid. - -.TP 10 -lid:\fIvalue\fR -.NL -\fIvalue\fR is numeric LID. - -.TP 10 -lid:value:node -.NL -\fIvalue\fR is numeric LID, selects entire node with given LID. - -.TP 10 -lid:\fIvalue\fR:port:\fIvalue2\fR -.NL -\fIvalue\fR is numeric LID of node, \fIvalue2\fR is port number. - -.TP 10 -portguid:\fIvalue\fR -.NL -\fIvalue\fR is numeric port GUID. - -.TP 10 -nodeguid:\fIvalue\fR -.NL -\fIvalue\fR is numeric node GUID. - -.TP 10 -nodeguid:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is numeric node GUID, \fIvalue2\fR is port number. - -.TP 10 -iocguid:\fIvalue\fR -.NL -\fIvalue\fR is numeric IOC GUID. - -.TP 10 -iocguid:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is numeric IOC GUID, \fIvalue2\fR is port number. - -.TP 10 -systemguid:\fIvalue\fR -.NL -\fIvalue\fR is numeric system image GUID. - -.TP 10 -systemguid:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is the numeric system image GUID, \fIvalue2\fR is port number. - -.TP 10 -ioc:\fIvalue\fR -.NL -\fIvalue\fR is IOC Profile ID String (IOC Name). - -.TP 10 -ioc:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is IOC Profile ID String (IOC Name), \fIvalue2\fR is port number. - -.TP 10 -iocpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for IOC Profile ID String (IOC Name). - -.TP 10 -iocpat:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is glob pattern for IOC Profile ID String (IOC Name), \fIvalue2\fR is port number. - -.TP 10 -ioctype:\fIvalue\fR -.NL -\fIvalue\fR is IOC type (SRP or OTHER). - -.TP 10 -ioctype:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is IOC type (SRP or OTHER); \fIvalue2\fR is port number. - -.TP 10 -node:\fIvalue\fR -.NL -\fIvalue\fR is node description (node name). - -.TP 10 -node:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is node description (node name), \fIvalue2\fR is port number. - -.TP 10 -nodepat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for node description (node name). - -.TP 10 -nodepat:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is the glob pattern for the node description (node name), \fIvalue2\fR is port number. - -.TP 10 -nodedetpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for node details. - -.TP 10 -nodedetpat:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is the glob pattern for the node details, \fIvalue2\fR is port number. - -.TP 10 -nodetype:\fIvalue\fR -.NL -\fIvalue\fR is node type (SW or FI). - -.TP 10 -nodetype:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is node type (SW or FI), \fIvalue2\fR is port number. - -.TP 10 -rate:\fIvalue\fR -.NL -\fIvalue\fR is string for rate (25g, 50g, 75g, 100g), omits switch mgmt port 0. - -.TP 10 -portstate:\fIvalue\fR -.NL -\fIvalue\fR is a string for state (down, init, armed, active, notactive, initarmed). - -.TP 10 -portphysstate:\fIvalue\fR -.NL -\fIvalue\fR is a string for PHYs state (polling, disabled, training, linkup, recovery, offline, test) - -.TP 10 -mtucap:\fIvalue\fR -.NL -\fIvalue\fR is MTU size (2048, 4096, 8192, 10240), omits switch mgmt port 0. - -.TP 10 -labelpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable label. - -.TP 10 -lengthpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable length. - -.TP 10 -cabledetpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable details. - -.TP 10 -cabinflenpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable info length. - -.TP 10 -cabinfvendnamepat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable info vendor name. - -.TP 10 -cabinfvendpnpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable info vendor part number. - -.TP 10 -cabinfvendrevpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable info vendor revision. - -.TP 10 -cabinfvendsnpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable info vendor serial number. - -.TP 10 -cabinftype:\fIvalue\fR -.NL -\fIvalue\fR is either optical, passive\(ulcopper, active\(ulcopper, or unknown. - -.TP 10 -linkdetpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for link details. - -.TP 10 -portdetpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for port details. - -.TP 10 -sm -.NL -Specifies the master subnet manager (SM). - -.TP 10 -smdetpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for SM details. - -.TP 10 -route:\fIpoint1\fR:\fIpoint2\fR -.NL -Specifies all ports along the routes between the two given points. - -.TP 10 -led:\fIvalue\fR -.NL -\fIvalue\fR is either on or off for LED port beacon. - -.TP 10 -linkqual:\fIvalue\fR -.NL -Specifies the ports with a link quality equal to \fIvalue\fR. - -.TP 10 -linkqualLE:\fIvalue\fR -.NL -Specifies the ports with a link quality less than or equal to \fIvalue\fR. - -.TP 10 -linkqualGE:\fIvalue\fR -.NL -Specifies the ports with a link quality greater than or equal to \fIvalue\fR. - -.TP 10 -nodepatfile:\fIFILENAME\fR -.NL -Specifies the name of file with the list of nodes. - -.TP 10 -nodepairpatfile:\fIFILENAME\fR -.NL -Specifies the name of file with the list of node pairs, separated by a colon. - -.SH Examples -.NL -# List all the lids in the fabric: -.br -opaextractlids -.br - -.br -# List all the lids of end-nodes: -.br -opaextractlids -F "nodetype:FI" -.br - -.br -# List all the lids on the 2nd HFI\[aq]s fabric of a multi-plane fabric: -.br -opaextractlids -h 2 +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opaextractlids 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opaextractlids + + +.PP +Produces a CSV file listing all or some of the LIDs in the fabric. opaextractlids is a front end to the opareport tool. The output from this tool can be imported into a spreadsheet or parsed by other scripts. +.SH Syntax +opaextractlids [opareport \fIoptions\fR] +.SH Options + +.TP 10 +--help + +Produces full help text. + +.TP 10 +opareport \fIoptions\fR + +The following options are passed to opareport. This subset is considered typical and useful for this command. By design, the tool ignores -o/--output report option. + +.RS +.TP 10 + +.sp +-h/--hfi \fIhfi\fR +Specifies the HFI, numbered 1..n. Using 0 specifies that the -p \fIport\fR port is a system-wide port number. Default is 0. + +.RE + +.RS +.TP 10 + +.sp +-p/--port \fIport\fR +Specifies the port, numbered 1..n. Using 0 specifies the first active port. Default is 0. + +.RE + +.RS +.TP 10 + +.sp +-X/--infile \fIsnapshot\(ulinput\fR +Generates a report using the data in the snapshot\(ulinput file. snapshot\(ulinput must have been generated during a previous -o \fIsnapshot\fR run. When used, the -s, -i, -C, and -a options are ignored. \[aq]-\[aq] may be used as the snapshot\(ulinput to specify stdin. + +.RE + +.RS +.TP 10 + +.sp +-F/--focus \fIpoint\fR +Specifies the focus area for report. Used for all reports except route to limit scope of report. Refer to +\fIPoint Syntax\fR +for details. + +.RE + + +.SH -h and -p options permit a variety of selections: + +.TP 10 +-h 0 + +First active port in system (Default). + +.TP 10 +-h 0 -p 0 + +First active port in system. + +.TP 10 +-h \fIx\fR + +First active port on HFI \fIx\fR. + +.TP 10 +-h \fIx\fR \fI\fR-p 0 + +First active port on HFI \fIx\fR. + +.TP 10 +-h 0 -p \fIy\fR + +Port \fIy\fR within system (no matter which ports are active). + +.TP 10 +-h \fIx\fR \fI\fR-p \fIy\fR + +HFI \fIx\fR, port \fIy\fR. + + +.SH Point Syntax + +.TP 10 +gid:\fIvalue\fR + +\fIvalue\fR is numeric port GID of form: subnet:guid. + +.TP 10 +lid:\fIvalue\fR + +\fIvalue\fR is numeric LID. + +.TP 10 +lid:value:node + +\fIvalue\fR is numeric LID, selects entire node with given LID. + +.TP 10 +lid:\fIvalue\fR:port:\fIvalue2\fR + +\fIvalue\fR is numeric LID of node, \fIvalue2\fR is port number. + +.TP 10 +portguid:\fIvalue\fR + +\fIvalue\fR is numeric port GUID. + +.TP 10 +nodeguid:\fIvalue\fR + +\fIvalue\fR is numeric node GUID. + +.TP 10 +nodeguid:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is numeric node GUID, \fIvalue2\fR is port number. + +.TP 10 +iocguid:\fIvalue\fR + +\fIvalue\fR is numeric IOC GUID. + +.TP 10 +iocguid:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is numeric IOC GUID, \fIvalue2\fR is port number. + +.TP 10 +systemguid:\fIvalue\fR + +\fIvalue\fR is numeric system image GUID. + +.TP 10 +systemguid:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is the numeric system image GUID, \fIvalue2\fR is port number. + +.TP 10 +ioc:\fIvalue\fR + +\fIvalue\fR is IOC Profile ID String (IOC Name). + +.TP 10 +ioc:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is IOC Profile ID String (IOC Name), \fIvalue2\fR is port number. + +.TP 10 +iocpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for IOC Profile ID String (IOC Name). + +.TP 10 +iocpat:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is glob pattern for IOC Profile ID String (IOC Name), \fIvalue2\fR is port number. + +.TP 10 +ioctype:\fIvalue\fR + +\fIvalue\fR is IOC type (SRP or OTHER). + +.TP 10 +ioctype:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is IOC type (SRP or OTHER); \fIvalue2\fR is port number. + +.TP 10 +node:\fIvalue\fR + +\fIvalue\fR is node description (node name). + +.TP 10 +node:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is node description (node name), \fIvalue2\fR is port number. + +.TP 10 +nodepat:\fIvalue\fR + +\fIvalue\fR is glob pattern for node description (node name). + +.TP 10 +nodepat:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is the glob pattern for the node description (node name), \fIvalue2\fR is port number. + +.TP 10 +nodedetpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for node details. + +.TP 10 +nodedetpat:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is the glob pattern for the node details, \fIvalue2\fR is port number. + +.TP 10 +nodetype:\fIvalue\fR + +\fIvalue\fR is node type (SW or FI). + +.TP 10 +nodetype:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is node type (SW or FI), \fIvalue2\fR is port number. + +.TP 10 +rate:\fIvalue\fR + +\fIvalue\fR is string for rate (25g, 50g, 75g, 100g), omits switch mgmt port 0. + +.TP 10 +portstate:\fIvalue\fR + +\fIvalue\fR is a string for state (down, init, armed, active, notactive, initarmed). + +.TP 10 +portphysstate:\fIvalue\fR + +\fIvalue\fR is a string for PHYs state (polling, disabled, training, linkup, recovery, offline, test) + +.TP 10 +mtucap:\fIvalue\fR + +\fIvalue\fR is MTU size (2048, 4096, 8192, 10240), omits switch mgmt port 0. + +.TP 10 +labelpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable label. + +.TP 10 +lengthpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable length. + +.TP 10 +cabledetpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable details. + +.TP 10 +cabinflenpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable info length. + +.TP 10 +cabinfvendnamepat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable info vendor name. + +.TP 10 +cabinfvendpnpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable info vendor part number. + +.TP 10 +cabinfvendrevpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable info vendor revision. + +.TP 10 +cabinfvendsnpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable info vendor serial number. + +.TP 10 +cabinftype:\fIvalue\fR + +\fIvalue\fR is either optical, passive\(ulcopper, active\(ulcopper, or unknown. + +.TP 10 +linkdetpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for link details. + +.TP 10 +portdetpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for port details. + +.TP 10 +sm + +Specifies the master subnet manager (SM). + +.TP 10 +smdetpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for SM details. + +.TP 10 +route:\fIpoint1\fR:\fIpoint2\fR + +Specifies all ports along the routes between the two given points. + +.TP 10 +led:\fIvalue\fR + +\fIvalue\fR is either on or off for LED port beacon. + +.TP 10 +linkqual:\fIvalue\fR + +Specifies the ports with a link quality equal to \fIvalue\fR. + +.TP 10 +linkqualLE:\fIvalue\fR + +Specifies the ports with a link quality less than or equal to \fIvalue\fR. + +.TP 10 +linkqualGE:\fIvalue\fR + +Specifies the ports with a link quality greater than or equal to \fIvalue\fR. + +.TP 10 +nodepatfile:\fIFILENAME\fR + +Specifies the name of file with the list of nodepats or node descriptions. + +.TP 10 +nodepairpatfile:\fIFILENAME\fR + +Specifies the name of file with the list of node pairs, separated by a colon. + +.TP 10 +ldr + +Specifies the ports with a non-zero link down reason or neighbor link down reason. + +.TP 10 +ldr:\fIvalue\fR + +Specifies the ports with a link down reason or neighbor link down reason equal to \fIvalue\fR. + +.SH Examples +# List all the lids in the fabric: +.br + +opaextractlids +.br + + +.br + +# List all the lids of end-nodes: +.br + +opaextractlids -F "nodetype:FI" +.br + + +.br + +# List all the lids on the 2nd HFI\[aq]s fabric of a multi-plane fabric: +.br + +opaextractlids -h 2 diff --git a/IbaTools/man/opaextractlink.manPage b/IbaTools/man/opaextractlink.manPage index fb80588..c68b4e8 100644 --- a/IbaTools/man/opaextractlink.manPage +++ b/IbaTools/man/opaextractlink.manPage @@ -1,126 +1,130 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opaextractlink 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opaextractlink - -.NL - -.PP -Produces a CSV file listing all or some of the links in the fabric. opaextractlink is a front end to the opareport tool. The output from this tool can be imported into a spreadsheet or parsed by other scripts. -.SH Syntax -.NL -opaextractlink [opareport \fIoptions\fR] -.SH Options -.NL - -.TP 10 ---help -.NL -Produces full help text. - -.TP 10 -opareport \fIoptions\fR -.NL -The following options are passed to opareport. This subset is considered typical and useful for this command. By design, the tool ignores -o/--output report option. - -.RS -.TP 10 - -.sp --h/--hfi \fIhfi\fR -Specifies the HFI, numbered 1..n. Using 0 specifies that the -p \fIport\fR port is a system-wide port number. Default is 0. - -.RE - -.RS -.TP 10 - -.sp --p/--port \fIport\fR -Specifies the port, numbered 1..n. Using 0 specifies the first active port. Default is 0. - -.RE - -.RS -.TP 10 - -.sp --X/--infile \fIsnapshot\(ulinput\fR -Generates a report using the data in the snapshot\(ulinput file. snapshot\(ulinput must have been generated during a previous -o \fIsnapshot\fR run. When used, the -s, -i, -C, and -a options are ignored. \[aq]-\[aq] may be used as the snapshot\(ulinput to specify stdin. - -.RE - -.RS -.TP 10 - -.sp --T/--topology \fItopology\(ulinput\fR -Uses topology\(ulinput file to augment and verify fabric information. When used, various reports can be augmented with information not available electronically (such as cable labels). \[aq]-\[aq] may be used to specify stdin. - -.RE - -.NL - -.SH -h and -p options permit a variety of selections: -.NL - -.TP 10 --h 0 -.NL -First active port in system (Default). - -.TP 10 --h 0 -p 0 -.NL -First active port in system. - -.TP 10 --h \fIx\fR -.NL -First active port on HFI \fIx\fR. - -.TP 10 --h \fIx\fR \fI\fR-p 0 -.NL -First active port on HFI \fIx\fR. - -.TP 10 --h 0 -p \fIy\fR -.NL -Port \fIy\fR within system (no matter which ports are active). - -.TP 10 --h \fIx\fR \fI\fR-p \fIy\fR -.NL -HFI \fIx\fR, port \fIy\fR. - -.SH Examples -.NL -# List all the links in the fabric: -.br -opaextractlink -.br - -.br -# List all the links to a switch named "coresw1": -.br -opaextractlink -F "node:coresw1" -.br - -.br -# List all the links to end-nodes: -.br -opaextractlink -F "nodetype:FI" -.br - -.br -# List all the links on the 2nd HFI\[aq]s fabric of a multi-plane fabric: -.br -opaextractlink -h 2 +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opaextractlink 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opaextractlink + + +.PP +Produces a CSV file listing all or some of the links in the fabric. opaextractlink is a front end to the opareport tool. The output from this tool can be imported into a spreadsheet or parsed by other scripts. +.SH Syntax +opaextractlink [opareport \fIoptions\fR] +.SH Options + +.TP 10 +--help + +Produces full help text. + +.TP 10 +opareport \fIoptions\fR + +The following options are passed to opareport. This subset is considered typical and useful for this command. By design, the tool ignores -o/--output report option. + +.RS +.TP 10 + +.sp +-h/--hfi \fIhfi\fR +Specifies the HFI, numbered 1..n. Using 0 specifies that the -p \fIport\fR port is a system-wide port number. Default is 0. + +.RE + +.RS +.TP 10 + +.sp +-p/--port \fIport\fR +Specifies the port, numbered 1..n. Using 0 specifies the first active port. Default is 0. + +.RE + +.RS +.TP 10 + +.sp +-X/--infile \fIsnapshot\(ulinput\fR +Generates a report using the data in the snapshot\(ulinput file. snapshot\(ulinput must have been generated during a previous -o \fIsnapshot\fR run. When used, the -s, -i, -C, and -a options are ignored. \[aq]-\[aq] may be used as the snapshot\(ulinput to specify stdin. + +.RE + +.RS +.TP 10 + +.sp +-T/--topology \fItopology\(ulinput\fR +Uses topology\(ulinput file to augment and verify fabric information. When used, various reports can be augmented with information not available electronically (such as cable labels). \[aq]-\[aq] may be used to specify stdin. + +.RE + + +.SH -h and -p options permit a variety of selections: + +.TP 10 +-h 0 + +First active port in system (Default). + +.TP 10 +-h 0 -p 0 + +First active port in system. + +.TP 10 +-h \fIx\fR + +First active port on HFI \fIx\fR. + +.TP 10 +-h \fIx\fR \fI\fR-p 0 + +First active port on HFI \fIx\fR. + +.TP 10 +-h 0 -p \fIy\fR + +Port \fIy\fR within system (no matter which ports are active). + +.TP 10 +-h \fIx\fR \fI\fR-p \fIy\fR + +HFI \fIx\fR, port \fIy\fR. + +.SH Examples +# List all the links in the fabric: +.br + +opaextractlink +.br + + +.br + +# List all the links to a switch named "coresw1": +.br + +opaextractlink -F "node:coresw1" +.br + + +.br + +# List all the links to end-nodes: +.br + +opaextractlink -F "nodetype:FI" +.br + + +.br + +# List all the links on the 2nd HFI\[aq]s fabric of a multi-plane fabric: +.br + +opaextractlink -h 2 diff --git a/IbaTools/man/opaextractmissinglinks.manPage b/IbaTools/man/opaextractmissinglinks.manPage index 4d1ea0a..be4e848 100644 --- a/IbaTools/man/opaextractmissinglinks.manPage +++ b/IbaTools/man/opaextractmissinglinks.manPage @@ -1,433 +1,446 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opaextractmissinglinks 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opaextractmissinglinks - -.NL - -.PP -Produces a CSV file listing all or some of the links in the fabric. opaextractmissinglinks is a front end to the opareport tool that generates a report listing all or some of the links that are present in the supplied topology file, but are missing in the fabric. The output from this tool can be imported into a spreadsheet or parsed by other scripts. -.SH Syntax -.NL -opaextractmissinglinks [-T topology\(ulinput] [-o report] -.br -[opareport \fIoptions\fR] -.SH Options -.NL - -.TP 10 ---help -.NL -Produces full help text. - -.TP 10 --T/--topology \fItopology\(ulinput\fR -.NL -Specifies the topology file to verify against. Default is /etc/opa/topology.0:0.xml - -.TP 10 --o/--output \fIreport\fR -.NL -Specifies the report type for output. Refer to -\fIReport Types\fR -for details. - -.TP 10 -opareport \fIoptions\fR -.NL -The following options are passed to opareport. This subset is considered typical and useful for this command. - -.RS -.TP 10 - -.sp --h/--hfi \fIhfi\fR -Specifies the HFI, numbered 1..n. Using 0 specifies that the -p \fIport\fR port is a system-wide port number. Default is 0. - -.RE - -.RS -.TP 10 - -.sp --p/--port \fIport\fR -Specifies the port, numbered 1..n. Using 0 specifies the first active port. Default is 0. - -.RE - -.RS -.TP 10 - -.sp --X/--infile \fIsnapshot\(ulinput\fR -Generates a report using the data in the snapshot\(ulinput file. snapshot\(ulinput must have been generated during a previous -o \fIsnapshot\fR run. When used, the -s, -i, -C, and -a options are ignored. \[aq]-\[aq] may be used as the snapshot\(ulinput to specify stdin. - -.RE - -.RS -.TP 10 - -.sp --F/--focus \fIpoint\fR -Specifies the focus area for report. Used for all reports except route to limit scope of report. Refer to -\fIPoint Syntax\fR -for details. - -.RE - -.NL - -.SH -h and -p options permit a variety of selections: -.NL - -.TP 10 --h 0 -.NL -First active port in system (Default). - -.TP 10 --h 0 -p 0 -.NL -First active port in system. - -.TP 10 --h \fIx\fR -.NL -First active port on HFI \fIx\fR. - -.TP 10 --h \fIx\fR \fI\fR-p 0 -.NL -First active port on HFI \fIx\fR. - -.TP 10 --h 0 -p \fIy\fR -.NL -Port \fIy\fR within system (no matter which ports are active). - -.TP 10 --h \fIx\fR \fI\fR-p \fIy\fR -.NL -HFI \fIx\fR, port \fIy\fR. - -.NL - -.SH Report Types -.NL - -.TP 10 -verifylinks -.NL -Compares fabric (or snapshot) links to supplied topology and identifies differences and omissions. - -.TP 10 -verifyextlinks -.NL -Compares fabric (or snapshot) links to supplied topology and identifies differences and omissions. Limits analysis to links external to systems. - -.TP 10 -verifyfilinks -.NL -Compares fabric (or snapshot) links to supplied topology and identify differences and omissions. Limits analysis to links to FIs. - -.TP 10 -verifyislinks -.NL -Compares fabric (or snapshot) links to supplied topology and identify differences and omissions. Limits analysis to inter-switch links. - -.TP 10 -verifyextislinks -.NL -Compares fabric (or snapshot) links to supplied topology and identify differences and omissions. Limits analysis to inter-switch links external to systems. - -.TP 10 -verifyall -.NL -Returns verifyfis, verifysws, verifysms, and verifylinks reports. - -.NL - -.SH Point Syntax -.NL - -.TP 10 -gid:\fIvalue\fR -.NL -\fIvalue\fR is numeric port GID of form: subnet:guid. - -.TP 10 -lid:\fIvalue\fR -.NL -\fIvalue\fR is numeric LID. - -.TP 10 -lid:value:node -.NL -\fIvalue\fR is numeric LID, selects entire node with given LID. - -.TP 10 -lid:\fIvalue\fR:port:\fIvalue2\fR -.NL -\fIvalue\fR is numeric LID of node, \fIvalue2\fR is port number. - -.TP 10 -portguid:\fIvalue\fR -.NL -\fIvalue\fR is numeric port GUID. - -.TP 10 -nodeguid:\fIvalue\fR -.NL -\fIvalue\fR is numeric node GUID. - -.TP 10 -nodeguid:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is numeric node GUID, \fIvalue2\fR is port number. - -.TP 10 -iocguid:\fIvalue\fR -.NL -\fIvalue\fR is numeric IOC GUID. - -.TP 10 -iocguid:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is numeric IOC GUID, \fIvalue2\fR is port number. - -.TP 10 -systemguid:\fIvalue\fR -.NL -\fIvalue\fR is numeric system image GUID. - -.TP 10 -systemguid:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is the numeric system image GUID, \fIvalue2\fR is port number. - -.TP 10 -ioc:\fIvalue\fR -.NL -\fIvalue\fR is IOC Profile ID String (IOC Name). - -.TP 10 -ioc:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is IOC Profile ID String (IOC Name), \fIvalue2\fR is port number. - -.TP 10 -iocpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for IOC Profile ID String (IOC Name). - -.TP 10 -iocpat:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is glob pattern for IOC Profile ID String (IOC Name), \fIvalue2\fR is port number. - -.TP 10 -ioctype:\fIvalue\fR -.NL -\fIvalue\fR is IOC type (SRP or OTHER). - -.TP 10 -ioctype:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is IOC type (SRP or OTHER); \fIvalue2\fR is port number. - -.TP 10 -node:\fIvalue\fR -.NL -\fIvalue\fR is node description (node name). - -.TP 10 -node:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is node description (node name), \fIvalue2\fR is port number. - -.TP 10 -nodepat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for node description (node name). - -.TP 10 -nodepat:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is the glob pattern for the node description (node name), \fIvalue2\fR is port number. - -.TP 10 -nodedetpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for node details. - -.TP 10 -nodedetpat:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is the glob pattern for the node details, \fIvalue2\fR is port number. - -.TP 10 -nodetype:\fIvalue\fR -.NL -\fIvalue\fR is node type (SW or FI). - -.TP 10 -nodetype:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is node type (SW or FI), \fIvalue2\fR is port number. - -.TP 10 -rate:\fIvalue\fR -.NL -\fIvalue\fR is string for rate (25g, 50g, 75g, 100g), omits switch mgmt port 0. - -.TP 10 -portstate:\fIvalue\fR -.NL -\fIvalue\fR is a string for state (down, init, armed, active, notactive, initarmed). - -.TP 10 -portphysstate:\fIvalue\fR -.NL -\fIvalue\fR is a string for PHYs state (polling, disabled, training, linkup, recovery, offline, test) - -.TP 10 -mtucap:\fIvalue\fR -.NL -\fIvalue\fR is MTU size (2048, 4096, 8192, 10240), omits switch mgmt port 0. - -.TP 10 -labelpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable label. - -.TP 10 -lengthpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable length. - -.TP 10 -cabledetpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable details. - -.TP 10 -cabinflenpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable info length. - -.TP 10 -cabinfvendnamepat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable info vendor name. - -.TP 10 -cabinfvendpnpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable info vendor part number. - -.TP 10 -cabinfvendrevpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable info vendor revision. - -.TP 10 -cabinfvendsnpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable info vendor serial number. - -.TP 10 -cabinftype:\fIvalue\fR -.NL -\fIvalue\fR is either optical, passive\(ulcopper, active\(ulcopper, or unknown. - -.TP 10 -linkdetpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for link details. - -.TP 10 -portdetpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for port details. - -.TP 10 -sm -.NL -Specifies the master subnet manager (SM). - -.TP 10 -smdetpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for SM details. - -.TP 10 -route:\fIpoint1\fR:\fIpoint2\fR -.NL -Specifies all ports along the routes between the two given points. - -.TP 10 -led:\fIvalue\fR -.NL -\fIvalue\fR is either on or off for LED port beacon. - -.TP 10 -linkqual:\fIvalue\fR -.NL -Specifies the ports with a link quality equal to \fIvalue\fR. - -.TP 10 -linkqualLE:\fIvalue\fR -.NL -Specifies the ports with a link quality less than or equal to \fIvalue\fR. - -.TP 10 -linkqualGE:\fIvalue\fR -.NL -Specifies the ports with a link quality greater than or equal to \fIvalue\fR. - -.TP 10 -nodepatfile:\fIFILENAME\fR -.NL -Specifies the name of file with the list of nodes. - -.TP 10 -nodepairpatfile:\fIFILENAME\fR -.NL -Specifies the name of file with the list of node pairs, separated by a colon. - -.SH Examples -.NL -List all the missing links in the fabric: -.br -opaextractmissinglinks -.br - -.br -List all the missing links to a switch named "coresw1": -.br -opaextractmissinglinks -T topology.0:0.xml -F "node:coresw1" -.br - -.br -List all the missing connections to end-nodes: -.br -opaextractmissinglinks -o verifyfilinks -.br - -.br -List all the missing links on the 2nd HFI\[aq]s fabric of a multi-plane fabric: -.br -opaextractmissinglinks -h 2 -T /etc/opa/topology.2:1.xml -.br - -.br -List all the missing links between two switches: -.br -opaextractmissinglinks -o verifyislinks -T topology.0:0.xml +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opaextractmissinglinks 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opaextractmissinglinks + + +.PP +Produces a CSV file listing all or some of the links in the fabric. opaextractmissinglinks is a front end to the opareport tool that generates a report listing all or some of the links that are present in the supplied topology file, but are missing in the fabric. The output from this tool can be imported into a spreadsheet or parsed by other scripts. +.SH Syntax +opaextractmissinglinks [-T topology\(ulinput] [-o report] +.br +[opareport \fIoptions\fR] +.SH Options + +.TP 10 +--help + +Produces full help text. + +.TP 10 +-T/--topology \fItopology\(ulinput\fR + +Specifies the topology file to verify against. Default is /etc/opa/topology.0:0.xml + +.TP 10 +-o/--output \fIreport\fR + +Specifies the report type for output. Refer to +\fIReport Types\fR +for details. + +.TP 10 +opareport \fIoptions\fR + +The following options are passed to opareport. This subset is considered typical and useful for this command. + +.RS +.TP 10 + +.sp +-h/--hfi \fIhfi\fR +Specifies the HFI, numbered 1..n. Using 0 specifies that the -p \fIport\fR port is a system-wide port number. Default is 0. + +.RE + +.RS +.TP 10 + +.sp +-p/--port \fIport\fR +Specifies the port, numbered 1..n. Using 0 specifies the first active port. Default is 0. + +.RE + +.RS +.TP 10 + +.sp +-X/--infile \fIsnapshot\(ulinput\fR +Generates a report using the data in the snapshot\(ulinput file. snapshot\(ulinput must have been generated during a previous -o \fIsnapshot\fR run. When used, the -s, -i, -C, and -a options are ignored. \[aq]-\[aq] may be used as the snapshot\(ulinput to specify stdin. + +.RE + +.RS +.TP 10 + +.sp +-F/--focus \fIpoint\fR +Specifies the focus area for report. Used for all reports except route to limit scope of report. Refer to +\fIPoint Syntax\fR +for details. + +.RE + + +.SH -h and -p options permit a variety of selections: + +.TP 10 +-h 0 + +First active port in system (Default). + +.TP 10 +-h 0 -p 0 + +First active port in system. + +.TP 10 +-h \fIx\fR + +First active port on HFI \fIx\fR. + +.TP 10 +-h \fIx\fR \fI\fR-p 0 + +First active port on HFI \fIx\fR. + +.TP 10 +-h 0 -p \fIy\fR + +Port \fIy\fR within system (no matter which ports are active). + +.TP 10 +-h \fIx\fR \fI\fR-p \fIy\fR + +HFI \fIx\fR, port \fIy\fR. + + +.SH Report Types + +.TP 10 +verifylinks + +Compares fabric (or snapshot) links to supplied topology and identifies differences and omissions. + +.TP 10 +verifyextlinks + +Compares fabric (or snapshot) links to supplied topology and identifies differences and omissions. Limits analysis to links external to systems. + +.TP 10 +verifyfilinks + +Compares fabric (or snapshot) links to supplied topology and identify differences and omissions. Limits analysis to links to FIs. + +.TP 10 +verifyislinks + +Compares fabric (or snapshot) links to supplied topology and identify differences and omissions. Limits analysis to inter-switch links. + +.TP 10 +verifyextislinks + +Compares fabric (or snapshot) links to supplied topology and identify differences and omissions. Limits analysis to inter-switch links external to systems. + +.TP 10 +verifyall + +Returns verifyfis, verifysws, verifysms, and verifylinks reports. + + +.SH Point Syntax + +.TP 10 +gid:\fIvalue\fR + +\fIvalue\fR is numeric port GID of form: subnet:guid. + +.TP 10 +lid:\fIvalue\fR + +\fIvalue\fR is numeric LID. + +.TP 10 +lid:value:node + +\fIvalue\fR is numeric LID, selects entire node with given LID. + +.TP 10 +lid:\fIvalue\fR:port:\fIvalue2\fR + +\fIvalue\fR is numeric LID of node, \fIvalue2\fR is port number. + +.TP 10 +portguid:\fIvalue\fR + +\fIvalue\fR is numeric port GUID. + +.TP 10 +nodeguid:\fIvalue\fR + +\fIvalue\fR is numeric node GUID. + +.TP 10 +nodeguid:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is numeric node GUID, \fIvalue2\fR is port number. + +.TP 10 +iocguid:\fIvalue\fR + +\fIvalue\fR is numeric IOC GUID. + +.TP 10 +iocguid:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is numeric IOC GUID, \fIvalue2\fR is port number. + +.TP 10 +systemguid:\fIvalue\fR + +\fIvalue\fR is numeric system image GUID. + +.TP 10 +systemguid:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is the numeric system image GUID, \fIvalue2\fR is port number. + +.TP 10 +ioc:\fIvalue\fR + +\fIvalue\fR is IOC Profile ID String (IOC Name). + +.TP 10 +ioc:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is IOC Profile ID String (IOC Name), \fIvalue2\fR is port number. + +.TP 10 +iocpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for IOC Profile ID String (IOC Name). + +.TP 10 +iocpat:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is glob pattern for IOC Profile ID String (IOC Name), \fIvalue2\fR is port number. + +.TP 10 +ioctype:\fIvalue\fR + +\fIvalue\fR is IOC type (SRP or OTHER). + +.TP 10 +ioctype:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is IOC type (SRP or OTHER); \fIvalue2\fR is port number. + +.TP 10 +node:\fIvalue\fR + +\fIvalue\fR is node description (node name). + +.TP 10 +node:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is node description (node name), \fIvalue2\fR is port number. + +.TP 10 +nodepat:\fIvalue\fR + +\fIvalue\fR is glob pattern for node description (node name). + +.TP 10 +nodepat:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is the glob pattern for the node description (node name), \fIvalue2\fR is port number. + +.TP 10 +nodedetpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for node details. + +.TP 10 +nodedetpat:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is the glob pattern for the node details, \fIvalue2\fR is port number. + +.TP 10 +nodetype:\fIvalue\fR + +\fIvalue\fR is node type (SW or FI). + +.TP 10 +nodetype:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is node type (SW or FI), \fIvalue2\fR is port number. + +.TP 10 +rate:\fIvalue\fR + +\fIvalue\fR is string for rate (25g, 50g, 75g, 100g), omits switch mgmt port 0. + +.TP 10 +portstate:\fIvalue\fR + +\fIvalue\fR is a string for state (down, init, armed, active, notactive, initarmed). + +.TP 10 +portphysstate:\fIvalue\fR + +\fIvalue\fR is a string for PHYs state (polling, disabled, training, linkup, recovery, offline, test) + +.TP 10 +mtucap:\fIvalue\fR + +\fIvalue\fR is MTU size (2048, 4096, 8192, 10240), omits switch mgmt port 0. + +.TP 10 +labelpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable label. + +.TP 10 +lengthpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable length. + +.TP 10 +cabledetpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable details. + +.TP 10 +cabinflenpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable info length. + +.TP 10 +cabinfvendnamepat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable info vendor name. + +.TP 10 +cabinfvendpnpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable info vendor part number. + +.TP 10 +cabinfvendrevpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable info vendor revision. + +.TP 10 +cabinfvendsnpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable info vendor serial number. + +.TP 10 +cabinftype:\fIvalue\fR + +\fIvalue\fR is either optical, passive\(ulcopper, active\(ulcopper, or unknown. + +.TP 10 +linkdetpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for link details. + +.TP 10 +portdetpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for port details. + +.TP 10 +sm + +Specifies the master subnet manager (SM). + +.TP 10 +smdetpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for SM details. + +.TP 10 +route:\fIpoint1\fR:\fIpoint2\fR + +Specifies all ports along the routes between the two given points. + +.TP 10 +led:\fIvalue\fR + +\fIvalue\fR is either on or off for LED port beacon. + +.TP 10 +linkqual:\fIvalue\fR + +Specifies the ports with a link quality equal to \fIvalue\fR. + +.TP 10 +linkqualLE:\fIvalue\fR + +Specifies the ports with a link quality less than or equal to \fIvalue\fR. + +.TP 10 +linkqualGE:\fIvalue\fR + +Specifies the ports with a link quality greater than or equal to \fIvalue\fR. + +.TP 10 +nodepatfile:\fIFILENAME\fR + +Specifies the name of file with the list of nodepats or node descriptions. + +.TP 10 +nodepairpatfile:\fIFILENAME\fR + +Specifies the name of file with the list of node pairs, separated by a colon. + +.TP 10 +ldr + +Specifies the ports with a non-zero link down reason or neighbor link down reason. + +.TP 10 +ldr:\fIvalue\fR + +Specifies the ports with a link down reason or neighbor link down reason equal to \fIvalue\fR. + +.SH Examples +List all the missing links in the fabric: +.br + + opaextractmissinglinks +.br + + +.br + +List all the missing links to a switch named "coresw1": +.br + + opaextractmissinglinks -T topology.0:0.xml -F "node:coresw1" +.br + + +.br + +List all the missing connections to end-nodes: +.br + + opaextractmissinglinks -o verifyfilinks +.br + + +.br + +List all the missing links on the 2nd HFI\[aq]s fabric of a multi-plane fabric: +.br + + opaextractmissinglinks -h 2 -T /etc/opa/topology.2:1.xml +.br + + +.br + +List all the missing links between two switches: +.br + + opaextractmissinglinks -o verifyislinks -T topology.0:0.xml diff --git a/IbaTools/man/opaextractperf.manPage b/IbaTools/man/opaextractperf.manPage index 72168c9..7422a57 100644 --- a/IbaTools/man/opaextractperf.manPage +++ b/IbaTools/man/opaextractperf.manPage @@ -1,459 +1,468 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opaextractperf 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opaextractperf - -.NL - -.PP -Provides a report of all performance counters in a CVS format suitable for importing into a spreadsheet or parsed by other scripts for further analysis. It generates a detailed opareport component summary report and pipes the result to opaxmlextract, extracting element values for NodeDesc, SystemImageGUID, PortNum, and all the performance counters. Extraction is performed only from the Systems portion of the report, which does not contain Neighbor information (the Neighbor and SMs portions are suppressed). -.SH Syntax -.NL -opaextractperf [opareport \fIoptions\fR] -.SH Options -.NL - -.TP 10 ---help -.NL -Produces full help text. - -.TP 10 -opareport \fIoptions\fR -.NL -The following options are passed to opareport. This subset is considered typical and useful for this command. By design, the tool ignores -o/--output report option. - -.RS -.TP 10 - -.sp --h/--hfi \fIhfi\fR -Specifies the HFI, numbered 1..n. Using 0 specifies that the -p \fIport\fR port is a system-wide port number. Default is 0. - -.RE - -.RS -.TP 10 - -.sp --p/--port \fIport\fR -Specifies the port, numbered 1..n. Using 0 specifies the first active port. Default is 0. - -.RE - -.RS -.TP 10 - -.sp --X/--infile \fIsnapshot\(ulinput\fR -Generates a report using the data in the snapshot\(ulinput file. snapshot\(ulinput must have been generated during a previous -o \fIsnapshot\fR run. When used, the -s, -i, -C, and -a options are ignored. \[aq]-\[aq] may be used as the snapshot\(ulinput to specify stdin. - -.RE - -.RS -.TP 10 - -.sp --T/--topology \fItopology\(ulinput\fR -Uses topology\(ulinput file to augment and verify fabric information. When used, various reports can be augmented with information not available electronically (such as cable labels). \[aq]-\[aq] may be used to specify stdin. - -.RE - -.RS -.TP 10 - -.sp --i/--interval \fIseconds\fR -Obtains performance statistics over interval \fIseconds\fR. Clears all statistics, waits interval \fIseconds\fR, then generates report. Implies -s option. - -.RE - -.RS -.TP 10 - -.sp --b / --begin \fIdate\(ultime\fR -Obtains past performance stats over an interval beginning at \fIdate\(ultime\fR. Implies -s option. \fIdate\(ultime\fR may be a time entered as HH:MM[:SS] or date as mm/dd/YYYY, dd.mm.YYYY, YYYY-mm-dd or date followed by time; for example, "2016-07-04 14:40". Relative times are taken as "x [second|minute|hour|day](s) ago. - -.RE - -.RS -.TP 10 - -.sp --e / --end \fIdate\(ultime\fR -Obtains past performance stats over an interval ending at \fIdate\(ultime\fR. Implies -s option. - -.IP -\fIdate\(ultime\fR may be a time entered as HH:MM[:SS] or date as mm/dd/YYYY, dd.mm.YYYY, YYYY-mm-dd or date followed by time; for example, "2016-07-04 14:40". Relative times are taken as "x [second|minute|hour|day](s) ago. -.RE - -.RS -.TP 10 - -.sp --C/--clear -Clears performance statistics for all ports. Only statistics with error thresholds are cleared. A clear occurs after generating the report. - -.RE - -.RS -.TP 10 - -.sp --a/--clearall -Clears all performance statistics for all ports. - -.RE - -.RS -.TP 10 - -.sp --M/--pmadirect -Accesses performance statistics using direct PMA. - -.RE - -.RS -.TP 10 - -.sp --A/--allports -Gets PortInfo for down switch ports. Uses direct SMA to get this data. If used with -M, also gets PMA stats for down switch ports. - -.RE - -.RS -.TP 10 - -.sp --F/--focus \fIpoint\fR -Specifies the focus area for report. Used for all reports except route to limit scope of report. Refer to -\fIPoint Syntax\fR -for details. - -.RE - -.NL - -.SH -h and -p options permit a variety of selections: -.NL - -.TP 10 --h 0 -.NL -First active port in system (Default). - -.TP 10 --h 0 -p 0 -.NL -First active port in system. - -.TP 10 --h \fIx\fR -.NL -First active port on HFI \fIx\fR. - -.TP 10 --h \fIx\fR \fI\fR-p 0 -.NL -First active port on HFI \fIx\fR. - -.TP 10 --h 0 -p \fIy\fR -.NL -Port \fIy\fR within system (no matter which ports are active). - -.TP 10 --h \fIx\fR \fI\fR-p \fIy\fR -.NL -HFI \fIx\fR, port \fIy\fR. - -.NL - -.SH Point Syntax -.NL - -.TP 10 -gid:\fIvalue\fR -.NL -\fIvalue\fR is numeric port GID of form: subnet:guid. - -.TP 10 -lid:\fIvalue\fR -.NL -\fIvalue\fR is numeric LID. - -.TP 10 -lid:value:node -.NL -\fIvalue\fR is numeric LID, selects entire node with given LID. - -.TP 10 -lid:\fIvalue\fR:port:\fIvalue2\fR -.NL -\fIvalue\fR is numeric LID of node, \fIvalue2\fR is port number. - -.TP 10 -portguid:\fIvalue\fR -.NL -\fIvalue\fR is numeric port GUID. - -.TP 10 -nodeguid:\fIvalue\fR -.NL -\fIvalue\fR is numeric node GUID. - -.TP 10 -nodeguid:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is numeric node GUID, \fIvalue2\fR is port number. - -.TP 10 -iocguid:\fIvalue\fR -.NL -\fIvalue\fR is numeric IOC GUID. - -.TP 10 -iocguid:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is numeric IOC GUID, \fIvalue2\fR is port number. - -.TP 10 -systemguid:\fIvalue\fR -.NL -\fIvalue\fR is numeric system image GUID. - -.TP 10 -systemguid:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is the numeric system image GUID, \fIvalue2\fR is port number. - -.TP 10 -ioc:\fIvalue\fR -.NL -\fIvalue\fR is IOC Profile ID String (IOC Name). - -.TP 10 -ioc:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is IOC Profile ID String (IOC Name), \fIvalue2\fR is port number. - -.TP 10 -iocpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for IOC Profile ID String (IOC Name). - -.TP 10 -iocpat:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is glob pattern for IOC Profile ID String (IOC Name), \fIvalue2\fR is port number. - -.TP 10 -ioctype:\fIvalue\fR -.NL -\fIvalue\fR is IOC type (SRP or OTHER). - -.TP 10 -ioctype:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is IOC type (SRP or OTHER); \fIvalue2\fR is port number. - -.TP 10 -node:\fIvalue\fR -.NL -\fIvalue\fR is node description (node name). - -.TP 10 -node:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is node description (node name), \fIvalue2\fR is port number. - -.TP 10 -nodepat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for node description (node name). - -.TP 10 -nodepat:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is the glob pattern for the node description (node name), \fIvalue2\fR is port number. - -.TP 10 -nodedetpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for node details. - -.TP 10 -nodedetpat:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is the glob pattern for the node details, \fIvalue2\fR is port number. - -.TP 10 -nodetype:\fIvalue\fR -.NL -\fIvalue\fR is node type (SW or FI). - -.TP 10 -nodetype:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is node type (SW or FI), \fIvalue2\fR is port number. - -.TP 10 -rate:\fIvalue\fR -.NL -\fIvalue\fR is string for rate (25g, 50g, 75g, 100g), omits switch mgmt port 0. - -.TP 10 -portstate:\fIvalue\fR -.NL -\fIvalue\fR is a string for state (down, init, armed, active, notactive, initarmed). - -.TP 10 -portphysstate:\fIvalue\fR -.NL -\fIvalue\fR is a string for PHYs state (polling, disabled, training, linkup, recovery, offline, test) - -.TP 10 -mtucap:\fIvalue\fR -.NL -\fIvalue\fR is MTU size (2048, 4096, 8192, 10240), omits switch mgmt port 0. - -.TP 10 -labelpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable label. - -.TP 10 -lengthpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable length. - -.TP 10 -cabledetpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable details. - -.TP 10 -cabinflenpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable info length. - -.TP 10 -cabinfvendnamepat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable info vendor name. - -.TP 10 -cabinfvendpnpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable info vendor part number. - -.TP 10 -cabinfvendrevpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable info vendor revision. - -.TP 10 -cabinfvendsnpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable info vendor serial number. - -.TP 10 -cabinftype:\fIvalue\fR -.NL -\fIvalue\fR is either optical, passive\(ulcopper, active\(ulcopper, or unknown. - -.TP 10 -linkdetpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for link details. - -.TP 10 -portdetpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for port details. - -.TP 10 -sm -.NL -Specifies the master subnet manager (SM). - -.TP 10 -smdetpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for SM details. - -.TP 10 -route:\fIpoint1\fR:\fIpoint2\fR -.NL -Specifies all ports along the routes between the two given points. - -.TP 10 -led:\fIvalue\fR -.NL -\fIvalue\fR is either on or off for LED port beacon. - -.TP 10 -linkqual:\fIvalue\fR -.NL -Specifies the ports with a link quality equal to \fIvalue\fR. - -.TP 10 -linkqualLE:\fIvalue\fR -.NL -Specifies the ports with a link quality less than or equal to \fIvalue\fR. - -.TP 10 -linkqualGE:\fIvalue\fR -.NL -Specifies the ports with a link quality greater than or equal to \fIvalue\fR. - -.TP 10 -nodepatfile:\fIFILENAME\fR -.NL -Specifies the name of file with the list of nodes. - -.TP 10 -nodepairpatfile:\fIFILENAME\fR -.NL -Specifies the name of file with the list of node pairs, separated by a colon. - -.NL - -.PP -The portion of the script that calls opareport and opaxmlextract follows: -.PP - -.br -opareport -o comps -s -x -d 10 $@ | opaxmlextract -d \; -.br --e NodeDesc -e SystemImageGUID -e PortNum -e XmitDataMB -.br --e XmitData -e XmitPkts -e RcvDataMB -e RcvData -e RcvPkts -.br --e SymbolErrors -e LinkErrorRecovery -e LinkDowned -e PortRcvErrors -.br --e PortRcvRemotePhysicalErrors -e PortRcvSwitchRelayErrors -.br --e PortXmitDiscards -e PortXmitConstraintErrors -.br --e PortRcvConstraintErrors -e LocalLinkIntegrityErrors -.br --e ExcessiveBufferOverrunErrors -e VL15Dropped -s Neighbor -s SMs - -.br - -.SH Example -.NL -opaextractperf -.br -opaextractperf -h 1 -p 2 +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opaextractperf 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opaextractperf + + +.PP +Provides a report of all performance counters in a CVS format suitable for importing into a spreadsheet or parsed by other scripts for further analysis. It generates a detailed opareport component summary report and pipes the result to opaxmlextract, extracting element values for NodeDesc, SystemImageGUID, PortNum, and all the performance counters. Extraction is performed only from the Systems portion of the report, which does not contain Neighbor information (the Neighbor and SMs portions are suppressed). +.SH Syntax +opaextractperf [opareport \fIoptions\fR] +.SH Options + +.TP 10 +--help + +Produces full help text. + +.TP 10 +opareport \fIoptions\fR + +The following options are passed to opareport. This subset is considered typical and useful for this command. By design, the tool ignores -o/--output report option. + +.RS +.TP 10 + +.sp +-h/--hfi \fIhfi\fR +Specifies the HFI, numbered 1..n. Using 0 specifies that the -p \fIport\fR port is a system-wide port number. Default is 0. + +.RE + +.RS +.TP 10 + +.sp +-p/--port \fIport\fR +Specifies the port, numbered 1..n. Using 0 specifies the first active port. Default is 0. + +.RE + +.RS +.TP 10 + +.sp +-X/--infile \fIsnapshot\(ulinput\fR +Generates a report using the data in the snapshot\(ulinput file. snapshot\(ulinput must have been generated during a previous -o \fIsnapshot\fR run. When used, the -s, -i, -C, and -a options are ignored. \[aq]-\[aq] may be used as the snapshot\(ulinput to specify stdin. + +.RE + +.RS +.TP 10 + +.sp +-T/--topology \fItopology\(ulinput\fR +Uses topology\(ulinput file to augment and verify fabric information. When used, various reports can be augmented with information not available electronically (such as cable labels). \[aq]-\[aq] may be used to specify stdin. + +.RE + +.RS +.TP 10 + +.sp +-i/--interval \fIseconds\fR +Obtains performance statistics over interval \fIseconds\fR. Clears all statistics, waits interval \fIseconds\fR, then generates report. Implies -s option. + +.RE + +.RS +.TP 10 + +.sp +-b / --begin \fIdate\(ultime\fR +Obtains past performance stats over an interval beginning at \fIdate\(ultime\fR. Implies -s option. \fIdate\(ultime\fR may be a time entered as HH:MM[:SS] or date as mm/dd/YYYY, dd.mm.YYYY, YYYY-mm-dd or date followed by time; for example, "2016-07-04 14:40". Relative times are taken as "x [second|minute|hour|day](s) ago. + +.RE + +.RS +.TP 10 + +.sp +-e / --end \fIdate\(ultime\fR +Obtains past performance stats over an interval ending at \fIdate\(ultime\fR. Implies -s option. + +.IP +\fIdate\(ultime\fR may be a time entered as HH:MM[:SS] or date as mm/dd/YYYY, dd.mm.YYYY, YYYY-mm-dd or date followed by time; for example, "2016-07-04 14:40". Relative times are taken as "x [second|minute|hour|day](s) ago. +.RE + +.RS +.TP 10 + +.sp +-C/--clear +Clears performance statistics for all ports. Only statistics with error thresholds are cleared. A clear occurs after generating the report. + +.RE + +.RS +.TP 10 + +.sp +-a/--clearall +Clears all performance statistics for all ports. + +.RE + +.RS +.TP 10 + +.sp +-M/--pmadirect +Accesses performance statistics using direct PMA. + +.RE + +.RS +.TP 10 + +.sp +-A/--allports +Gets PortInfo for down switch ports. Uses direct SMA to get this data. If used with -M, also gets PMA stats for down switch ports. + +.RE + +.RS +.TP 10 + +.sp +-F/--focus \fIpoint\fR +Specifies the focus area for report. Used for all reports except route to limit scope of report. Refer to +\fIPoint Syntax\fR +for details. + +.RE + + +.SH -h and -p options permit a variety of selections: + +.TP 10 +-h 0 + +First active port in system (Default). + +.TP 10 +-h 0 -p 0 + +First active port in system. + +.TP 10 +-h \fIx\fR + +First active port on HFI \fIx\fR. + +.TP 10 +-h \fIx\fR \fI\fR-p 0 + +First active port on HFI \fIx\fR. + +.TP 10 +-h 0 -p \fIy\fR + +Port \fIy\fR within system (no matter which ports are active). + +.TP 10 +-h \fIx\fR \fI\fR-p \fIy\fR + +HFI \fIx\fR, port \fIy\fR. + + +.SH Point Syntax + +.TP 10 +gid:\fIvalue\fR + +\fIvalue\fR is numeric port GID of form: subnet:guid. + +.TP 10 +lid:\fIvalue\fR + +\fIvalue\fR is numeric LID. + +.TP 10 +lid:value:node + +\fIvalue\fR is numeric LID, selects entire node with given LID. + +.TP 10 +lid:\fIvalue\fR:port:\fIvalue2\fR + +\fIvalue\fR is numeric LID of node, \fIvalue2\fR is port number. + +.TP 10 +portguid:\fIvalue\fR + +\fIvalue\fR is numeric port GUID. + +.TP 10 +nodeguid:\fIvalue\fR + +\fIvalue\fR is numeric node GUID. + +.TP 10 +nodeguid:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is numeric node GUID, \fIvalue2\fR is port number. + +.TP 10 +iocguid:\fIvalue\fR + +\fIvalue\fR is numeric IOC GUID. + +.TP 10 +iocguid:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is numeric IOC GUID, \fIvalue2\fR is port number. + +.TP 10 +systemguid:\fIvalue\fR + +\fIvalue\fR is numeric system image GUID. + +.TP 10 +systemguid:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is the numeric system image GUID, \fIvalue2\fR is port number. + +.TP 10 +ioc:\fIvalue\fR + +\fIvalue\fR is IOC Profile ID String (IOC Name). + +.TP 10 +ioc:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is IOC Profile ID String (IOC Name), \fIvalue2\fR is port number. + +.TP 10 +iocpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for IOC Profile ID String (IOC Name). + +.TP 10 +iocpat:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is glob pattern for IOC Profile ID String (IOC Name), \fIvalue2\fR is port number. + +.TP 10 +ioctype:\fIvalue\fR + +\fIvalue\fR is IOC type (SRP or OTHER). + +.TP 10 +ioctype:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is IOC type (SRP or OTHER); \fIvalue2\fR is port number. + +.TP 10 +node:\fIvalue\fR + +\fIvalue\fR is node description (node name). + +.TP 10 +node:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is node description (node name), \fIvalue2\fR is port number. + +.TP 10 +nodepat:\fIvalue\fR + +\fIvalue\fR is glob pattern for node description (node name). + +.TP 10 +nodepat:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is the glob pattern for the node description (node name), \fIvalue2\fR is port number. + +.TP 10 +nodedetpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for node details. + +.TP 10 +nodedetpat:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is the glob pattern for the node details, \fIvalue2\fR is port number. + +.TP 10 +nodetype:\fIvalue\fR + +\fIvalue\fR is node type (SW or FI). + +.TP 10 +nodetype:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is node type (SW or FI), \fIvalue2\fR is port number. + +.TP 10 +rate:\fIvalue\fR + +\fIvalue\fR is string for rate (25g, 50g, 75g, 100g), omits switch mgmt port 0. + +.TP 10 +portstate:\fIvalue\fR + +\fIvalue\fR is a string for state (down, init, armed, active, notactive, initarmed). + +.TP 10 +portphysstate:\fIvalue\fR + +\fIvalue\fR is a string for PHYs state (polling, disabled, training, linkup, recovery, offline, test) + +.TP 10 +mtucap:\fIvalue\fR + +\fIvalue\fR is MTU size (2048, 4096, 8192, 10240), omits switch mgmt port 0. + +.TP 10 +labelpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable label. + +.TP 10 +lengthpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable length. + +.TP 10 +cabledetpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable details. + +.TP 10 +cabinflenpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable info length. + +.TP 10 +cabinfvendnamepat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable info vendor name. + +.TP 10 +cabinfvendpnpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable info vendor part number. + +.TP 10 +cabinfvendrevpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable info vendor revision. + +.TP 10 +cabinfvendsnpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable info vendor serial number. + +.TP 10 +cabinftype:\fIvalue\fR + +\fIvalue\fR is either optical, passive\(ulcopper, active\(ulcopper, or unknown. + +.TP 10 +linkdetpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for link details. + +.TP 10 +portdetpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for port details. + +.TP 10 +sm + +Specifies the master subnet manager (SM). + +.TP 10 +smdetpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for SM details. + +.TP 10 +route:\fIpoint1\fR:\fIpoint2\fR + +Specifies all ports along the routes between the two given points. + +.TP 10 +led:\fIvalue\fR + +\fIvalue\fR is either on or off for LED port beacon. + +.TP 10 +linkqual:\fIvalue\fR + +Specifies the ports with a link quality equal to \fIvalue\fR. + +.TP 10 +linkqualLE:\fIvalue\fR + +Specifies the ports with a link quality less than or equal to \fIvalue\fR. + +.TP 10 +linkqualGE:\fIvalue\fR + +Specifies the ports with a link quality greater than or equal to \fIvalue\fR. + +.TP 10 +nodepatfile:\fIFILENAME\fR + +Specifies the name of file with the list of nodepats or node descriptions. + +.TP 10 +nodepairpatfile:\fIFILENAME\fR + +Specifies the name of file with the list of node pairs, separated by a colon. + +.TP 10 +ldr + +Specifies the ports with a non-zero link down reason or neighbor link down reason. + +.TP 10 +ldr:\fIvalue\fR + +Specifies the ports with a link down reason or neighbor link down reason equal to \fIvalue\fR. + + +.PP +The portion of the script that calls opareport and opaxmlextract follows: +.PP + +.br +opareport -o comps -s -x -d 10 $@ | opaxmlextract -d \; +.br + +-e NodeDesc -e SystemImageGUID -e PortNum -e XmitDataMB +.br + +-e XmitData -e XmitPkts -e RcvDataMB -e RcvData -e RcvPkts +.br + +-e SymbolErrors -e LinkErrorRecovery -e LinkDowned -e PortRcvErrors +.br + +-e PortRcvRemotePhysicalErrors -e PortRcvSwitchRelayErrors +.br + +-e PortXmitDiscards -e PortXmitConstraintErrors +.br + +-e PortRcvConstraintErrors -e LocalLinkIntegrityErrors +.br + +-e ExcessiveBufferOverrunErrors -e VL15Dropped -s Neighbor -s SMs + +.br + +.SH Example +opaextractperf +.br + +opaextractperf -h 1 -p 2 diff --git a/IbaTools/man/opaextractperf2.manPage b/IbaTools/man/opaextractperf2.manPage new file mode 100644 index 0000000..25b538c --- /dev/null +++ b/IbaTools/man/opaextractperf2.manPage @@ -0,0 +1,445 @@ +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opaextractperf2 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opaextractperf2 + + +.PP +Provides a report of all performance counters in a CSV format suitable for importing into a spreadsheet or parsed by other scripts for further analysis. It generates a detailed opareport component summary report and pipes the result to opaxmlextract, extracting element values for NodeDesc, NodeGUID, PortNum, neighbor NodeDesc, neighbor NodeGUID, neighbor PortNum and all the performance counters. +.SH Syntax +opaextractperf2 [opareport \fIoptions\fR] +.SH Options + +.TP 10 +--help + +Produces full help text. + +.TP 10 +opareport \fIoptions\fR + +The following options are passed to opareport. This subset is considered typical and useful for this command. Do not use the -o/--output report option. + +.RS +.TP 10 + +.sp +-h/--hfi \fIhfi\fR +Specifies the HFI, numbered 1..n. Using 0 specifies that the -p \fIport\fR port is a system-wide port number. Default is 0. + +.RE + +.RS +.TP 10 + +.sp +-p/--port \fIport\fR +Specifies the port, numbered 1..n. Using 0 specifies the first active port. Default is 0. + +.RE + +.RS +.TP 10 + +.sp +-X/--infile \fIsnapshot\(ulinput\fR +Generates a report using the data in the snapshot\(ulinput file. snapshot\(ulinput must have been generated during a previous -o \fIsnapshot\fR run. When used, the -s, -i, -C, and -a options are ignored. \[aq]-\[aq] may be used as the snapshot\(ulinput to specify stdin. + +.RE + +.RS +.TP 10 + +.sp +-T/--topology \fItopology\(ulinput\fR +Uses topology\(ulinput file to augment and verify fabric information. When used, various reports can be augmented with information not available electronically (such as cable labels). \[aq]-\[aq] may be used to specify stdin. + +.RE + +.RS +.TP 10 + +.sp +-i/--interval \fIseconds\fR +Obtains performance statistics over interval \fIseconds\fR. Clears all statistics, waits interval \fIseconds\fR, then generates report. Implies -s option. + +.RE + +.RS +.TP 10 + +.sp +-b / --begin \fIdate\(ultime\fR +Obtains past performance stats over an interval beginning at \fIdate\(ultime\fR. Implies -s option. \fIdate\(ultime\fR may be a time entered as HH:MM[:SS] or date as mm/dd/YYYY, dd.mm.YYYY, YYYY-mm-dd or date followed by time; for example, "2016-07-04 14:40". Relative times are taken as "x [second|minute|hour|day](s) ago. + +.RE + +.RS +.TP 10 + +.sp +-e / --end \fIdate\(ultime\fR +Obtains past performance stats over an interval ending at \fIdate\(ultime\fR. Implies -s option. + +.IP +\fIdate\(ultime\fR may be a time entered as HH:MM[:SS] or date as mm/dd/YYYY, dd.mm.YYYY, YYYY-mm-dd or date followed by time; for example, "2016-07-04 14:40". Relative times are taken as "x [second|minute|hour|day](s) ago. +.RE + +.RS +.TP 10 + +.sp +-C/--clear +Clears performance statistics for all ports. Only statistics with error thresholds are cleared. A clear occurs after generating the report. + +.RE + +.RS +.TP 10 + +.sp +-a/--clearall +Clears all performance statistics for all ports. + +.RE + +.RS +.TP 10 + +.sp +-M/--pmadirect +Accesses performance statistics using direct PMA. + +.RE + +.RS +.TP 10 + +.sp +-A/--allports +Gets PortInfo for down switch ports. Uses direct SMA to get this data. If used with -M, also gets PMA stats for down switch ports. + +.RE + +.RS +.TP 10 + +.sp +-F/--focus \fIpoint\fR +Specifies the focus area for report. Used for all reports except route to limit scope of report. Refer to +\fIPoint Syntax\fR +for details. + +.RE + + +.SH -h and -p options permit a variety of selections: + +.TP 10 +-h 0 + +First active port in system (Default). + +.TP 10 +-h 0 -p 0 + +First active port in system. + +.TP 10 +-h \fIx\fR + +First active port on HFI \fIx\fR. + +.TP 10 +-h \fIx\fR \fI\fR-p 0 + +First active port on HFI \fIx\fR. + +.TP 10 +-h 0 -p \fIy\fR + +Port \fIy\fR within system (no matter which ports are active). + +.TP 10 +-h \fIx\fR \fI\fR-p \fIy\fR + +HFI \fIx\fR, port \fIy\fR. + + +.SH Point Syntax + +.TP 10 +gid:\fIvalue\fR + +\fIvalue\fR is numeric port GID of form: subnet:guid. + +.TP 10 +lid:\fIvalue\fR + +\fIvalue\fR is numeric LID. + +.TP 10 +lid:value:node + +\fIvalue\fR is numeric LID, selects entire node with given LID. + +.TP 10 +lid:\fIvalue\fR:port:\fIvalue2\fR + +\fIvalue\fR is numeric LID of node, \fIvalue2\fR is port number. + +.TP 10 +portguid:\fIvalue\fR + +\fIvalue\fR is numeric port GUID. + +.TP 10 +nodeguid:\fIvalue\fR + +\fIvalue\fR is numeric node GUID. + +.TP 10 +nodeguid:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is numeric node GUID, \fIvalue2\fR is port number. + +.TP 10 +iocguid:\fIvalue\fR + +\fIvalue\fR is numeric IOC GUID. + +.TP 10 +iocguid:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is numeric IOC GUID, \fIvalue2\fR is port number. + +.TP 10 +systemguid:\fIvalue\fR + +\fIvalue\fR is numeric system image GUID. + +.TP 10 +systemguid:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is the numeric system image GUID, \fIvalue2\fR is port number. + +.TP 10 +ioc:\fIvalue\fR + +\fIvalue\fR is IOC Profile ID String (IOC Name). + +.TP 10 +ioc:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is IOC Profile ID String (IOC Name), \fIvalue2\fR is port number. + +.TP 10 +iocpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for IOC Profile ID String (IOC Name). + +.TP 10 +iocpat:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is glob pattern for IOC Profile ID String (IOC Name), \fIvalue2\fR is port number. + +.TP 10 +ioctype:\fIvalue\fR + +\fIvalue\fR is IOC type (SRP or OTHER). + +.TP 10 +ioctype:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is IOC type (SRP or OTHER); \fIvalue2\fR is port number. + +.TP 10 +node:\fIvalue\fR + +\fIvalue\fR is node description (node name). + +.TP 10 +node:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is node description (node name), \fIvalue2\fR is port number. + +.TP 10 +nodepat:\fIvalue\fR + +\fIvalue\fR is glob pattern for node description (node name). + +.TP 10 +nodepat:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is the glob pattern for the node description (node name), \fIvalue2\fR is port number. + +.TP 10 +nodedetpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for node details. + +.TP 10 +nodedetpat:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is the glob pattern for the node details, \fIvalue2\fR is port number. + +.TP 10 +nodetype:\fIvalue\fR + +\fIvalue\fR is node type (SW or FI). + +.TP 10 +nodetype:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is node type (SW or FI), \fIvalue2\fR is port number. + +.TP 10 +rate:\fIvalue\fR + +\fIvalue\fR is string for rate (25g, 50g, 75g, 100g), omits switch mgmt port 0. + +.TP 10 +portstate:\fIvalue\fR + +\fIvalue\fR is a string for state (down, init, armed, active, notactive, initarmed). + +.TP 10 +portphysstate:\fIvalue\fR + +\fIvalue\fR is a string for PHYs state (polling, disabled, training, linkup, recovery, offline, test) + +.TP 10 +mtucap:\fIvalue\fR + +\fIvalue\fR is MTU size (2048, 4096, 8192, 10240), omits switch mgmt port 0. + +.TP 10 +labelpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable label. + +.TP 10 +lengthpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable length. + +.TP 10 +cabledetpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable details. + +.TP 10 +cabinflenpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable info length. + +.TP 10 +cabinfvendnamepat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable info vendor name. + +.TP 10 +cabinfvendpnpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable info vendor part number. + +.TP 10 +cabinfvendrevpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable info vendor revision. + +.TP 10 +cabinfvendsnpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable info vendor serial number. + +.TP 10 +cabinftype:\fIvalue\fR + +\fIvalue\fR is either optical, passive\(ulcopper, active\(ulcopper, or unknown. + +.TP 10 +linkdetpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for link details. + +.TP 10 +portdetpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for port details. + +.TP 10 +sm + +Specifies the master subnet manager (SM). + +.TP 10 +smdetpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for SM details. + +.TP 10 +route:\fIpoint1\fR:\fIpoint2\fR + +Specifies all ports along the routes between the two given points. + +.TP 10 +led:\fIvalue\fR + +\fIvalue\fR is either on or off for LED port beacon. + +.TP 10 +linkqual:\fIvalue\fR + +Specifies the ports with a link quality equal to \fIvalue\fR. + +.TP 10 +linkqualLE:\fIvalue\fR + +Specifies the ports with a link quality less than or equal to \fIvalue\fR. + +.TP 10 +linkqualGE:\fIvalue\fR + +Specifies the ports with a link quality greater than or equal to \fIvalue\fR. + +.TP 10 +nodepatfile:\fIFILENAME\fR + +Specifies the name of file with the list of nodepats or node descriptions. + +.TP 10 +nodepairpatfile:\fIFILENAME\fR + +Specifies the name of file with the list of node pairs, separated by a colon. + +.TP 10 +ldr + +Specifies the ports with a non-zero link down reason or neighbor link down reason. + +.TP 10 +ldr:\fIvalue\fR + +Specifies the ports with a link down reason or neighbor link down reason equal to \fIvalue\fR. + +.SH Example +opaextractperf +.br +2 +opaextractperf2 -h 1 -p 2 + + +.SH See Also + +.PP + +\fIopamergeperf2\fR + diff --git a/IbaTools/man/opaextractsellinks.manPage b/IbaTools/man/opaextractsellinks.manPage index d1e8226..dfc0eb3 100644 --- a/IbaTools/man/opaextractsellinks.manPage +++ b/IbaTools/man/opaextractsellinks.manPage @@ -1,387 +1,399 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opaextractsellinks 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opaextractsellinks - -.NL - -.PP -Produces a CSV file listing all or some of the links in the fabric. opaextractsellinks is a front end to the opareport tool. The output from this tool can be imported into a spreadsheet or parsed by other scripts. -.SH Syntax -.NL -opaextractsellinks [opareport \fIoptions\fR] -.SH Options -.NL - -.TP 10 ---help -.NL -Produces full help text. - -.TP 10 -opareport \fIoptions\fR -.NL -The following options are passed to opareport. This subset is considered typical and useful for this command. By design, the tool ignores -o/--output report option. - -.RS -.TP 10 - -.sp --h/--hfi \fIhfi\fR -Specifies the HFI, numbered 1..n. Using 0 specifies that the -p \fIport\fR port is a system-wide port number. Default is 0. - -.RE - -.RS -.TP 10 - -.sp --p/--port \fIport\fR -Specifies the port, numbered 1..n. Using 0 specifies the first active port. Default is 0. - -.RE - -.RS -.TP 10 - -.sp --X/--infile \fIsnapshot\(ulinput\fR -Generates a report using the data in the snapshot\(ulinput file. snapshot\(ulinput must have been generated during a previous -o \fIsnapshot\fR run. When used, the -s, -i, -C, and -a options are ignored. \[aq]-\[aq] may be used as the snapshot\(ulinput to specify stdin. - -.RE - -.RS -.TP 10 - -.sp --T/--topology \fItopology\(ulinput\fR -Uses topology\(ulinput file to augment and verify fabric information. When used, various reports can be augmented with information not available electronically (such as cable labels). \[aq]-\[aq] may be used to specify stdin. - -.RE - -.RS -.TP 10 - -.sp --F/--focus \fIpoint\fR -Specifies the focus area for report. Used for all reports except route to limit scope of report. Refer to -\fIPoint Syntax\fR -for details. - -.RE - -.NL - -.SH -h and -p options permit a variety of selections: -.NL - -.TP 10 --h 0 -.NL -First active port in system (Default). - -.TP 10 --h 0 -p 0 -.NL -First active port in system. - -.TP 10 --h \fIx\fR -.NL -First active port on HFI \fIx\fR. - -.TP 10 --h \fIx\fR \fI\fR-p 0 -.NL -First active port on HFI \fIx\fR. - -.TP 10 --h 0 -p \fIy\fR -.NL -Port \fIy\fR within system (no matter which ports are active). - -.TP 10 --h \fIx\fR \fI\fR-p \fIy\fR -.NL -HFI \fIx\fR, port \fIy\fR. - -.NL - -.SH Point Syntax -.NL - -.TP 10 -gid:\fIvalue\fR -.NL -\fIvalue\fR is numeric port GID of form: subnet:guid. - -.TP 10 -lid:\fIvalue\fR -.NL -\fIvalue\fR is numeric LID. - -.TP 10 -lid:value:node -.NL -\fIvalue\fR is numeric LID, selects entire node with given LID. - -.TP 10 -lid:\fIvalue\fR:port:\fIvalue2\fR -.NL -\fIvalue\fR is numeric LID of node, \fIvalue2\fR is port number. - -.TP 10 -portguid:\fIvalue\fR -.NL -\fIvalue\fR is numeric port GUID. - -.TP 10 -nodeguid:\fIvalue\fR -.NL -\fIvalue\fR is numeric node GUID. - -.TP 10 -nodeguid:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is numeric node GUID, \fIvalue2\fR is port number. - -.TP 10 -iocguid:\fIvalue\fR -.NL -\fIvalue\fR is numeric IOC GUID. - -.TP 10 -iocguid:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is numeric IOC GUID, \fIvalue2\fR is port number. - -.TP 10 -systemguid:\fIvalue\fR -.NL -\fIvalue\fR is numeric system image GUID. - -.TP 10 -systemguid:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is the numeric system image GUID, \fIvalue2\fR is port number. - -.TP 10 -ioc:\fIvalue\fR -.NL -\fIvalue\fR is IOC Profile ID String (IOC Name). - -.TP 10 -ioc:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is IOC Profile ID String (IOC Name), \fIvalue2\fR is port number. - -.TP 10 -iocpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for IOC Profile ID String (IOC Name). - -.TP 10 -iocpat:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is glob pattern for IOC Profile ID String (IOC Name), \fIvalue2\fR is port number. - -.TP 10 -ioctype:\fIvalue\fR -.NL -\fIvalue\fR is IOC type (SRP or OTHER). - -.TP 10 -ioctype:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is IOC type (SRP or OTHER); \fIvalue2\fR is port number. - -.TP 10 -node:\fIvalue\fR -.NL -\fIvalue\fR is node description (node name). - -.TP 10 -node:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is node description (node name), \fIvalue2\fR is port number. - -.TP 10 -nodepat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for node description (node name). - -.TP 10 -nodepat:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is the glob pattern for the node description (node name), \fIvalue2\fR is port number. - -.TP 10 -nodedetpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for node details. - -.TP 10 -nodedetpat:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is the glob pattern for the node details, \fIvalue2\fR is port number. - -.TP 10 -nodetype:\fIvalue\fR -.NL -\fIvalue\fR is node type (SW or FI). - -.TP 10 -nodetype:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is node type (SW or FI), \fIvalue2\fR is port number. - -.TP 10 -rate:\fIvalue\fR -.NL -\fIvalue\fR is string for rate (25g, 50g, 75g, 100g), omits switch mgmt port 0. - -.TP 10 -portstate:\fIvalue\fR -.NL -\fIvalue\fR is a string for state (down, init, armed, active, notactive, initarmed). - -.TP 10 -portphysstate:\fIvalue\fR -.NL -\fIvalue\fR is a string for PHYs state (polling, disabled, training, linkup, recovery, offline, test) - -.TP 10 -mtucap:\fIvalue\fR -.NL -\fIvalue\fR is MTU size (2048, 4096, 8192, 10240), omits switch mgmt port 0. - -.TP 10 -labelpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable label. - -.TP 10 -lengthpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable length. - -.TP 10 -cabledetpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable details. - -.TP 10 -cabinflenpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable info length. - -.TP 10 -cabinfvendnamepat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable info vendor name. - -.TP 10 -cabinfvendpnpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable info vendor part number. - -.TP 10 -cabinfvendrevpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable info vendor revision. - -.TP 10 -cabinfvendsnpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable info vendor serial number. - -.TP 10 -cabinftype:\fIvalue\fR -.NL -\fIvalue\fR is either optical, passive\(ulcopper, active\(ulcopper, or unknown. - -.TP 10 -linkdetpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for link details. - -.TP 10 -portdetpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for port details. - -.TP 10 -sm -.NL -Specifies the master subnet manager (SM). - -.TP 10 -smdetpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for SM details. - -.TP 10 -route:\fIpoint1\fR:\fIpoint2\fR -.NL -Specifies all ports along the routes between the two given points. - -.TP 10 -led:\fIvalue\fR -.NL -\fIvalue\fR is either on or off for LED port beacon. - -.TP 10 -linkqual:\fIvalue\fR -.NL -Specifies the ports with a link quality equal to \fIvalue\fR. - -.TP 10 -linkqualLE:\fIvalue\fR -.NL -Specifies the ports with a link quality less than or equal to \fIvalue\fR. - -.TP 10 -linkqualGE:\fIvalue\fR -.NL -Specifies the ports with a link quality greater than or equal to \fIvalue\fR. - -.TP 10 -nodepatfile:\fIFILENAME\fR -.NL -Specifies the name of file with the list of nodes. - -.TP 10 -nodepairpatfile:\fIFILENAME\fR -.NL -Specifies the name of file with the list of node pairs, separated by a colon. - -.SH Examples -.NL -# List all the links in the fabric: -.br -opaextractsellinks -.br - -.br -# List all the links to a switch named "coresw1": -.br -opaextractsellinks -F "node:coresw1" -.br - -.br -# List all the connections to end-nodes: -.br -opaextractsellinks -F "nodetype:FI" -.br - -.br -# List all the links on the 2nd HFI\[aq]s fabric of a multi-plane fabric: -.br -opaextractsellinks -h 2 +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opaextractsellinks 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opaextractsellinks + + +.PP +Produces a CSV file listing all or some of the links in the fabric. opaextractsellinks is a front end to the opareport tool. The output from this tool can be imported into a spreadsheet or parsed by other scripts. +.SH Syntax +opaextractsellinks [opareport \fIoptions\fR] +.SH Options + +.TP 10 +--help + +Produces full help text. + +.TP 10 +opareport \fIoptions\fR + +The following options are passed to opareport. This subset is considered typical and useful for this command. By design, the tool ignores -o/--output report option. + +.RS +.TP 10 + +.sp +-h/--hfi \fIhfi\fR +Specifies the HFI, numbered 1..n. Using 0 specifies that the -p \fIport\fR port is a system-wide port number. Default is 0. + +.RE + +.RS +.TP 10 + +.sp +-p/--port \fIport\fR +Specifies the port, numbered 1..n. Using 0 specifies the first active port. Default is 0. + +.RE + +.RS +.TP 10 + +.sp +-X/--infile \fIsnapshot\(ulinput\fR +Generates a report using the data in the snapshot\(ulinput file. snapshot\(ulinput must have been generated during a previous -o \fIsnapshot\fR run. When used, the -s, -i, -C, and -a options are ignored. \[aq]-\[aq] may be used as the snapshot\(ulinput to specify stdin. + +.RE + +.RS +.TP 10 + +.sp +-T/--topology \fItopology\(ulinput\fR +Uses topology\(ulinput file to augment and verify fabric information. When used, various reports can be augmented with information not available electronically (such as cable labels). \[aq]-\[aq] may be used to specify stdin. + +.RE + +.RS +.TP 10 + +.sp +-F/--focus \fIpoint\fR +Specifies the focus area for report. Used for all reports except route to limit scope of report. Refer to +\fIPoint Syntax\fR +for details. + +.RE + + +.SH -h and -p options permit a variety of selections: + +.TP 10 +-h 0 + +First active port in system (Default). + +.TP 10 +-h 0 -p 0 + +First active port in system. + +.TP 10 +-h \fIx\fR + +First active port on HFI \fIx\fR. + +.TP 10 +-h \fIx\fR \fI\fR-p 0 + +First active port on HFI \fIx\fR. + +.TP 10 +-h 0 -p \fIy\fR + +Port \fIy\fR within system (no matter which ports are active). + +.TP 10 +-h \fIx\fR \fI\fR-p \fIy\fR + +HFI \fIx\fR, port \fIy\fR. + + +.SH Point Syntax + +.TP 10 +gid:\fIvalue\fR + +\fIvalue\fR is numeric port GID of form: subnet:guid. + +.TP 10 +lid:\fIvalue\fR + +\fIvalue\fR is numeric LID. + +.TP 10 +lid:value:node + +\fIvalue\fR is numeric LID, selects entire node with given LID. + +.TP 10 +lid:\fIvalue\fR:port:\fIvalue2\fR + +\fIvalue\fR is numeric LID of node, \fIvalue2\fR is port number. + +.TP 10 +portguid:\fIvalue\fR + +\fIvalue\fR is numeric port GUID. + +.TP 10 +nodeguid:\fIvalue\fR + +\fIvalue\fR is numeric node GUID. + +.TP 10 +nodeguid:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is numeric node GUID, \fIvalue2\fR is port number. + +.TP 10 +iocguid:\fIvalue\fR + +\fIvalue\fR is numeric IOC GUID. + +.TP 10 +iocguid:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is numeric IOC GUID, \fIvalue2\fR is port number. + +.TP 10 +systemguid:\fIvalue\fR + +\fIvalue\fR is numeric system image GUID. + +.TP 10 +systemguid:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is the numeric system image GUID, \fIvalue2\fR is port number. + +.TP 10 +ioc:\fIvalue\fR + +\fIvalue\fR is IOC Profile ID String (IOC Name). + +.TP 10 +ioc:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is IOC Profile ID String (IOC Name), \fIvalue2\fR is port number. + +.TP 10 +iocpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for IOC Profile ID String (IOC Name). + +.TP 10 +iocpat:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is glob pattern for IOC Profile ID String (IOC Name), \fIvalue2\fR is port number. + +.TP 10 +ioctype:\fIvalue\fR + +\fIvalue\fR is IOC type (SRP or OTHER). + +.TP 10 +ioctype:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is IOC type (SRP or OTHER); \fIvalue2\fR is port number. + +.TP 10 +node:\fIvalue\fR + +\fIvalue\fR is node description (node name). + +.TP 10 +node:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is node description (node name), \fIvalue2\fR is port number. + +.TP 10 +nodepat:\fIvalue\fR + +\fIvalue\fR is glob pattern for node description (node name). + +.TP 10 +nodepat:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is the glob pattern for the node description (node name), \fIvalue2\fR is port number. + +.TP 10 +nodedetpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for node details. + +.TP 10 +nodedetpat:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is the glob pattern for the node details, \fIvalue2\fR is port number. + +.TP 10 +nodetype:\fIvalue\fR + +\fIvalue\fR is node type (SW or FI). + +.TP 10 +nodetype:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is node type (SW or FI), \fIvalue2\fR is port number. + +.TP 10 +rate:\fIvalue\fR + +\fIvalue\fR is string for rate (25g, 50g, 75g, 100g), omits switch mgmt port 0. + +.TP 10 +portstate:\fIvalue\fR + +\fIvalue\fR is a string for state (down, init, armed, active, notactive, initarmed). + +.TP 10 +portphysstate:\fIvalue\fR + +\fIvalue\fR is a string for PHYs state (polling, disabled, training, linkup, recovery, offline, test) + +.TP 10 +mtucap:\fIvalue\fR + +\fIvalue\fR is MTU size (2048, 4096, 8192, 10240), omits switch mgmt port 0. + +.TP 10 +labelpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable label. + +.TP 10 +lengthpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable length. + +.TP 10 +cabledetpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable details. + +.TP 10 +cabinflenpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable info length. + +.TP 10 +cabinfvendnamepat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable info vendor name. + +.TP 10 +cabinfvendpnpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable info vendor part number. + +.TP 10 +cabinfvendrevpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable info vendor revision. + +.TP 10 +cabinfvendsnpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable info vendor serial number. + +.TP 10 +cabinftype:\fIvalue\fR + +\fIvalue\fR is either optical, passive\(ulcopper, active\(ulcopper, or unknown. + +.TP 10 +linkdetpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for link details. + +.TP 10 +portdetpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for port details. + +.TP 10 +sm + +Specifies the master subnet manager (SM). + +.TP 10 +smdetpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for SM details. + +.TP 10 +route:\fIpoint1\fR:\fIpoint2\fR + +Specifies all ports along the routes between the two given points. + +.TP 10 +led:\fIvalue\fR + +\fIvalue\fR is either on or off for LED port beacon. + +.TP 10 +linkqual:\fIvalue\fR + +Specifies the ports with a link quality equal to \fIvalue\fR. + +.TP 10 +linkqualLE:\fIvalue\fR + +Specifies the ports with a link quality less than or equal to \fIvalue\fR. + +.TP 10 +linkqualGE:\fIvalue\fR + +Specifies the ports with a link quality greater than or equal to \fIvalue\fR. + +.TP 10 +nodepatfile:\fIFILENAME\fR + +Specifies the name of file with the list of nodepats or node descriptions. + +.TP 10 +nodepairpatfile:\fIFILENAME\fR + +Specifies the name of file with the list of node pairs, separated by a colon. + +.TP 10 +ldr + +Specifies the ports with a non-zero link down reason or neighbor link down reason. + +.TP 10 +ldr:\fIvalue\fR + +Specifies the ports with a link down reason or neighbor link down reason equal to \fIvalue\fR. + +.SH Examples +# List all the links in the fabric: +.br + +opaextractsellinks +.br + + +.br + +# List all the links to a switch named "coresw1": +.br + +opaextractsellinks -F "node:coresw1" +.br + + +.br + +# List all the connections to end-nodes: +.br + +opaextractsellinks -F "nodetype:FI" +.br + + +.br + +# List all the links on the 2nd HFI\[aq]s fabric of a multi-plane fabric: +.br + +opaextractsellinks -h 2 diff --git a/IbaTools/man/opaextractstat.manPage b/IbaTools/man/opaextractstat.manPage index a3a64e1..4a09a64 100644 --- a/IbaTools/man/opaextractstat.manPage +++ b/IbaTools/man/opaextractstat.manPage @@ -1,469 +1,473 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opaextractstat 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opaextractstat - -.NL - -.PP -Performs an error analysis of a fabric and provides augmented information from a topology\(ulfile. The report provides cable information as well as symbol error counts. -.PP -opaextractstat generates a detailed opareport errors report that also has a topology file (see -\fIopareport\fR -for more information about topology files). The report is piped to opaxmlextract which extracts values for Link, Cable and Port. (The port element names are context-sensitive.) Note that opaxmlextract generates two extraction records for each link (one for each port on the link); therefore, opaextractstat merges the two records into a single record and removes redundant link and cable information. -.PP -opaextractstat contains a while read loop that reads the CSV line-by-line, uses cut to remove redundant information, and outputs the data on a common line. -.SH Syntax -.NL -opaextractstat topology\(ulfile [opareport \fIoptions\fR] -.SH Options -.NL - -.TP 10 ---help -.NL -Produces full help text. - -.TP 10 -topology\(ulfile -.NL -Specifies topology\(ulfile to use. - -.TP 10 -opareport \fIoptions\fR -.NL -The following options are passed to opareport. This subset is considered typical and useful for this command. By design, the tool ignores -o/--output report option. - -.RS -.TP 10 - -.sp --h/--hfi \fIhfi\fR -Specifies the HFI, numbered 1..n. Using 0 specifies that the -p \fIport\fR port is a system-wide port number. Default is 0. - -.RE - -.RS -.TP 10 - -.sp --p/--port \fIport\fR -Specifies the port, numbered 1..n. Using 0 specifies the first active port. Default is 0. - -.RE - -.RS -.TP 10 - -.sp --X/--infile \fIsnapshot\(ulinput\fR -Generates a report using the data in the snapshot\(ulinput file. snapshot\(ulinput must have been generated during a previous -o \fIsnapshot\fR run. When used, the -s, -i, -C, and -a options are ignored. \[aq]-\[aq] may be used as the snapshot\(ulinput to specify stdin. - -.RE - -.RS -.TP 10 - -.sp --i/--interval \fIseconds\fR -Obtains performance statistics over interval \fIseconds\fR. Clears all statistics, waits interval \fIseconds\fR, then generates report. Implies -s option. - -.RE - -.RS -.TP 10 - -.sp --b / --begin \fIdate\(ultime\fR -Obtains past performance stats over an interval beginning at \fIdate\(ultime\fR. Implies -s option. \fIdate\(ultime\fR may be a time entered as HH:MM[:SS] or date as mm/dd/YYYY, dd.mm.YYYY, YYYY-mm-dd or date followed by time; for example, "2016-07-04 14:40". Relative times are taken as "x [second|minute|hour|day](s) ago. - -.RE - -.RS -.TP 10 - -.sp --e / --end \fIdate\(ultime\fR -Obtains past performance stats over an interval ending at \fIdate\(ultime\fR. Implies -s option. - -.IP -\fIdate\(ultime\fR may be a time entered as HH:MM[:SS] or date as mm/dd/YYYY, dd.mm.YYYY, YYYY-mm-dd or date followed by time; for example, "2016-07-04 14:40". Relative times are taken as "x [second|minute|hour|day](s) ago. -.RE - -.RS -.TP 10 - -.sp --C/--clear -Clears performance statistics for all ports. Only statistics with error thresholds are cleared. A clear occurs after generating the report. - -.RE - -.RS -.TP 10 - -.sp --a/--clearall -Clears all performance statistics for all ports. - -.RE - -.RS -.TP 10 - -.sp --M/--pmadirect -Accesses performance statistics using direct PMA. - -.RE - -.RS -.TP 10 - -.sp --A/--allports -Gets PortInfo for down switch ports. Uses direct SMA to get this data. If used with -M, also gets PMA stats for down switch ports. - -.RE - -.RS -.TP 10 - -.sp --c/--config \fIfile\fR -Specifies the error thresholds configuration file. Default is /etc/opa/opamon.conf file. - -.RE - -.RS -.TP 10 - -.sp --L/--limit -Limits operation to exact specified focus with -F for port error counters check (-o \fIerrors\fR) and port counters clear (-C or -i). Normally, the neighbor of each selected port is also checked/cleared. Does not affect other reports. - -.RE - -.RS -.TP 10 - -.sp --F/--focus \fIpoint\fR -Specifies the focus area for report. Used for all reports except route to limit scope of report. Refer to -\fIPoint Syntax\fR -for details. - -.RE - -.NL - -.SH -h and -p options permit a variety of selections: -.NL - -.TP 10 --h 0 -.NL -First active port in system (Default). - -.TP 10 --h 0 -p 0 -.NL -First active port in system. - -.TP 10 --h \fIx\fR -.NL -First active port on HFI \fIx\fR. - -.TP 10 --h \fIx\fR \fI\fR-p 0 -.NL -First active port on HFI \fIx\fR. - -.TP 10 --h 0 -p \fIy\fR -.NL -Port \fIy\fR within system (no matter which ports are active). - -.TP 10 --h \fIx\fR \fI\fR-p \fIy\fR -.NL -HFI \fIx\fR, port \fIy\fR. - -.NL - -.SH Point Syntax -.NL - -.TP 10 -gid:\fIvalue\fR -.NL -\fIvalue\fR is numeric port GID of form: subnet:guid. - -.TP 10 -lid:\fIvalue\fR -.NL -\fIvalue\fR is numeric LID. - -.TP 10 -lid:value:node -.NL -\fIvalue\fR is numeric LID, selects entire node with given LID. - -.TP 10 -lid:\fIvalue\fR:port:\fIvalue2\fR -.NL -\fIvalue\fR is numeric LID of node, \fIvalue2\fR is port number. - -.TP 10 -portguid:\fIvalue\fR -.NL -\fIvalue\fR is numeric port GUID. - -.TP 10 -nodeguid:\fIvalue\fR -.NL -\fIvalue\fR is numeric node GUID. - -.TP 10 -nodeguid:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is numeric node GUID, \fIvalue2\fR is port number. - -.TP 10 -iocguid:\fIvalue\fR -.NL -\fIvalue\fR is numeric IOC GUID. - -.TP 10 -iocguid:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is numeric IOC GUID, \fIvalue2\fR is port number. - -.TP 10 -systemguid:\fIvalue\fR -.NL -\fIvalue\fR is numeric system image GUID. - -.TP 10 -systemguid:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is the numeric system image GUID, \fIvalue2\fR is port number. - -.TP 10 -ioc:\fIvalue\fR -.NL -\fIvalue\fR is IOC Profile ID String (IOC Name). - -.TP 10 -ioc:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is IOC Profile ID String (IOC Name), \fIvalue2\fR is port number. - -.TP 10 -iocpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for IOC Profile ID String (IOC Name). - -.TP 10 -iocpat:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is glob pattern for IOC Profile ID String (IOC Name), \fIvalue2\fR is port number. - -.TP 10 -ioctype:\fIvalue\fR -.NL -\fIvalue\fR is IOC type (SRP or OTHER). - -.TP 10 -ioctype:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is IOC type (SRP or OTHER); \fIvalue2\fR is port number. - -.TP 10 -node:\fIvalue\fR -.NL -\fIvalue\fR is node description (node name). - -.TP 10 -node:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is node description (node name), \fIvalue2\fR is port number. - -.TP 10 -nodepat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for node description (node name). - -.TP 10 -nodepat:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is the glob pattern for the node description (node name), \fIvalue2\fR is port number. - -.TP 10 -nodedetpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for node details. - -.TP 10 -nodedetpat:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is the glob pattern for the node details, \fIvalue2\fR is port number. - -.TP 10 -nodetype:\fIvalue\fR -.NL -\fIvalue\fR is node type (SW or FI). - -.TP 10 -nodetype:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is node type (SW or FI), \fIvalue2\fR is port number. - -.TP 10 -rate:\fIvalue\fR -.NL -\fIvalue\fR is string for rate (25g, 50g, 75g, 100g), omits switch mgmt port 0. - -.TP 10 -portstate:\fIvalue\fR -.NL -\fIvalue\fR is a string for state (down, init, armed, active, notactive, initarmed). - -.TP 10 -portphysstate:\fIvalue\fR -.NL -\fIvalue\fR is a string for PHYs state (polling, disabled, training, linkup, recovery, offline, test) - -.TP 10 -mtucap:\fIvalue\fR -.NL -\fIvalue\fR is MTU size (2048, 4096, 8192, 10240), omits switch mgmt port 0. - -.TP 10 -labelpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable label. - -.TP 10 -lengthpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable length. - -.TP 10 -cabledetpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable details. - -.TP 10 -cabinflenpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable info length. - -.TP 10 -cabinfvendnamepat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable info vendor name. - -.TP 10 -cabinfvendpnpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable info vendor part number. - -.TP 10 -cabinfvendrevpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable info vendor revision. - -.TP 10 -cabinfvendsnpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable info vendor serial number. - -.TP 10 -cabinftype:\fIvalue\fR -.NL -\fIvalue\fR is either optical, passive\(ulcopper, active\(ulcopper, or unknown. - -.TP 10 -linkdetpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for link details. - -.TP 10 -portdetpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for port details. - -.TP 10 -sm -.NL -Specifies the master subnet manager (SM). - -.TP 10 -smdetpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for SM details. - -.TP 10 -route:\fIpoint1\fR:\fIpoint2\fR -.NL -Specifies all ports along the routes between the two given points. - -.TP 10 -led:\fIvalue\fR -.NL -\fIvalue\fR is either on or off for LED port beacon. - -.TP 10 -linkqual:\fIvalue\fR -.NL -Specifies the ports with a link quality equal to \fIvalue\fR. - -.TP 10 -linkqualLE:\fIvalue\fR -.NL -Specifies the ports with a link quality less than or equal to \fIvalue\fR. - -.TP 10 -linkqualGE:\fIvalue\fR -.NL -Specifies the ports with a link quality greater than or equal to \fIvalue\fR. - -.TP 10 -nodepatfile:\fIFILENAME\fR -.NL -Specifies the name of file with the list of nodes. - -.TP 10 -nodepairpatfile:\fIFILENAME\fR -.NL -Specifies the name of file with the list of node pairs, separated by a colon. - -.NL - -.PP -The portion of the script that calls opareport and opaxmlextract follows: -.PP - -.br -opareport -x -d 10 -s -o errors -T $@ | opaxmlextract -d \; -.br --e Rate -e MTU -e LinkDetails -e CableLength -e CableLabel -.br --e CableDetails -e Port.NodeDesc -e Port.PortNum -e SymbolErrors.Value - -.br - -.SH Examples -.NL -opaextractstat topology\(ulfile -.br -opaextractstat topology\(ulfile -c my\(ulopamon.conf +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opaextractstat 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opaextractstat + + +.PP +Performs an error analysis of a fabric and provides augmented information from a topology\(ulfile. The report provides cable information as well as symbol error counts. +.PP +opaextractstat generates a detailed opareport errors report that also has a topology file (see +\fIopareport\fR +for more information about topology files). The report is piped to opaxmlextract which extracts values for Link, Cable and Port. (The port element names are context-sensitive.) Note that opaxmlextract generates two extraction records for each link (one for each port on the link); therefore, opaextractstat merges the two records into a single record and removes redundant link and cable information. +.PP +opaextractstat contains a while read loop that reads the CSV line-by-line, uses cut to remove redundant information, and outputs the data on a common line. +.SH Syntax +opaextractstat topology\(ulfile [opareport \fIoptions\fR] +.SH Options + +.TP 10 +--help + +Produces full help text. + +.TP 10 +topology\(ulfile + +Specifies topology\(ulfile to use. + +.TP 10 +opareport \fIoptions\fR + +The following options are passed to opareport. This subset is considered typical and useful for this command. By design, the tool ignores -o/--output report option. + +.RS +.TP 10 + +.sp +-h/--hfi \fIhfi\fR +Specifies the HFI, numbered 1..n. Using 0 specifies that the -p \fIport\fR port is a system-wide port number. Default is 0. + +.RE + +.RS +.TP 10 + +.sp +-p/--port \fIport\fR +Specifies the port, numbered 1..n. Using 0 specifies the first active port. Default is 0. + +.RE + +.RS +.TP 10 + +.sp +-X/--infile \fIsnapshot\(ulinput\fR +Generates a report using the data in the snapshot\(ulinput file. snapshot\(ulinput must have been generated during a previous -o \fIsnapshot\fR run. When used, the -s, -i, -C, and -a options are ignored. \[aq]-\[aq] may be used as the snapshot\(ulinput to specify stdin. + +.RE + +.RS +.TP 10 + +.sp +-i/--interval \fIseconds\fR +Obtains performance statistics over interval \fIseconds\fR. Clears all statistics, waits interval \fIseconds\fR, then generates report. Implies -s option. + +.RE + +.RS +.TP 10 + +.sp +-b / --begin \fIdate\(ultime\fR +Obtains past performance stats over an interval beginning at \fIdate\(ultime\fR. Implies -s option. \fIdate\(ultime\fR may be a time entered as HH:MM[:SS] or date as mm/dd/YYYY, dd.mm.YYYY, YYYY-mm-dd or date followed by time; for example, "2016-07-04 14:40". Relative times are taken as "x [second|minute|hour|day](s) ago. + +.RE + +.RS +.TP 10 + +.sp +-e / --end \fIdate\(ultime\fR +Obtains past performance stats over an interval ending at \fIdate\(ultime\fR. Implies -s option. + +.IP +\fIdate\(ultime\fR may be a time entered as HH:MM[:SS] or date as mm/dd/YYYY, dd.mm.YYYY, YYYY-mm-dd or date followed by time; for example, "2016-07-04 14:40". Relative times are taken as "x [second|minute|hour|day](s) ago. +.RE + +.RS +.TP 10 + +.sp +-C/--clear +Clears performance statistics for all ports. Only statistics with error thresholds are cleared. A clear occurs after generating the report. + +.RE + +.RS +.TP 10 + +.sp +-a/--clearall +Clears all performance statistics for all ports. + +.RE + +.RS +.TP 10 + +.sp +-M/--pmadirect +Accesses performance statistics using direct PMA. + +.RE + +.RS +.TP 10 + +.sp +-A/--allports +Gets PortInfo for down switch ports. Uses direct SMA to get this data. If used with -M, also gets PMA stats for down switch ports. + +.RE + +.RS +.TP 10 + +.sp +-c/--config \fIfile\fR +Specifies the error thresholds configuration file. Default is /etc/opa/opamon.conf file. + +.RE + +.RS +.TP 10 + +.sp +-L/--limit +Limits operation to exact specified focus with -F for port error counters check (-o \fIerrors\fR) and port counters clear (-C or -i). Normally, the neighbor of each selected port is also checked/cleared. Does not affect other reports. + +.RE + +.RS +.TP 10 + +.sp +-F/--focus \fIpoint\fR +Specifies the focus area for report. Used for all reports except route to limit scope of report. Refer to +\fIPoint Syntax\fR +for details. + +.RE + + +.SH -h and -p options permit a variety of selections: + +.TP 10 +-h 0 + +First active port in system (Default). + +.TP 10 +-h 0 -p 0 + +First active port in system. + +.TP 10 +-h \fIx\fR + +First active port on HFI \fIx\fR. + +.TP 10 +-h \fIx\fR \fI\fR-p 0 + +First active port on HFI \fIx\fR. + +.TP 10 +-h 0 -p \fIy\fR + +Port \fIy\fR within system (no matter which ports are active). + +.TP 10 +-h \fIx\fR \fI\fR-p \fIy\fR + +HFI \fIx\fR, port \fIy\fR. + + +.SH Point Syntax + +.TP 10 +gid:\fIvalue\fR + +\fIvalue\fR is numeric port GID of form: subnet:guid. + +.TP 10 +lid:\fIvalue\fR + +\fIvalue\fR is numeric LID. + +.TP 10 +lid:value:node + +\fIvalue\fR is numeric LID, selects entire node with given LID. + +.TP 10 +lid:\fIvalue\fR:port:\fIvalue2\fR + +\fIvalue\fR is numeric LID of node, \fIvalue2\fR is port number. + +.TP 10 +portguid:\fIvalue\fR + +\fIvalue\fR is numeric port GUID. + +.TP 10 +nodeguid:\fIvalue\fR + +\fIvalue\fR is numeric node GUID. + +.TP 10 +nodeguid:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is numeric node GUID, \fIvalue2\fR is port number. + +.TP 10 +iocguid:\fIvalue\fR + +\fIvalue\fR is numeric IOC GUID. + +.TP 10 +iocguid:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is numeric IOC GUID, \fIvalue2\fR is port number. + +.TP 10 +systemguid:\fIvalue\fR + +\fIvalue\fR is numeric system image GUID. + +.TP 10 +systemguid:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is the numeric system image GUID, \fIvalue2\fR is port number. + +.TP 10 +ioc:\fIvalue\fR + +\fIvalue\fR is IOC Profile ID String (IOC Name). + +.TP 10 +ioc:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is IOC Profile ID String (IOC Name), \fIvalue2\fR is port number. + +.TP 10 +iocpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for IOC Profile ID String (IOC Name). + +.TP 10 +iocpat:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is glob pattern for IOC Profile ID String (IOC Name), \fIvalue2\fR is port number. + +.TP 10 +ioctype:\fIvalue\fR + +\fIvalue\fR is IOC type (SRP or OTHER). + +.TP 10 +ioctype:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is IOC type (SRP or OTHER); \fIvalue2\fR is port number. + +.TP 10 +node:\fIvalue\fR + +\fIvalue\fR is node description (node name). + +.TP 10 +node:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is node description (node name), \fIvalue2\fR is port number. + +.TP 10 +nodepat:\fIvalue\fR + +\fIvalue\fR is glob pattern for node description (node name). + +.TP 10 +nodepat:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is the glob pattern for the node description (node name), \fIvalue2\fR is port number. + +.TP 10 +nodedetpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for node details. + +.TP 10 +nodedetpat:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is the glob pattern for the node details, \fIvalue2\fR is port number. + +.TP 10 +nodetype:\fIvalue\fR + +\fIvalue\fR is node type (SW or FI). + +.TP 10 +nodetype:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is node type (SW or FI), \fIvalue2\fR is port number. + +.TP 10 +rate:\fIvalue\fR + +\fIvalue\fR is string for rate (25g, 50g, 75g, 100g), omits switch mgmt port 0. + +.TP 10 +portstate:\fIvalue\fR + +\fIvalue\fR is a string for state (down, init, armed, active, notactive, initarmed). + +.TP 10 +portphysstate:\fIvalue\fR + +\fIvalue\fR is a string for PHYs state (polling, disabled, training, linkup, recovery, offline, test) + +.TP 10 +mtucap:\fIvalue\fR + +\fIvalue\fR is MTU size (2048, 4096, 8192, 10240), omits switch mgmt port 0. + +.TP 10 +labelpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable label. + +.TP 10 +lengthpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable length. + +.TP 10 +cabledetpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable details. + +.TP 10 +cabinflenpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable info length. + +.TP 10 +cabinfvendnamepat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable info vendor name. + +.TP 10 +cabinfvendpnpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable info vendor part number. + +.TP 10 +cabinfvendrevpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable info vendor revision. + +.TP 10 +cabinfvendsnpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable info vendor serial number. + +.TP 10 +cabinftype:\fIvalue\fR + +\fIvalue\fR is either optical, passive\(ulcopper, active\(ulcopper, or unknown. + +.TP 10 +linkdetpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for link details. + +.TP 10 +portdetpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for port details. + +.TP 10 +sm + +Specifies the master subnet manager (SM). + +.TP 10 +smdetpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for SM details. + +.TP 10 +route:\fIpoint1\fR:\fIpoint2\fR + +Specifies all ports along the routes between the two given points. + +.TP 10 +led:\fIvalue\fR + +\fIvalue\fR is either on or off for LED port beacon. + +.TP 10 +linkqual:\fIvalue\fR + +Specifies the ports with a link quality equal to \fIvalue\fR. + +.TP 10 +linkqualLE:\fIvalue\fR + +Specifies the ports with a link quality less than or equal to \fIvalue\fR. + +.TP 10 +linkqualGE:\fIvalue\fR + +Specifies the ports with a link quality greater than or equal to \fIvalue\fR. + +.TP 10 +nodepatfile:\fIFILENAME\fR + +Specifies the name of file with the list of nodepats or node descriptions. + +.TP 10 +nodepairpatfile:\fIFILENAME\fR + +Specifies the name of file with the list of node pairs, separated by a colon. + +.TP 10 +ldr + +Specifies the ports with a non-zero link down reason or neighbor link down reason. + +.TP 10 +ldr:\fIvalue\fR + +Specifies the ports with a link down reason or neighbor link down reason equal to \fIvalue\fR. + + +.PP +The portion of the script that calls opareport and opaxmlextract follows: +.PP + +.br +opareport -x -d 10 -s -o errors -T $@ | opaxmlextract -d \; +.br + +-e Rate -e MTU -e LinkDetails -e CableLength -e CableLabel +.br + +-e CableDetails -e Port.NodeDesc -e Port.PortNum -e SymbolErrors.Value + +.br + +.SH Examples +opaextractstat topology\(ulfile +.br + +opaextractstat topology\(ulfile -c my\(ulopamon.conf diff --git a/IbaTools/man/opaextractstat2.manPage b/IbaTools/man/opaextractstat2.manPage index 66fb566..bbae570 100644 --- a/IbaTools/man/opaextractstat2.manPage +++ b/IbaTools/man/opaextractstat2.manPage @@ -1,470 +1,481 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opaextractstat2 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opaextractstat2 - -.NL - -.PP -Performs an error analysis of a fabric and provides augmented information from a topology\(ulfile including all error counters. The output is in a CSV format suitable for importing into a spreadsheet or parsed by other scripts. opaextractstat2 is a front end to the opareport and opaxmlextract tools. -.SH Syntax -.NL -opaextractstat2 topology\(ulfile [opareport \fIoptions\fR] -.SH Options -.NL - -.TP 10 ---help -.NL -Produces full help text. - -.TP 10 -topology\(ulfile -.NL -Specifies topology\(ulfile to use. - -.TP 10 -opareport \fIoptions\fR -.NL -The following options are passed to opareport. This subset is considered typical and useful for this command. By design, the tool ignores -o/--output report option. - -.RS -.TP 10 - -.sp --h/--hfi \fIhfi\fR -Specifies the HFI, numbered 1..n. Using 0 specifies that the -p \fIport\fR port is a system-wide port number. Default is 0. - -.RE - -.RS -.TP 10 - -.sp --p/--port \fIport\fR -Specifies the port, numbered 1..n. Using 0 specifies the first active port. Default is 0. - -.RE - -.RS -.TP 10 - -.sp --X/--infile \fIsnapshot\(ulinput\fR -Generates a report using the data in the snapshot\(ulinput file. snapshot\(ulinput must have been generated during a previous -o \fIsnapshot\fR run. When used, the -s, -i, -C, and -a options are ignored. \[aq]-\[aq] may be used as the snapshot\(ulinput to specify stdin. - -.RE - -.RS -.TP 10 - -.sp --i/--interval \fIseconds\fR -Obtains performance statistics over interval \fIseconds\fR. Clears all statistics, waits interval \fIseconds\fR, then generates report. Implies -s option. - -.RE - -.RS -.TP 10 - -.sp --b / --begin \fIdate\(ultime\fR -Obtains past performance stats over an interval beginning at \fIdate\(ultime\fR. Implies -s option. \fIdate\(ultime\fR may be a time entered as HH:MM[:SS] or date as mm/dd/YYYY, dd.mm.YYYY, YYYY-mm-dd or date followed by time; for example, "2016-07-04 14:40". Relative times are taken as "x [second|minute|hour|day](s) ago. - -.RE - -.RS -.TP 10 - -.sp --e / --end \fIdate\(ultime\fR -Obtains past performance stats over an interval ending at \fIdate\(ultime\fR. Implies -s option. - -.IP -\fIdate\(ultime\fR may be a time entered as HH:MM[:SS] or date as mm/dd/YYYY, dd.mm.YYYY, YYYY-mm-dd or date followed by time; for example, "2016-07-04 14:40". Relative times are taken as "x [second|minute|hour|day](s) ago. -.RE - -.RS -.TP 10 - -.sp --C/--clear -Clears performance statistics for all ports. Only statistics with error thresholds are cleared. A clear occurs after generating the report. - -.RE - -.RS -.TP 10 - -.sp --a/--clearall -Clears all performance statistics for all ports. - -.RE - -.RS -.TP 10 - -.sp --M/--pmadirect -Accesses performance statistics using direct PMA. - -.RE - -.RS -.TP 10 - -.sp --A/--allports -Gets PortInfo for down switch ports. Uses direct SMA to get this data. If used with -M, also gets PMA stats for down switch ports. - -.RE - -.RS -.TP 10 - -.sp --c/--config \fIfile\fR -Specifies the error thresholds configuration file. Default is /etc/opa/opamon.conf file. - -.RE - -.RS -.TP 10 - -.sp --L/--limit -Limits operation to exact specified focus with -F for port error counters check (-o \fIerrors\fR) and port counters clear (-C or -i). Normally, the neighbor of each selected port is also checked/cleared. Does not affect other reports. - -.RE - -.RS -.TP 10 - -.sp --F/--focus \fIpoint\fR -Specifies the focus area for report. Used for all reports except route to limit scope of report. Refer to -\fIPoint Syntax\fR -for details. - -.RE - -.NL - -.SH -h and -p options permit a variety of selections: -.NL - -.TP 10 --h 0 -.NL -First active port in system (Default). - -.TP 10 --h 0 -p 0 -.NL -First active port in system. - -.TP 10 --h \fIx\fR -.NL -First active port on HFI \fIx\fR. - -.TP 10 --h \fIx\fR \fI\fR-p 0 -.NL -First active port on HFI \fIx\fR. - -.TP 10 --h 0 -p \fIy\fR -.NL -Port \fIy\fR within system (no matter which ports are active). - -.TP 10 --h \fIx\fR \fI\fR-p \fIy\fR -.NL -HFI \fIx\fR, port \fIy\fR. - -.NL - -.SH Point Syntax -.NL - -.TP 10 -gid:\fIvalue\fR -.NL -\fIvalue\fR is numeric port GID of form: subnet:guid. - -.TP 10 -lid:\fIvalue\fR -.NL -\fIvalue\fR is numeric LID. - -.TP 10 -lid:value:node -.NL -\fIvalue\fR is numeric LID, selects entire node with given LID. - -.TP 10 -lid:\fIvalue\fR:port:\fIvalue2\fR -.NL -\fIvalue\fR is numeric LID of node, \fIvalue2\fR is port number. - -.TP 10 -portguid:\fIvalue\fR -.NL -\fIvalue\fR is numeric port GUID. - -.TP 10 -nodeguid:\fIvalue\fR -.NL -\fIvalue\fR is numeric node GUID. - -.TP 10 -nodeguid:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is numeric node GUID, \fIvalue2\fR is port number. - -.TP 10 -iocguid:\fIvalue\fR -.NL -\fIvalue\fR is numeric IOC GUID. - -.TP 10 -iocguid:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is numeric IOC GUID, \fIvalue2\fR is port number. - -.TP 10 -systemguid:\fIvalue\fR -.NL -\fIvalue\fR is numeric system image GUID. - -.TP 10 -systemguid:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is the numeric system image GUID, \fIvalue2\fR is port number. - -.TP 10 -ioc:\fIvalue\fR -.NL -\fIvalue\fR is IOC Profile ID String (IOC Name). - -.TP 10 -ioc:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is IOC Profile ID String (IOC Name), \fIvalue2\fR is port number. - -.TP 10 -iocpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for IOC Profile ID String (IOC Name). - -.TP 10 -iocpat:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is glob pattern for IOC Profile ID String (IOC Name), \fIvalue2\fR is port number. - -.TP 10 -ioctype:\fIvalue\fR -.NL -\fIvalue\fR is IOC type (SRP or OTHER). - -.TP 10 -ioctype:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is IOC type (SRP or OTHER); \fIvalue2\fR is port number. - -.TP 10 -node:\fIvalue\fR -.NL -\fIvalue\fR is node description (node name). - -.TP 10 -node:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is node description (node name), \fIvalue2\fR is port number. - -.TP 10 -nodepat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for node description (node name). - -.TP 10 -nodepat:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is the glob pattern for the node description (node name), \fIvalue2\fR is port number. - -.TP 10 -nodedetpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for node details. - -.TP 10 -nodedetpat:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is the glob pattern for the node details, \fIvalue2\fR is port number. - -.TP 10 -nodetype:\fIvalue\fR -.NL -\fIvalue\fR is node type (SW or FI). - -.TP 10 -nodetype:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is node type (SW or FI), \fIvalue2\fR is port number. - -.TP 10 -rate:\fIvalue\fR -.NL -\fIvalue\fR is string for rate (25g, 50g, 75g, 100g), omits switch mgmt port 0. - -.TP 10 -portstate:\fIvalue\fR -.NL -\fIvalue\fR is a string for state (down, init, armed, active, notactive, initarmed). - -.TP 10 -portphysstate:\fIvalue\fR -.NL -\fIvalue\fR is a string for PHYs state (polling, disabled, training, linkup, recovery, offline, test) - -.TP 10 -mtucap:\fIvalue\fR -.NL -\fIvalue\fR is MTU size (2048, 4096, 8192, 10240), omits switch mgmt port 0. - -.TP 10 -labelpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable label. - -.TP 10 -lengthpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable length. - -.TP 10 -cabledetpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable details. - -.TP 10 -cabinflenpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable info length. - -.TP 10 -cabinfvendnamepat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable info vendor name. - -.TP 10 -cabinfvendpnpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable info vendor part number. - -.TP 10 -cabinfvendrevpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable info vendor revision. - -.TP 10 -cabinfvendsnpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable info vendor serial number. - -.TP 10 -cabinftype:\fIvalue\fR -.NL -\fIvalue\fR is either optical, passive\(ulcopper, active\(ulcopper, or unknown. - -.TP 10 -linkdetpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for link details. - -.TP 10 -portdetpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for port details. - -.TP 10 -sm -.NL -Specifies the master subnet manager (SM). - -.TP 10 -smdetpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for SM details. - -.TP 10 -route:\fIpoint1\fR:\fIpoint2\fR -.NL -Specifies all ports along the routes between the two given points. - -.TP 10 -led:\fIvalue\fR -.NL -\fIvalue\fR is either on or off for LED port beacon. - -.TP 10 -linkqual:\fIvalue\fR -.NL -Specifies the ports with a link quality equal to \fIvalue\fR. - -.TP 10 -linkqualLE:\fIvalue\fR -.NL -Specifies the ports with a link quality less than or equal to \fIvalue\fR. - -.TP 10 -linkqualGE:\fIvalue\fR -.NL -Specifies the ports with a link quality greater than or equal to \fIvalue\fR. - -.TP 10 -nodepatfile:\fIFILENAME\fR -.NL -Specifies the name of file with the list of nodes. - -.TP 10 -nodepairpatfile:\fIFILENAME\fR -.NL -Specifies the name of file with the list of node pairs, separated by a colon. - -.NL - -.PP -The portion of the script that calls opareport and opaxmlextract follows:opareport -x -d 10 -s -o errors -T $@ | opaxmlextract -d \; -.br --e Rate -e MTU -e Internal -e LinkDetails -e CableLength -e CableLabel -.br --e CableDetails -e Port.NodeGUID -e Port.PortGUID -e Port.PortNum -.br --e Port.PortType -e Port.NodeDesc -e Port.PortDetails -.br --e PortXmitData.Value -e PortXmitPkts.Value -e PortRcvData.Value -.br --e PortRcvPkts.Value -e SymbolErrors.Value -e LinkErrorRecovery.Value -.br --e LinkDowned.Value -e PortRcvErrors.Value -.br --e PortRcvRemotePhysicalErrors.Value -e PortRcvSwitchRelayErrors.Value -.br --e PortXmitConstraintErrors.Value -e PortRcvConstraintErrors.Value -.br --e LocalLinkIntegrityErrors.Value -e ExcessiveBufferOverrunErrors.Value -.SH Examples -.NL -opaextractstat2 topology\(ulfile -.br -opaextractstat2 topology\(ulfile -c my\(ulopamon.conf +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opaextractstat2 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opaextractstat2 + + +.PP +Performs an error analysis of a fabric and provides augmented information from a topology\(ulfile including all error counters. The output is in a CSV format suitable for importing into a spreadsheet or parsed by other scripts. opaextractstat2 is a front end to the opareport and opaxmlextract tools. +.SH Syntax +opaextractstat2 topology\(ulfile [opareport \fIoptions\fR] +.SH Options + +.TP 10 +--help + +Produces full help text. + +.TP 10 +topology\(ulfile + +Specifies topology\(ulfile to use. + +.TP 10 +opareport \fIoptions\fR + +The following options are passed to opareport. This subset is considered typical and useful for this command. By design, the tool ignores -o/--output report option. + +.RS +.TP 10 + +.sp +-h/--hfi \fIhfi\fR +Specifies the HFI, numbered 1..n. Using 0 specifies that the -p \fIport\fR port is a system-wide port number. Default is 0. + +.RE + +.RS +.TP 10 + +.sp +-p/--port \fIport\fR +Specifies the port, numbered 1..n. Using 0 specifies the first active port. Default is 0. + +.RE + +.RS +.TP 10 + +.sp +-X/--infile \fIsnapshot\(ulinput\fR +Generates a report using the data in the snapshot\(ulinput file. snapshot\(ulinput must have been generated during a previous -o \fIsnapshot\fR run. When used, the -s, -i, -C, and -a options are ignored. \[aq]-\[aq] may be used as the snapshot\(ulinput to specify stdin. + +.RE + +.RS +.TP 10 + +.sp +-i/--interval \fIseconds\fR +Obtains performance statistics over interval \fIseconds\fR. Clears all statistics, waits interval \fIseconds\fR, then generates report. Implies -s option. + +.RE + +.RS +.TP 10 + +.sp +-b / --begin \fIdate\(ultime\fR +Obtains past performance stats over an interval beginning at \fIdate\(ultime\fR. Implies -s option. \fIdate\(ultime\fR may be a time entered as HH:MM[:SS] or date as mm/dd/YYYY, dd.mm.YYYY, YYYY-mm-dd or date followed by time; for example, "2016-07-04 14:40". Relative times are taken as "x [second|minute|hour|day](s) ago. + +.RE + +.RS +.TP 10 + +.sp +-e / --end \fIdate\(ultime\fR +Obtains past performance stats over an interval ending at \fIdate\(ultime\fR. Implies -s option. + +.IP +\fIdate\(ultime\fR may be a time entered as HH:MM[:SS] or date as mm/dd/YYYY, dd.mm.YYYY, YYYY-mm-dd or date followed by time; for example, "2016-07-04 14:40". Relative times are taken as "x [second|minute|hour|day](s) ago. +.RE + +.RS +.TP 10 + +.sp +-C/--clear +Clears performance statistics for all ports. Only statistics with error thresholds are cleared. A clear occurs after generating the report. + +.RE + +.RS +.TP 10 + +.sp +-a/--clearall +Clears all performance statistics for all ports. + +.RE + +.RS +.TP 10 + +.sp +-M/--pmadirect +Accesses performance statistics using direct PMA. + +.RE + +.RS +.TP 10 + +.sp +-A/--allports +Gets PortInfo for down switch ports. Uses direct SMA to get this data. If used with -M, also gets PMA stats for down switch ports. + +.RE + +.RS +.TP 10 + +.sp +-c/--config \fIfile\fR +Specifies the error thresholds configuration file. Default is /etc/opa/opamon.conf file. + +.RE + +.RS +.TP 10 + +.sp +-L/--limit +Limits operation to exact specified focus with -F for port error counters check (-o \fIerrors\fR) and port counters clear (-C or -i). Normally, the neighbor of each selected port is also checked/cleared. Does not affect other reports. + +.RE + +.RS +.TP 10 + +.sp +-F/--focus \fIpoint\fR +Specifies the focus area for report. Used for all reports except route to limit scope of report. Refer to +\fIPoint Syntax\fR +for details. + +.RE + + +.SH -h and -p options permit a variety of selections: + +.TP 10 +-h 0 + +First active port in system (Default). + +.TP 10 +-h 0 -p 0 + +First active port in system. + +.TP 10 +-h \fIx\fR + +First active port on HFI \fIx\fR. + +.TP 10 +-h \fIx\fR \fI\fR-p 0 + +First active port on HFI \fIx\fR. + +.TP 10 +-h 0 -p \fIy\fR + +Port \fIy\fR within system (no matter which ports are active). + +.TP 10 +-h \fIx\fR \fI\fR-p \fIy\fR + +HFI \fIx\fR, port \fIy\fR. + + +.SH Point Syntax + +.TP 10 +gid:\fIvalue\fR + +\fIvalue\fR is numeric port GID of form: subnet:guid. + +.TP 10 +lid:\fIvalue\fR + +\fIvalue\fR is numeric LID. + +.TP 10 +lid:value:node + +\fIvalue\fR is numeric LID, selects entire node with given LID. + +.TP 10 +lid:\fIvalue\fR:port:\fIvalue2\fR + +\fIvalue\fR is numeric LID of node, \fIvalue2\fR is port number. + +.TP 10 +portguid:\fIvalue\fR + +\fIvalue\fR is numeric port GUID. + +.TP 10 +nodeguid:\fIvalue\fR + +\fIvalue\fR is numeric node GUID. + +.TP 10 +nodeguid:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is numeric node GUID, \fIvalue2\fR is port number. + +.TP 10 +iocguid:\fIvalue\fR + +\fIvalue\fR is numeric IOC GUID. + +.TP 10 +iocguid:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is numeric IOC GUID, \fIvalue2\fR is port number. + +.TP 10 +systemguid:\fIvalue\fR + +\fIvalue\fR is numeric system image GUID. + +.TP 10 +systemguid:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is the numeric system image GUID, \fIvalue2\fR is port number. + +.TP 10 +ioc:\fIvalue\fR + +\fIvalue\fR is IOC Profile ID String (IOC Name). + +.TP 10 +ioc:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is IOC Profile ID String (IOC Name), \fIvalue2\fR is port number. + +.TP 10 +iocpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for IOC Profile ID String (IOC Name). + +.TP 10 +iocpat:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is glob pattern for IOC Profile ID String (IOC Name), \fIvalue2\fR is port number. + +.TP 10 +ioctype:\fIvalue\fR + +\fIvalue\fR is IOC type (SRP or OTHER). + +.TP 10 +ioctype:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is IOC type (SRP or OTHER); \fIvalue2\fR is port number. + +.TP 10 +node:\fIvalue\fR + +\fIvalue\fR is node description (node name). + +.TP 10 +node:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is node description (node name), \fIvalue2\fR is port number. + +.TP 10 +nodepat:\fIvalue\fR + +\fIvalue\fR is glob pattern for node description (node name). + +.TP 10 +nodepat:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is the glob pattern for the node description (node name), \fIvalue2\fR is port number. + +.TP 10 +nodedetpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for node details. + +.TP 10 +nodedetpat:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is the glob pattern for the node details, \fIvalue2\fR is port number. + +.TP 10 +nodetype:\fIvalue\fR + +\fIvalue\fR is node type (SW or FI). + +.TP 10 +nodetype:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is node type (SW or FI), \fIvalue2\fR is port number. + +.TP 10 +rate:\fIvalue\fR + +\fIvalue\fR is string for rate (25g, 50g, 75g, 100g), omits switch mgmt port 0. + +.TP 10 +portstate:\fIvalue\fR + +\fIvalue\fR is a string for state (down, init, armed, active, notactive, initarmed). + +.TP 10 +portphysstate:\fIvalue\fR + +\fIvalue\fR is a string for PHYs state (polling, disabled, training, linkup, recovery, offline, test) + +.TP 10 +mtucap:\fIvalue\fR + +\fIvalue\fR is MTU size (2048, 4096, 8192, 10240), omits switch mgmt port 0. + +.TP 10 +labelpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable label. + +.TP 10 +lengthpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable length. + +.TP 10 +cabledetpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable details. + +.TP 10 +cabinflenpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable info length. + +.TP 10 +cabinfvendnamepat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable info vendor name. + +.TP 10 +cabinfvendpnpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable info vendor part number. + +.TP 10 +cabinfvendrevpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable info vendor revision. + +.TP 10 +cabinfvendsnpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable info vendor serial number. + +.TP 10 +cabinftype:\fIvalue\fR + +\fIvalue\fR is either optical, passive\(ulcopper, active\(ulcopper, or unknown. + +.TP 10 +linkdetpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for link details. + +.TP 10 +portdetpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for port details. + +.TP 10 +sm + +Specifies the master subnet manager (SM). + +.TP 10 +smdetpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for SM details. + +.TP 10 +route:\fIpoint1\fR:\fIpoint2\fR + +Specifies all ports along the routes between the two given points. + +.TP 10 +led:\fIvalue\fR + +\fIvalue\fR is either on or off for LED port beacon. + +.TP 10 +linkqual:\fIvalue\fR + +Specifies the ports with a link quality equal to \fIvalue\fR. + +.TP 10 +linkqualLE:\fIvalue\fR + +Specifies the ports with a link quality less than or equal to \fIvalue\fR. + +.TP 10 +linkqualGE:\fIvalue\fR + +Specifies the ports with a link quality greater than or equal to \fIvalue\fR. + +.TP 10 +nodepatfile:\fIFILENAME\fR + +Specifies the name of file with the list of nodepats or node descriptions. + +.TP 10 +nodepairpatfile:\fIFILENAME\fR + +Specifies the name of file with the list of node pairs, separated by a colon. + +.TP 10 +ldr + +Specifies the ports with a non-zero link down reason or neighbor link down reason. + +.TP 10 +ldr:\fIvalue\fR + +Specifies the ports with a link down reason or neighbor link down reason equal to \fIvalue\fR. + + +.PP +The portion of the script that calls opareport and opaxmlextract follows:opareport -x -d 10 -s -o errors -T $@ | opaxmlextract -d \; +.br + +-e Rate -e MTU -e Internal -e LinkDetails -e CableLength -e CableLabel +.br + +-e CableDetails -e Port.NodeGUID -e Port.PortGUID -e Port.PortNum +.br + +-e Port.PortType -e Port.NodeDesc -e Port.PortDetails +.br + +-e PortXmitData.Value -e PortXmitPkts.Value -e PortRcvData.Value +.br + +-e PortRcvPkts.Value -e SymbolErrors.Value -e LinkErrorRecovery.Value +.br + +-e LinkDowned.Value -e PortRcvErrors.Value +.br + +-e PortRcvRemotePhysicalErrors.Value -e PortRcvSwitchRelayErrors.Value +.br + +-e PortXmitConstraintErrors.Value -e PortRcvConstraintErrors.Value +.br + +-e LocalLinkIntegrityErrors.Value -e ExcessiveBufferOverrunErrors.Value +.SH Examples +opaextractstat2 topology\(ulfile +.br + +opaextractstat2 topology\(ulfile -c my\(ulopamon.conf diff --git a/IbaTools/man/opafabricanalysis.manPage b/IbaTools/man/opafabricanalysis.manPage index bb300d2..629e245 100644 --- a/IbaTools/man/opafabricanalysis.manPage +++ b/IbaTools/man/opafabricanalysis.manPage @@ -1,322 +1,316 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opafabricanalysis 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opafabricanalysis - -.NL - -.PP - -\fB(All)\fR -Performs analysis of the fabric. -.SH Syntax -.NL -opafabricanalysis [-b|-e] [-s] [-d \fIdir\fR] [-c \fIfile\fR] [-t \fIportsfile\fR] -.br -[-p \fIports\fR] [-T \fItopology\(ulinput\fR] -.SH Options -.NL - -.TP 10 ---help -.NL -Produces full help text. -.TP 10 --b -.NL -Specifies the baseline mode. Default is compare/check mode. -.TP 10 --e -.NL -Evaluates health only. Default is compare/check mode. -.TP 10 --s -.NL -Saves history of failures (errors/differences). -.TP 10 --d dir -.NL -Specifies the top-level directory for saving baseline and history of failed checks. Default is /var/usr/lib/opa/analysis -.TP 10 --c file -.NL -Specifies the error thresholds config file.Default is /etc/opa/opamon.conf -.TP 10 --t portsfile -.NL -Specifies the file with list of local HFI ports used to access fabric(s) for analysis. Default is /etc/opa/ports -.TP 10 --p ports -.NL -Specifies the list of local HFI ports used to access fabrics for analysis. - -.IP -Default is first active port. The first HFI in the system is 1. The first port on an HFI is 1. Uses the format hfi:port, -.br -for example: -.RS -.TP 10 - -.sp -0:0 -First active port in system. - -.RE - -.RS -.TP 10 - -.sp -0:y -Port \fIy\fR within system. - -.RE - -.RS -.TP 10 - -.sp -x:0 -First active port on HFI \fIx\fR. - -.RE - -.RS -.TP 10 - -.sp -x:y -HFI \fIx\fR, port \fIy\fR. - -.RE - -.TP 10 --T \fItopology\(ulinput\fR -.NL -Specifies the name of topology input file to use. Any %P markers in this filename are replaced with the HFI:port being operated on (such as 0:0 or 1:2). Default is /etc/opa/topology.%P.xml. If -T NONE is specified, no topology input file is used. See -\fIDetails\fR -and -\fIopareport\fR -for more information. -.SH Example -.NL -opafabricanalysis -.br -opafabricanalysis -p \[aq]1:1 1:2 2:1 2:2\[aq] -.PP -The fabric analysis tool checks the following: -.IP \(bu -Fabric links (both internal to switch chassis and external cables) -.IP \(bu -Fabric components (nodes, links, SMs, systems, and their SMA configuration) -.IP \(bu -Fabric PMA error counters and link speed mismatches -.PP - -.B NOTE: -The comparison includes components on the fabric. Therefore, operations such as shutting down a server cause the server to no longer appear on the fabric and are flagged as a fabric change or failure by opafabricanalysis. - -.SH Environment Variables -.NL - -.PP -The following environment variables are also used by this command: -.TP 10 -\fBPORTS\fR -.NL -List of ports, used in absence of -t and -p. -.TP 10 -\fBPORTS\(ulFILE\fR -.NL -File containing list of ports, used in absence of -t and -p. -.TP 10 -\fBFF\(ulTOPOLOGY\(ulFILE\fR -.NL -File containing topology\(ulinput (may have %P marker in filename), used in absence of -T. -.TP 10 -\fBFF\(ulANALYSIS\(ulDIR\fR -.NL -Top-level directory for baselines and failed health checks. -.SH Details -.NL - -.PP -For simple fabrics, the Intel(R) Omni-Path Fabric Suite FastFabric Toolset host is connected to a single fabric. By default, the first active port on the FastFabric Toolset host is used to analyze the fabric. However, in more complex fabrics, the FastFabric Toolset host may be connected to more than one fabric or subnet. In this case, you can specify the ports or HFIs to use with one of the following methods: -.IP \(bu -On the command line using the -p option. -.IP \(bu -In a file specified using the -t option. -.IP \(bu -Through the environment variables \fBPORTS\fR or \fBPORTS\(ulFILE\fR. -.IP \(bu -Using the \fBPORTS\(ulFILE\fR configuration option in opafastfabric.conf. -.PP -If the specified port does not exist or is empty, the first active port on the local system is used. In more complex configurations, you must specify the exact ports to use for all fabrics to be analyzed. -.PP -You can specify the topology\(ulinput file to be used with one of the following methods: -.IP \(bu -On the command line using the -T option. -.IP \(bu -In a file specified through the environment variable \fBFF\(ulTOPOLOGY\(ulFILE\fR. -.IP \(bu -Using the ff\(ultopology\(ulfile configuration option in opafastfabric.conf. -.PP -If the specified file does not exist, no topology\(ulinput file is used. Alternately the filename can be specified as NONE to prevent use of an input file. -.PP -For more information on topology\(ulinput, refer to -\fIopareport\fR -. -.PP -By default, the error analysis includes PMA counters and slow links (that is, links running below enabled speeds). You can change this using the \fBFF\(ulFABRIC\(ulHEALTH\fR configuration parameter in opafastfabric.conf. This parameter specifies the opareport options and reports to be used for the health analysis. It also can specify the PMA counter clearing behavior (-I \fIseconds\fR, -C, or none at all). -.PP -When a topology\(ulinput file is used, it can also be useful to extend \fBFF\(ulFABRIC\(ulHEALTH\fR to include fabric topology verification options such as -o verifylinks. -.PP -The thresholds for PMA counter analysis default to /etc/opa/opamon.conf. However, you can specify an alternate configuration file for thresholds using the -c option. The opamon.si.conf file can also be used to check for any non-zero values for signal integrity (SI) counters. -.PP -All files generated by opafabricanalysis start with fabric in their file name. This is followed by the port selection option identifying the port used for the analysis. Default is 0:0. -.PP -The opafabricanalysis tool generates files such as the following within FF\(ulANALYSIS\(ulDIR : -.PP - -\fBHealth Check\fR - -.IP \(bu -latest/fabric.0:0.errors stdout of opareport for errors encountered during fabric error analysis. - -.IP \(bu -latest/fabric.0.0.errors.stderr stderr of opareport during fabric error analysis. - -.PP - -\fBBaseline\fR - -.PP -During a baseline run, the following files are also created in FF\(ulANALYSIS\(ulDIR/latest. -.IP \(bu -baseline/fabric.0:0.snapshot.xml opareport snapshot of complete fabric components and SMA configuration. - -.IP \(bu -baseline/fabric.0:0.comps opareport summary of fabric components and basic SMA configuration. - -.IP \(bu -baseline/fabric.0.0.links opareport summary of internal and external links. - -.PP - -\fBFull Analysis\fR - -.IP \(bu -latest/fabric.0:0.snapshot.xml opareport snapshot of complete fabric components and SMA configuration. - -.IP \(bu -latest/fabric.0:0.snapshot.stderr stderr of opareport during snapshot. - -.IP \(bu -latest/fabric.0:0.errors stdout of opareport for errors encountered during fabric error analysis. - -.IP \(bu -latest/fabric.0.0.errors.stderr stderr of opareport during fabric error analysis. - -.IP \(bu -latest/fabric.0:0.comps stdout of opareport for fabric components and SMA configuration. - -.IP \(bu -latest/fabric.0:0.comps.stderr stderr of opareport for fabric components. - -.IP \(bu -latest/fabric.0:0.comps.diff diff of baseline and latest fabric components. - -.IP \(bu -latest/fabric.0:0.links stdout of opareport summary of internal and external links. - -.IP \(bu -latest/fabric.0:0.links.stderr stderr of opareport summary of internal and external links. - -.IP \(bu -latest/fabric.0:0.links.diff diff of baseline and latest fabric internal and external links. - -.IP \(bu -latest/fabric.0:0.links.changes.stderr stderr of opareport comparison of links. - -.IP \(bu -latest/fabric.0:0.links.changes opareport comparison of links against baseline. This is typically easier to read than the links.diff file and contains the same information. - -.IP \(bu -latest/fabric.0:0.comps.changes.stderr stderr of opareport comparison of components. - -.IP \(bu -latest/fabric.0:0.comps.changes opareport comparison of components against baseline. This is typically easier to read than the comps.diff file and contains the same information. - -.PP -The .diff and .changes files are only created if differences are detected. -.PP -If the -s option is used and failures are detected, files related to the checks that failed are also copied to the time-stamped directory name under FF\(ulANALYSIS\(ulDIR. -.SH Fabric Items Checked Against the Baseline -.NL - -.PP -Based on opareport -o links: -.IP \(bu -Unconnected/down/missing cables -.IP \(bu -Added/moved cables -.IP \(bu -Changes in link width and speed -.IP \(bu -Changes to Node GUIDs in fabric (replacement of HFI or Switch hardware) -.IP \(bu -Adding/Removing Nodes [FI, Virtual FIs, Virtual Switches, Physical Switches, Physical Switch internal switching cards (leaf/spine)] -.IP \(bu -Changes to server or switch names -.PP -Based on opareport -o comps: -.IP \(bu -Overlap with items from links report -.IP \(bu -Changes in port MTU, LMC, number of VLs -.IP \(bu -Changes in port speed/width enabled or supported -.IP \(bu -Changes in HFI or switch device IDs/revisions/VendorID (for example, ASIC hardware changes) -.IP \(bu -Changes in port Capability mask (which features/agents run on port/server) -.IP \(bu -Changes to ErrorLimits and PKey enforcement per port -.IP \(bu -Changes to IOUs/IOCs/IOC Services provided - - -.PP -Location (port, node) and number of SMs in fabric. Includes: -.IP \(bu -Primary and backups -.IP \(bu -Configured priority for SM -.SH Fabric Items Also Checked During Health Check -.NL - -.PP -Based on opareport -s -C -o errors -o slowlinks: -.IP \(bu -PMA error counters on all Intel(R) Omni-Path Fabric ports (HFI, switch external and switch internal) checked against configurable thresholds. -.IP \(bu -Counters are cleared each time a health check is run. Each health check reflects a counter delta since last health check. -.IP \(bu -Typically identifies potential fabric errors, such as symbol errors. -.IP \(bu -May also identify transient congestion, depending on the counters that are monitored. -.IP \(bu -Link active speed/width as compared to Enabled speed. -.IP \(bu -Identifies links whose active speed/width is < min (enabled speed/width on each side of link). -.IP \(bu -This typically reflects bad cables or bad ports or poor connections. -.IP \(bu -Side effect is the verification of SA health. +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opafabricanalysis 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opafabricanalysis + + +.PP + +\fB(All)\fR +Performs analysis of the fabric. +.SH Syntax +opafabricanalysis [-b|-e] [-s] [-d \fIdir\fR] [-c \fIfile\fR] [-t \fIportsfile\fR] +.br +[-p \fIports\fR] +[-T \fItopology\(ulinput\fR] +.SH Options + +.TP 10 +--help + +Produces full help text. +.TP 10 +-b + +Specifies the baseline mode. Default is compare/check mode. +.TP 10 +-e + +Evaluates health only. Default is compare/check mode. +.TP 10 +-s + +Saves history of failures (errors/differences). +.TP 10 +-d dir + +Specifies the top-level directory for saving baseline and history of failed checks. Default is /var/usr/lib/opa/analysis +.TP 10 +-c file + +Specifies the error thresholds config file.Default is /etc/opa/opamon.conf +.TP 10 +-t portsfile + +Specifies the file with list of local HFI ports used to access fabric(s) for analysis. Default is /etc/opa/ports +.TP 10 +-p ports + +Specifies the list of local HFI ports used to access fabrics for analysis. + +.IP +Default is first active port. The first HFI in the system is 1. The first port on an HFI is 1. Uses the format hfi:port, +.br +for example: +.RS +.TP 10 + +.sp +0:0 +First active port in system. + +.RE + +.RS +.TP 10 + +.sp +0:y +Port \fIy\fR within system. + +.RE + +.RS +.TP 10 + +.sp +x:0 +First active port on HFI \fIx\fR. + +.RE + +.RS +.TP 10 + +.sp +x:y +HFI \fIx\fR, port \fIy\fR. + +.RE + +.TP 10 +-T \fItopology\(ulinput\fR + +Specifies the name of topology input file to use. Any %P markers in this filename are replaced with the HFI:port being operated on (such as 0:0 or 1:2). Default is /etc/opa/topology.%P.xml. If -T NONE is specified, no topology input file is used. See +\fIDetails\fR +and +\fIopareport\fR +for more information. +.SH Example +opafabricanalysis +.br + +opafabricanalysis -p \[aq]1:1 1:2 2:1 2:2\[aq] +.PP +The fabric analysis tool checks the following: +.IP \(bu +Fabric links (both internal to switch chassis and external cables) +.IP \(bu +Fabric components (nodes, links, SMs, systems, and their SMA configuration) +.IP \(bu +Fabric PMA error counters and link speed mismatches +.PP + +.B NOTE: +The comparison includes components on the fabric. Therefore, operations such as shutting down a server cause the server to no longer appear on the fabric and are flagged as a fabric change or failure by opafabricanalysis. + +.SH Environment Variables + +.PP +The following environment variables are also used by this command: +.TP 10 +\fBPORTS\fR + +List of ports, used in absence of -t and -p. +.TP 10 +\fBPORTS\(ulFILE\fR + +File containing list of ports, used in absence of -t and -p. +.TP 10 +\fBFF\(ulTOPOLOGY\(ulFILE\fR + +File containing topology\(ulinput (may have %P marker in filename), used in absence of -T. +.TP 10 +\fBFF\(ulANALYSIS\(ulDIR\fR + +Top-level directory for baselines and failed health checks. +.SH Details + +.PP +For simple fabrics, the Intel(R) Omni-Path Fabric Suite FastFabric Toolset host is connected to a single fabric. By default, the first active port on the FastFabric Toolset host is used to analyze the fabric. However, in more complex fabrics, the FastFabric Toolset host may be connected to more than one fabric or subnet. In this case, you can specify the ports or HFIs to use with one of the following methods: +.IP \(bu +On the command line using the -p option. +.IP \(bu +In a file specified using the -t option. +.IP \(bu +Through the environment variables \fBPORTS\fR or \fBPORTS\(ulFILE\fR. +.IP \(bu +Using the \fBPORTS\(ulFILE\fR configuration option in opafastfabric.conf. +.PP +If the specified port does not exist or is empty, the first active port on the local system is used. In more complex configurations, you must specify the exact ports to use for all fabrics to be analyzed. +.PP +You can specify the topology\(ulinput file to be used with one of the following methods: +.IP \(bu +On the command line using the -T option. +.IP \(bu +In a file specified through the environment variable \fBFF\(ulTOPOLOGY\(ulFILE\fR. +.IP \(bu +Using the ff\(ultopology\(ulfile configuration option in opafastfabric.conf. +.PP +If the specified file does not exist, no topology\(ulinput file is used. Alternately the filename can be specified as NONE to prevent use of an input file. +.PP +For more information on topology\(ulinput, refer to +\fIopareport\fR +. +.PP +By default, the error analysis includes PMA counters and slow links (that is, links running below enabled speeds). You can change this using the \fBFF\(ulFABRIC\(ulHEALTH\fR configuration parameter in opafastfabric.conf. This parameter specifies the opareport options and reports to be used for the health analysis. It also can specify the PMA counter clearing behavior (-I \fIseconds\fR, -C, or none at all). +.PP +When a topology\(ulinput file is used, it can also be useful to extend \fBFF\(ulFABRIC\(ulHEALTH\fR to include fabric topology verification options such as -o verifylinks. +.PP +The thresholds for PMA counter analysis default to /etc/opa/opamon.conf. However, you can specify an alternate configuration file for thresholds using the -c option. The opamon.si.conf file can also be used to check for any non-zero values for signal integrity (SI) counters. +.PP +All files generated by opafabricanalysis start with fabric in their file name. This is followed by the port selection option identifying the port used for the analysis. Default is 0:0. +.PP +The opafabricanalysis tool generates files such as the following within FF\(ulANALYSIS\(ulDIR : +.PP + +\fBHealth Check\fR + +.IP \(bu +latest/fabric.0:0.errors stdout of opareport for errors encountered during fabric error analysis. + +.IP \(bu +latest/fabric.0.0.errors.stderr stderr of opareport during fabric error analysis. + +.PP + +\fBBaseline\fR + +.PP +During a baseline run, the following files are also created in FF\(ulANALYSIS\(ulDIR/latest. +.IP \(bu +baseline/fabric.0:0.snapshot.xml opareport snapshot of complete fabric components and SMA configuration. + +.IP \(bu +baseline/fabric.0:0.comps opareport summary of fabric components and basic SMA configuration. + +.IP \(bu +baseline/fabric.0.0.links opareport summary of internal and external links. + +.PP + +\fBFull Analysis\fR + +.IP \(bu +latest/fabric.0:0.snapshot.xml opareport snapshot of complete fabric components and SMA configuration. + +.IP \(bu +latest/fabric.0:0.snapshot.stderr stderr of opareport during snapshot. + +.IP \(bu +latest/fabric.0:0.errors stdout of opareport for errors encountered during fabric error analysis. + +.IP \(bu +latest/fabric.0.0.errors.stderr stderr of opareport during fabric error analysis. + +.IP \(bu +latest/fabric.0:0.comps stdout of opareport for fabric components and SMA configuration. + +.IP \(bu +latest/fabric.0:0.comps.stderr stderr of opareport for fabric components. + +.IP \(bu +latest/fabric.0:0.comps.diff diff of baseline and latest fabric components. + +.IP \(bu +latest/fabric.0:0.links stdout of opareport summary of internal and external links. + +.IP \(bu +latest/fabric.0:0.links.stderr stderr of opareport summary of internal and external links. + +.IP \(bu +latest/fabric.0:0.links.diff diff of baseline and latest fabric internal and external links. + +.IP \(bu +latest/fabric.0:0.links.changes.stderr stderr of opareport comparison of links. + +.IP \(bu +latest/fabric.0:0.links.changes opareport comparison of links against baseline. This is typically easier to read than the links.diff file and contains the same information. + +.IP \(bu +latest/fabric.0:0.comps.changes.stderr stderr of opareport comparison of components. + +.IP \(bu +latest/fabric.0:0.comps.changes opareport comparison of components against baseline. This is typically easier to read than the comps.diff file and contains the same information. + +.PP +The .diff and .changes files are only created if differences are detected. +.PP +If the -s option is used and failures are detected, files related to the checks that failed are also copied to the time-stamped directory name under FF\(ulANALYSIS\(ulDIR. +.SH Fabric Items Checked Against the Baseline + +.PP +Based on opareport -o links: +.IP \(bu +Unconnected/down/missing cables +.IP \(bu +Added/moved cables +.IP \(bu +Changes in link width and speed +.IP \(bu +Changes to Node GUIDs in fabric (replacement of HFI or Switch hardware) +.IP \(bu +Adding/Removing Nodes [FI, Virtual FIs, Virtual Switches, Physical Switches, Physical Switch internal switching cards (leaf/spine)] +.IP \(bu +Changes to server or switch names +.PP +Based on opareport -o comps: +.IP \(bu +Overlap with items from links report +.IP \(bu +Changes in port MTU, LMC, number of VLs +.IP \(bu +Changes in port speed/width enabled or supported +.IP \(bu +Changes in HFI or switch device IDs/revisions/VendorID (for example, ASIC hardware changes) +.IP \(bu +Changes in port Capability mask (which features/agents run on port/server) +.IP \(bu +Changes to ErrorLimits and PKey enforcement per port +.IP \(bu +Changes to IOUs/IOCs/IOC Services provided + + +.PP +Location (port, node) and number of SMs in fabric. Includes: +.IP \(bu +Primary and backups +.IP \(bu +Configured priority for SM +.SH Fabric Items Also Checked During Health Check + +.PP +Based on opareport -s -C -o errors -o slowlinks: +.IP \(bu +PMA error counters on all Intel(R) Omni-Path Fabric ports (HFI, switch external and switch internal) checked against configurable thresholds. +.IP \(bu +Counters are cleared each time a health check is run. Each health check reflects a counter delta since last health check. +.IP \(bu +Typically identifies potential fabric errors, such as symbol errors. +.IP \(bu +May also identify transient congestion, depending on the counters that are monitored. +.IP \(bu +Link active speed/width as compared to Enabled speed. +.IP \(bu +Identifies links whose active speed/width is < min (enabled speed/width on each side of link). +.IP \(bu +This typically reflects bad cables or bad ports or poor connections. +.IP \(bu +Side effect is the verification of SA health. diff --git a/IbaTools/man/opafabricinfo.manPage b/IbaTools/man/opafabricinfo.manPage index fe41165..bb4f12f 100644 --- a/IbaTools/man/opafabricinfo.manPage +++ b/IbaTools/man/opafabricinfo.manPage @@ -1,194 +1,198 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opafabricinfo 1 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opafabricinfo - -.NL - -.PP -Provides a brief summary of the components in the fabric, using the first active port on the given local host to perform its analysis. opafabricinfo is supplied in both: -.IP \(bu -Intel(R) Omni-Path Fabric Suite FastFabric Toolset -In this situation, the command can manage more than one fabric (subnet). - -.IP \(bu -FastFabric Tools -In this situation, the command performs analysis against the first active port on the system only. It takes no options and uses no environment variables. - -.PP -opafabricinfo can be very useful as a quick assessment of the fabric state. It can be run against a known good fabric to identify its components and then later run to see if anything has changed about the fabric configuration or state. -.PP -For more extensive fabric analysis, use opareport, opareports, and opatop. These tools can be found in the -\fIIntel(R) Omni-Path Fabric Suite FastFabric User Guide\fR - -. -.SH Syntax -.NL -opafabricinfo [-t \fIportsfile\fR] [-p \fIports\fR] -.SH Options -.NL - -.TP 10 ---help -.NL -Produces full help text. -.TP 10 --t \fIportsfile\fR -.NL -Specifies the file with list of local HFI ports used to access fabric(s) for analysis. Default is /etc/opa/ports file. -.TP 10 --p \fIports\fR -.NL -Specifies the list of local HFI ports used to access fabrics for analysis. - -.IP -Default is first active port. The first HFI in the system is 1. The first port on an HFI is 1. Uses the format hfi:port, -.br -for example: -.RS -.TP 10 - -.sp -0:0 -First active port in system. - -.RE - -.RS -.TP 10 - -.sp -0:y -Port \fIy\fR within system. - -.RE - -.RS -.TP 10 - -.sp -x:0 -First active port on HFI \fIx\fR. - -.RE - -.RS -.TP 10 - -.sp -x:y -HFI \fIx\fR, port \fIy\fR. - -.RE - -.SH Environment Variables -.NL - -.PP -The following environment variables are also used by this command: -.TP 10 -\fBPORTS\fR -.NL -List of ports, used in absence of -t and -p. -.TP 10 -\fBPORTS\(ulFILE\fR -.NL -File containing list of ports, used in absence of -t and -p. - -.IP -For simple fabrics, the Intel(R) Omni-Path Fabric Suite FastFabric Toolset host is connected to a single fabric. By default, the first active port on the FastFabric Toolset host is used to analyze the fabric. However, in more complex fabrics, the FastFabric Toolset host may be connected to more than one fabric or subnet. In this case, you can specify the ports or HFIs to use with one of the following methods: -.RS - -.IP \(bu -On the command line using the -p option. -.IP \(bu -In a file specified using the -t option. -.IP \(bu -Through the environment variables \fBPORTS\fR or \fBPORTS\(ulFILE\fR. -.IP \(bu -Using the ports\(ulfile configuration option in opafastfabric.conf. - -.RE - -.IP -If the specified port does not exist or is empty, the first active port on the local system is used. In more complex configurations, you must specify the exact ports to use for all fabrics to be analyzed. -.SH Example -.NL -opafabricinfo -.br -opafabricinfo -p \[aq]1:1 1:2 2:1 2:2\[aq] -.PP - -\fBOutput example\fR - -.br -# opafabricinfo -.br -Fabric 0:0 Information: -.br -SM: hds1fnb6241 hfi1\(ul0 Guid: 0x0011750101575ffe State: Master -.br -Number of HFIs: 8 -.br -Number of Switches: 1 -.br -Number of Links: 8 -.br -Number of HFI Links: 8 (Internal: 0 External: 8) -.br -Number of ISLs: 0 (Internal: 0 External: 0) -.br -Number of Degraded Links: 0 (HFI Links: 0 ISLs: 0) -.br -Number of Omitted Links: 0 (HFI Links: 0 ISLs: 0) -.SH Output Definitions -.NL - -.TP 10 -SM -.NL -Each subnet manger (SM) running in the fabric is listed along with its node name, port GUID, and present SM state (Master, Standby, etc.). -.TP 10 -Number of HFIs -.NL -Number of unique host fabric interfaces (HFIs) in the fabric. An FI with two connected ports is counted as a single FI. -.TP 10 -.BR - -.PP - -.B NOTE: -Fabric Interfaces include HFIs in servers as well as HFIs within I/O Modules, Native Storage, etc. - - -.TP 10 -Number of Switches -.NL -Number of connected switches in the fabric. -.TP 10 -Number of Links -.NL -Number of links in the fabric. Note that a large switch may have internal links. -.TP 10 -Number of HFI Links -.NL -Number of HFI links (Internal and External) in the fabric. -.TP 10 -Number of ISLs -.NL -Number of Interswitch Links (Internal and External) in the fabric. -.TP 10 -Number of Degraded Links -.NL -Number of degraded links (HSI and ISL) in the fabric. -.TP 10 -Number of Omitted Links -.NL -Number of omitted links (HSI and ISL) in the fabric. +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opafabricinfo 1 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opafabricinfo + + +.PP +Provides a brief summary of the components in the fabric, using the first active port on the given local host to perform its analysis. opafabricinfo is supplied in both: +.IP \(bu +Intel(R) Omni-Path Fabric Suite FastFabric Toolset +In this situation, the command can manage more than one fabric (subnet). + +.IP \(bu +FastFabric Tools +In this situation, the command performs analysis against the first active port on the system only. It takes no options and uses no environment variables. + +.PP +opafabricinfo can be very useful as a quick assessment of the fabric state. It can be run against a known good fabric to identify its components and then later run to see if anything has changed about the fabric configuration or state. +.PP +For more extensive fabric analysis, use opareport, opareports, and opatop. These tools can be found in the +\fIIntel(R) Omni-Path Fabric Suite FastFabric User Guide\fR + +. +.SH Syntax +opafabricinfo [-t \fIportsfile\fR] [-p \fIports\fR] +.SH Options + +.TP 10 +--help + +Produces full help text. +.TP 10 +-t \fIportsfile\fR + +Specifies the file with list of local HFI ports used to access fabric(s) for analysis. Default is /etc/opa/ports file. +.TP 10 +-p \fIports\fR + +Specifies the list of local HFI ports used to access fabrics for analysis. + +.IP +Default is first active port. The first HFI in the system is 1. The first port on an HFI is 1. Uses the format hfi:port, +.br +for example: +.RS +.TP 10 + +.sp +0:0 +First active port in system. + +.RE + +.RS +.TP 10 + +.sp +0:y +Port \fIy\fR within system. + +.RE + +.RS +.TP 10 + +.sp +x:0 +First active port on HFI \fIx\fR. + +.RE + +.RS +.TP 10 + +.sp +x:y +HFI \fIx\fR, port \fIy\fR. + +.RE + +.SH Environment Variables + +.PP +The following environment variables are also used by this command: +.TP 10 +\fBPORTS\fR + +List of ports, used in absence of -t and -p. +.TP 10 +\fBPORTS\(ulFILE\fR + +File containing list of ports, used in absence of -t and -p. + +.IP +For simple fabrics, the Intel(R) Omni-Path Fabric Suite FastFabric Toolset host is connected to a single fabric. By default, the first active port on the FastFabric Toolset host is used to analyze the fabric. However, in more complex fabrics, the FastFabric Toolset host may be connected to more than one fabric or subnet. In this case, you can specify the ports or HFIs to use with one of the following methods: +.RS + +.IP \(bu +On the command line using the -p option. +.IP \(bu +In a file specified using the -t option. +.IP \(bu +Through the environment variables \fBPORTS\fR or \fBPORTS\(ulFILE\fR. +.IP \(bu +Using the ports\(ulfile configuration option in opafastfabric.conf. + +.RE + +.IP +If the specified port does not exist or is empty, the first active port on the local system is used. In more complex configurations, you must specify the exact ports to use for all fabrics to be analyzed. +.SH Example +opafabricinfo +.br + +opafabricinfo -p \[aq]1:1 1:2 2:1 2:2\[aq] +.PP + +\fBOutput example\fR + +.br +# opafabricinfo +.br + +Fabric 0:0 Information: +.br + +SM: hds1fnb6241 hfi1\(ul0 Guid: 0x0011750101575ffe State: Master +.br + +Number of HFIs: 8 +.br + +Number of Switches: 1 +.br + +Number of Links: 8 +.br + +Number of HFI Links: 8 (Internal: 0 External: 8) +.br + +Number of ISLs: 0 (Internal: 0 External: 0) +.br + +Number of Degraded Links: 0 (HFI Links: 0 ISLs: 0) +.br + +Number of Omitted Links: 0 (HFI Links: 0 ISLs: 0) +.SH Output Definitions + +.TP 10 +SM + +Each subnet manger (SM) running in the fabric is listed along with its node name, port GUID, and present SM state (Master, Standby, etc.). +.TP 10 +Number of HFIs + +Number of unique host fabric interfaces (HFIs) in the fabric. An FI with two connected ports is counted as a single FI. +.TP 10 +.BR + +.PP + +.B NOTE: +Fabric Interfaces include HFIs in servers as well as HFIs within I/O Modules, Native Storage, etc. + + +.TP 10 +Number of Switches + +Number of connected switches in the fabric. +.TP 10 +Number of Links + +Number of links in the fabric. Note that a large switch may have internal links. +.TP 10 +Number of HFI Links + +Number of HFI links (Internal and External) in the fabric. +.TP 10 +Number of ISLs + +Number of Interswitch Links (Internal and External) in the fabric. +.TP 10 +Number of Degraded Links + +Number of degraded links (HSI and ISL) in the fabric. +.TP 10 +Number of Omitted Links + +Number of omitted links (HSI and ISL) in the fabric. diff --git a/IbaTools/man/opafastfabric.manPage b/IbaTools/man/opafastfabric.manPage index 91fee9f..2b185fa 100644 --- a/IbaTools/man/opafastfabric.manPage +++ b/IbaTools/man/opafastfabric.manPage @@ -1,54 +1,60 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opafastfabric 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opafastfabric - -.NL - -.PP - -\fB(Switch and Host)\fR -Starts the top-level Intel(R) Omni-Path Fabric Suite FastFabric Text-based User Interface (TUI) menu to enable setup and configuration. -.PP -Refer to the -\fIIntel(R) Omni-Path Fabric Suite FastFabric User Guide\fR - -for details on this tool. -.SH Syntax -.NL -opafastfabric -.SH Options -.NL - -.PP -None. -.SH Example -.NL -#opafastfabric -.br - Intel FastFabric OPA Tools -.br - Version: \fIX.X.X.X.X\fR -.br - -.br - 1) Chassis Setup/Admin -.br - 2) Externally Managed Switch Setup/Admin -.br - 3) Host Setup -.br - 4) Host Verification/Admin -.br - 5) Fabric Monitoring -.br - -.br - X) Exit (or Q) +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opafastfabric 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opafastfabric + + +.PP + +\fB(Switch and Host)\fR +Starts the top-level Intel(R) Omni-Path Fabric Suite FastFabric Text-based User Interface (TUI) menu to enable setup and configuration. +.PP +Refer to the +\fIIntel(R) Omni-Path Fabric Suite FastFabric User Guide\fR + +for details on this tool. +.SH Syntax +opafastfabric +.SH Options + +.PP +None. +.SH Example +#opafastfabric +.br + + Intel FastFabric OPA Tools +.br + + Version: \fIX.X.X.X.X\fR +.br + + +.br + + 1) Chassis Setup/Admin +.br + + 2) Externally Managed Switch Setup/Admin +.br + + 3) Host Setup +.br + + 4) Host Verification/Admin +.br + + 5) Fabric Monitoring +.br + + +.br + + X) Exit (or Q) diff --git a/IbaTools/man/opafindgood.manPage b/IbaTools/man/opafindgood.manPage index f2d305f..fc36398 100644 --- a/IbaTools/man/opafindgood.manPage +++ b/IbaTools/man/opafindgood.manPage @@ -1,198 +1,212 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opafindgood 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opafindgood - -.NL - -.PP -Checks for hosts that are able to be pinged, accessed via SSH, and active on the Intel(R) Omni-Path Fabric. Produces a list of good hosts meeting all criteria. Typically used to identify good hosts to undergo further testing and benchmarking during initial cluster staging and startup. -.PP -The resulting good file lists each good host exactly once and can be used as input to create \fImpi\(ulhosts\fR files for running mpi\(ulapps and the HFI-SW cable test. The files alive, running, active, good, and bad are created in the selected directory listing hosts passing each criteria. -.PP -This command assumes the Node Description for each host is based on the \fIhostname\fR-s output in conjunction with an optional hfi1\(ul# suffix. When using a /etc/opa/hosts file that lists the hostnames, this assumption may not be correct. -.PP -This command automatically generates the file FF\(ulRESULT\(ulDIR/punchlist.csv. This file provides a concise summary of the bad hosts found. This can be imported into Excel directly as a *.csv file. Alternatively, it can be cut/pasted into Excel, and the -\fBData/Text to Columns\fR -toolbar can be used to separate the information into multiple columns at the semicolons. -.PP -A sample generated output is: -.PP - -.br -# opafindgood -.br -3 hosts will be checked -.br -2 hosts are pingable (alive) -.br -2 hosts are ssh\[aq]able (running) -.br -2 total hosts have FIs active on one or more fabrics (active) -.br -No Quarantine Node Records Returned -.br -1 hosts are alive, running, active (good) -.br -2 hosts are bad (bad) -.br -Bad hosts have been added to /root/punchlist.csv -.br -# cat /root/punchlist.csv -.br -2015/10/04 11:33:22;phs1fnivd13u07n1 hfi1\(ul0 p1 phs1swivd13u06 p16;Link errors -.br -2015/10/07 10:21:05;phs1swivd13u06;Switch not found in SA DB -.br -2015/10/09 14:36:48;phs1fnivd13u07n4;Doesn\[aq]t ping -.br -2015/10/09 14:36:48;phs1fnivd13u07n3;No active port - -.br - -.PP -For a given run, a line is generated for each failing host. Hosts are reported exactly once for a given run. Therefore, a host that does not ping is NOT listed as can\[aq]t ssh nor No active port. There may be cases where ports could be active for hosts that do not ping, especially if Ethernet host names are used for the ping test. However, the lack of ping often implies there are other fundamental issues, such as PXE boot or inability to access DNS or DHCP to get proper host name and IP address. Therefore, reporting hosts that do not ping is typically of limited value. -.PP -Note that opafindgood queries the SA for NodeDescriptions to determine hosts with active ports. As such, ports may be active for hosts that cannot be accessed via SSH or pinged. -.PP -By default, opafindgood checks for and reports nodes that are quarantined for security reasons. To skip this, use the -Q option. -.SH Syntax -.NL -opafindgood [-R|-A|-Q] [-d \fIdir\fR] [-f \fIhostfile\fR] [-h \[aq]\fIhosts\fR\[aq]] -.br -[-t \fIportsfile\fR] [-p \fIports\fR] [-T \fItimelimit\fR] -.SH Options -.NL - -.TP 10 ---help -.NL -Produces full help text. -.TP 10 --R -.NL -Skips the running test (SSH). Recommended if password-less SSH is not set up. -.TP 10 --A -.NL -Skips the active test. Recommended if Intel(R) Omni-Path Fabric software or fabric is not up. -.TP 10 --Q -.NL -Skips the quarantine test. Recommended if Intel(R) Omni-Path Fabric software or fabric is not up. -.TP 10 --d \fIdir\fR -.NL -Specifies the directory in which to create alive, active, running, good, and bad files. Default is /etc/opa directory. -.TP 10 --f \fIhostfile\fR -.NL -Specifies the file with hosts in cluster. Default is /etc/opa/hosts directory. -.TP 10 --h \fIhosts\fR -.NL -Specifies the list of hosts to ping. -.TP 10 --t \fIportsfile\fR -.NL -Specifies the file with list of local HFI ports used to access fabric(s) for analysis. Default is /etc/opa/ports file. -.TP 10 --p \fIports\fR -.NL -Specifies the list of local HFI ports used to access fabric(s) for analysis. - -.IP -Default is first active port. The first HFI in the system is 1. The first port on an HFI is 1. Uses the format hfi:port, -.br -for example: -.RS -.TP 10 - -.sp -0:0 -First active port in system. - -.RE - -.RS -.TP 10 - -.sp -0:y -Port \fIy\fR within system. - -.RE - -.RS -.TP 10 - -.sp -x:0 -First active port on HFI \fIx\fR. - -.RE - -.RS -.TP 10 - -.sp -x:y -HFI \fIx\fR, port \fIy\fR. - -.RE - -.TP 10 --T \fItimelimit\fR -.NL -Specifies the time limit in seconds for host to respond to SSH. Default is 20 seconds. - -.SH Environment Variables -.NL - -.PP -The following environment variables are also used by this command: -.TP 10 -\fBHOSTS\fR -.NL -List of hosts, used if -h option not supplied. - -.TP 10 -\fBHOSTS\(ulFILE\fR -.NL -File containing list of hosts, used in absence of -f and -h. - -.TP 10 -\fBPORTS\fR -.NL -List of ports, used in absence of -t and -p. - -.TP 10 -\fBPORTS\(ulFILE\fR -.NL -File containing list of ports, used in absence of -t and -p. - -.TP 10 -\fBFF\(ulMAX\(ulPARALLEL\fR -.NL -Maximum concurrent operations. - -.SH Examples -.NL -opafindgood -.br -opafindgood -f allhosts -.br -opafindgood -h \[aq]arwen elrond\[aq] -.br -HOSTS=\[aq]arwen elrond\[aq] opafindgood -.br -HOSTS\(ulFILE=allhosts opafindgood -.br -opafindgood -p \[aq]1:1 1:2 2:1 2:2\[aq] +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opafindgood 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opafindgood + + +.PP +Checks for hosts that are able to be pinged, accessed via SSH, and active on the Intel(R) Omni-Path Fabric. Produces a list of good hosts meeting all criteria. Typically used to identify good hosts to undergo further testing and benchmarking during initial cluster staging and startup. +.PP +The resulting good file lists each good host exactly once and can be used as input to create \fImpi\(ulhosts\fR files for running mpi\(ulapps and the HFI-SW cable test. The files alive, running, active, good, and bad are created in the selected directory listing hosts passing each criteria. +.PP +This command assumes the Node Description for each host is based on the \fIhostname\fR-s output in conjunction with an optional hfi1\(ul# suffix. When using a /etc/opa/hosts file that lists the hostnames, this assumption may not be correct. +.PP +This command automatically generates the file FF\(ulRESULT\(ulDIR/punchlist.csv. This file provides a concise summary of the bad hosts found. This can be imported into Excel directly as a *.csv file. Alternatively, it can be cut/pasted into Excel, and the +\fBData/Text to Columns\fR +toolbar can be used to separate the information into multiple columns at the semicolons. +.PP +A sample generated output is: +.PP + +.br +# opafindgood +.br + +3 hosts will be checked +.br + +2 hosts are pingable (alive) +.br + +2 hosts are ssh\[aq]able (running) +.br + +2 total hosts have FIs active on one or more fabrics (active) +.br + +No Quarantine Node Records Returned +.br + +1 hosts are alive, running, active (good) +.br + +2 hosts are bad (bad) +.br + +Bad hosts have been added to /root/punchlist.csv +.br + +# cat /root/punchlist.csv +.br + +2015/10/04 11:33:22;phs1fnivd13u07n1 hfi1\(ul0 p1 phs1swivd13u06 p16;Link errors +.br + +2015/10/07 10:21:05;phs1swivd13u06;Switch not found in SA DB +.br + +2015/10/09 14:36:48;phs1fnivd13u07n4;Doesn\[aq]t ping +.br + +2015/10/09 14:36:48;phs1fnivd13u07n3;No active port + +.br + +.PP +For a given run, a line is generated for each failing host. Hosts are reported exactly once for a given run. Therefore, a host that does not ping is NOT listed as can\[aq]t ssh nor No active port. There may be cases where ports could be active for hosts that do not ping, especially if Ethernet host names are used for the ping test. However, the lack of ping often implies there are other fundamental issues, such as PXE boot or inability to access DNS or DHCP to get proper host name and IP address. Therefore, reporting hosts that do not ping is typically of limited value. +.PP +Note that opafindgood queries the SA for NodeDescriptions to determine hosts with active ports. As such, ports may be active for hosts that cannot be accessed via SSH or pinged. +.PP +By default, opafindgood checks for and reports nodes that are quarantined for security reasons. To skip this, use the -Q option. +.SH Syntax +opafindgood [-R|-A|-Q] [-d \fIdir\fR] [-f \fIhostfile\fR] [-h \[aq]\fIhosts\fR\[aq]] +.br +[-t \fIportsfile\fR] +[-p \fIports\fR] [-T \fItimelimit\fR] +.SH Options + +.TP 10 +--help + +Produces full help text. +.TP 10 +-R + +Skips the running test (SSH). Recommended if password-less SSH is not set up. +.TP 10 +-A + +Skips the active test. Recommended if Intel(R) Omni-Path Fabric software or fabric is not up. +.TP 10 +-Q + +Skips the quarantine test. Recommended if Intel(R) Omni-Path Fabric software or fabric is not up. +.TP 10 +-d \fIdir\fR + +Specifies the directory in which to create alive, active, running, good, and bad files. Default is /etc/opa directory. +.TP 10 +-f \fIhostfile\fR + +Specifies the file with hosts in cluster. Default is /etc/opa/hosts directory. +.TP 10 +-h \fIhosts\fR + +Specifies the list of hosts to ping. +.TP 10 +-t \fIportsfile\fR + +Specifies the file with list of local HFI ports used to access fabric(s) for analysis. Default is /etc/opa/ports file. +.TP 10 +-p \fIports\fR + +Specifies the list of local HFI ports used to access fabric(s) for analysis. + +.IP +Default is first active port. The first HFI in the system is 1. The first port on an HFI is 1. Uses the format hfi:port, +.br +for example: +.RS +.TP 10 + +.sp +0:0 +First active port in system. + +.RE + +.RS +.TP 10 + +.sp +0:y +Port \fIy\fR within system. + +.RE + +.RS +.TP 10 + +.sp +x:0 +First active port on HFI \fIx\fR. + +.RE + +.RS +.TP 10 + +.sp +x:y +HFI \fIx\fR, port \fIy\fR. + +.RE + +.TP 10 +-T \fItimelimit\fR + +Specifies the time limit in seconds for host to respond to SSH. Default is 20 seconds. + +.SH Environment Variables + +.PP +The following environment variables are also used by this command: +.TP 10 +\fBHOSTS\fR + +List of hosts, used if -h option not supplied. + +.TP 10 +\fBHOSTS\(ulFILE\fR + +File containing list of hosts, used in absence of -f and -h. + +.TP 10 +\fBPORTS\fR + +List of ports, used in absence of -t and -p. + +.TP 10 +\fBPORTS\(ulFILE\fR + +File containing list of ports, used in absence of -t and -p. + +.TP 10 +\fBFF\(ulMAX\(ulPARALLEL\fR + +Maximum concurrent operations. + +.SH Examples +opafindgood +.br + +opafindgood -f allhosts +.br + +opafindgood -h \[aq]arwen elrond\[aq] +.br + +HOSTS=\[aq]arwen elrond\[aq] opafindgood +.br + +HOSTS\(ulFILE=allhosts opafindgood +.br + +opafindgood -p \[aq]1:1 1:2 2:1 2:2\[aq] diff --git a/IbaTools/man/opafirmware.manPage b/IbaTools/man/opafirmware.manPage index 9add17f..02a7461 100644 --- a/IbaTools/man/opafirmware.manPage +++ b/IbaTools/man/opafirmware.manPage @@ -1,51 +1,50 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opafirmware 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opafirmware - -.NL - -.PP -Returns firmware information. -.SH Syntax -.NL -opafirmware [--showVersion | --showType] [ \fIfirmwareFile\fR] -.SH Options -.NL - -.TP 10 ---help -.NL -Produces full help text. - -.TP 10 ---showVersion -.NL -Specifies the version of the firmware file. - -.TP 10 ---showType -.NL -Specifies the type of the firmware file. - -.TP 10 -\fIfirmwareFile\fR -.NL -Specifies the firmware filename. - -.SH Examples -.NL -# opafirmware --showVersion STL1.q7.10.0.0.0.spkg -.br -10.0.0.0 -.br -# opafirmware --showType STL1.q7.10.0.0.0.spkg -.br -Omni\(ulPath\(ulSwitch\(ulProducts.q7 +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opafirmware 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opafirmware + + +.PP +Returns firmware information. +.SH Syntax +opafirmware [--showVersion | --showType] [ \fIfirmwareFile\fR] +.SH Options + +.TP 10 +--help + +Produces full help text. + +.TP 10 +--showVersion + +Specifies the version of the firmware file. + +.TP 10 +--showType + +Specifies the type of the firmware file. + +.TP 10 +\fIfirmwareFile\fR + +Specifies the firmware filename. + +.SH Examples +# opafirmware --showVersion STL1.q7.10.0.0.0.spkg +.br + +10.0.0.0 +.br + +# opafirmware --showType STL1.q7.10.0.0.0.spkg +.br + +Omni\(ulPath\(ulSwitch\(ulProducts.q7 diff --git a/IbaTools/man/opafmconfigcheck.manPage b/IbaTools/man/opafmconfigcheck.manPage index 50ba6f5..dcf3a4c 100644 --- a/IbaTools/man/opafmconfigcheck.manPage +++ b/IbaTools/man/opafmconfigcheck.manPage @@ -1,61 +1,59 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opafmconfigcheck 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opafmconfigcheck - -.NL - -.PP -Parses and verifies the configuration file of a Fabric Manager (FM). Displays debugging and status information. -.SH Syntax -.NL -opafmconfigcheck [-s] [-c \fIconfig\(ulfile\fR] [-v] [-d] [-r \fIreconfig\(ulfile\fR] -.SH Options -.NL - -.TP 10 ---help -.NL -Produces full help text. - -.TP 10 --s -.NL -Enables strict check mode; validates multicast and VF settings. This option points out inconsistencies or invalid settings in VF and multicast configurations. - -.TP 10 --c \fIconfig\(ulfile\fR -.NL -Specifies configuration file. -.br -Default is /etc/opa-fm/opafm.xml. - -.TP 10 --v -.NL -Displays debugging and status information. - -.TP 10 --d -.NL -Displays configuration checksum information. - -.TP 10 --r \fIreconfig\(ulfile\fR -.NL -Verifies that the \fIreconfig\(ulfile\fR is valid for dynamical reconfiguration. - -.SH Example -.NL -opafmconfigcheck -.br -opafmconfigcheck -v -.br -opafmconfigcheck -sv +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opafmconfigcheck 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opafmconfigcheck + + +.PP +Parses and verifies the configuration file of a Fabric Manager (FM). Displays debugging and status information. +.SH Syntax +opafmconfigcheck [-s] [-c \fIconfig\(ulfile\fR] [-v] [-d] [-r \fIreconfig\(ulfile\fR] +.SH Options + +.TP 10 +--help + +Produces full help text. + +.TP 10 +-s + +Enables strict check mode; validates multicast and VF settings. This option points out inconsistencies or invalid settings in VF and multicast configurations. + +.TP 10 +-c \fIconfig\(ulfile\fR + +Specifies configuration file. +.br +Default is /etc/opa-fm/opafm.xml. + +.TP 10 +-v + +Displays debugging and status information. + +.TP 10 +-d + +Displays configuration checksum information. + +.TP 10 +-r \fIreconfig\(ulfile\fR + +Verifies that the \fIreconfig\(ulfile\fR is valid for dynamical reconfiguration. + +.SH Example +opafmconfigcheck +.br + +opafmconfigcheck -v +.br + +opafmconfigcheck -sv diff --git a/IbaTools/man/opafmconfigdiff.manPage b/IbaTools/man/opafmconfigdiff.manPage index 58177ad..2504a13 100644 --- a/IbaTools/man/opafmconfigdiff.manPage +++ b/IbaTools/man/opafmconfigdiff.manPage @@ -1,56 +1,54 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opafmconfigdiff 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opafmconfigdiff - -.NL - -.PP -Performs a file difference between two configuration files corresponding to two FM instances described by \fIfile1\fR and \fIfile2\fR. -.SH Syntax -.NL -opafmconfigdiff [-f] [-l] [-d \[aq]\fIdiff\(ulargs\fR\[aq]] \fIfile1 file2\fR -.SH Options -.NL - -.TP 10 ---help -.NL -Produces full help text. - -.TP 10 --f -.NL -Filters out FM parameters that are not part of the consistency check. Removes configuration tags that do not cause consistency checks on the FM to fail from diff. - -.TP 10 --l -.NL -Includes comments in XML to indicate original line numbers. - -.TP 10 --d \[aq]\fIdiff\(ulargs\fR\[aq] -.NL -Specifies additional arguments to add to diff command. For example, enter uw for unified format ignoring whitespace. - -.TP 10 -\fIfile1 file2\fR -.NL -Specifies the names of the configuration files to be compared. - -.SH Example -.NL -opafmconfigdiff /etc/opa-fm/opafm.xml /usr/share/opa-fm/opafm.xml -.br -opafmconfigdiff -f /etc/opa-fm/opafm.xml /usr/share/opa-fm/opafm.xml -.br -opafmconfigdiff -d -uw /etc/opa-fm/opafm.xml /usr/share/opa-fm/ -.br -opafm.xml +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opafmconfigdiff 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opafmconfigdiff + + +.PP +Performs a file difference between two configuration files corresponding to two FM instances described by \fIfile1\fR and \fIfile2\fR. +.SH Syntax +opafmconfigdiff [-f] [-l] [-d \[aq]\fIdiff\(ulargs\fR\[aq]] \fIfile1 file2\fR +.SH Options + +.TP 10 +--help + +Produces full help text. + +.TP 10 +-f + +Filters out FM parameters that are not part of the consistency check. Removes configuration tags that do not cause consistency checks on the FM to fail from diff. + +.TP 10 +-l + +Includes comments in XML to indicate original line numbers. + +.TP 10 +-d \[aq]\fIdiff\(ulargs\fR\[aq] + +Specifies additional arguments to add to diff command. For example, enter uw for unified format ignoring whitespace. + +.TP 10 +\fIfile1 file2\fR + +Specifies the names of the configuration files to be compared. + +.SH Example +opafmconfigdiff /etc/opa-fm/opafm.xml /usr/share/opa-fm/opafm.xml +.br + +opafmconfigdiff -f /etc/opa-fm/opafm.xml /usr/share/opa-fm/opafm.xml +.br + +opafmconfigdiff -d -uw /etc/opa-fm/opafm.xml /usr/share/opa-fm/ +.br +opafm.xml diff --git a/IbaTools/man/opafmconfigpp.manPage b/IbaTools/man/opafmconfigpp.manPage index 0de51c4..68ab5cf 100644 --- a/IbaTools/man/opafmconfigpp.manPage +++ b/IbaTools/man/opafmconfigpp.manPage @@ -1,90 +1,90 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opafmconfigpp 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opafmconfigpp - -.NL - -.PP -Merges opafm.xml pre-process file with set of VirtualFabric and DeviceGroup XML files. -.SH Syntax -.NL -opafmconfigpp [-p \fIppfile\fR] [-o \fIoutput\fR] [-b] [-s] [-f] [-h] -.SH Options -.NL - -.TP 10 --h -.NL -Produces full help text. - -.TP 10 --p \fIppfile\fR -.NL -Specifies the file to preprocess. Default is /etc/opa-fm/opafm\(ulpp.xml. - -.TP 10 --o \fIoutput\fR -.NL -Specifies the output XML file. Default is /etc/opa-fm/opafm.xml. - -.TP 10 --b -.NL -Backs up the old output file if one exists. Default is 0. - -.TP 10 --s -.NL -Skips running Config Check on output. Default is 0. - -.TP 10 --f -.NL -Forces overwrite of old output file. Default is 0. - -.SH Notes -.NL - -.PP -The output file will contain two comments at the top, along with the local time it was generated. -.PP -The special INCLUDE comments follow this style: -.PP - -.br - -.br - - -.br - -.PP -Examples: -.PP - -.br - -.br - -.br - -.br - - -.br - -.PP -INCLUDE comments will be replaced with contents of the given directories. -.SH Example -.NL -opafmconfigpp -.br -opafmconfigpp -b -s +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opafmconfigpp 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opafmconfigpp + + +.PP +Merges opafm.xml pre-process file with set of VirtualFabric and DeviceGroup XML files. +.SH Syntax +opafmconfigpp [-p \fIppfile\fR] [-o \fIoutput\fR] [-b] [-s] [-f] [-h] +.SH Options + +.TP 10 +-h + +Produces full help text. + +.TP 10 +-p \fIppfile\fR + +Specifies the file to preprocess. Default is /etc/opa-fm/opafm\(ulpp.xml. + +.TP 10 +-o \fIoutput\fR + +Specifies the output XML file. Default is /etc/opa-fm/opafm.xml. + +.TP 10 +-b + +Backs up the old output file if one exists. Default is 0. + +.TP 10 +-s + +Skips running Config Check on output. Default is 0. + +.TP 10 +-f + +Forces overwrite of old output file. Default is 0. + +.SH Notes + +.PP +The output file will contain two comments at the top, along with the local time it was generated. +.PP +The special INCLUDE comments follow this style: +.PP + +.br + +.br + + + +.br + +.PP +Examples: +.PP + +.br + +.br + + +.br + + +.br + + + +.br + +.PP +INCLUDE comments will be replaced with contents of the given directories. +.SH Example +opafmconfigpp +.br + +opafmconfigpp -b -s diff --git a/IbaTools/man/opagenchassis.manPage b/IbaTools/man/opagenchassis.manPage index 7e41271..2880783 100644 --- a/IbaTools/man/opagenchassis.manPage +++ b/IbaTools/man/opagenchassis.manPage @@ -1,95 +1,91 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opagenchassis 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opagenchassis - -.NL - -.PP -Generates a list of IPv4, IPv6, and/or TCP names in a format acceptable for inclusion in the /etc/opa/chassis file. -.SH Syntax -.NL -opagenchassis [-t \fIportsfile\fR] [-p \fIports\fR] -.SH Options -.NL - -.TP 10 ---help -.NL -Produces full help text. -.TP 10 --t \fIportsfile\fR -.NL -Specifies the file with list of local HFI ports used to access fabric for analysis. -.br -Default is /etc/opa/ports file. -.TP 10 --p \fIports\fR -.NL -Specifies the list of local HFI ports used to access fabrics for counter clear. - -.IP -Default is first active port. The first HFI in the system is 1. The first port on an HFI is 1. Uses the format hfi:port, -.br -for example: -.RS -.TP 10 - -.sp -0:0 -First active port in system. - -.RE - -.RS -.TP 10 - -.sp -0:y -Port \fIy\fR within system. - -.RE - -.RS -.TP 10 - -.sp -x:0 -First active port on HFI \fIx\fR. - -.RE - -.RS -.TP 10 - -.sp -x:y -HFI \fIx\fR, port \fIy\fR. - -.RE - -.SH Environment Variables -.NL - -.PP -The following environment variables are also used by this command: -.TP 10 -PORTS -.NL -List of ports, used in absence of -t and -p. -.TP 10 -PORTS\(ulFILE -.NL -File containing list of ports, used in absence of -t and -p. -.SH Examples -.NL -opagenchassis -.br -opagenchassis -p \[aq]1:1 1:2 2:1 2:2\[aq] +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opagenchassis 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opagenchassis + + +.PP +Generates a list of IPv4, IPv6, and/or TCP names in a format acceptable for inclusion in the /etc/opa/chassis file. +.SH Syntax +opagenchassis [-t \fIportsfile\fR] [-p \fIports\fR] +.SH Options + +.TP 10 +--help + +Produces full help text. +.TP 10 +-t \fIportsfile\fR + +Specifies the file with list of local HFI ports used to access fabric for analysis. +.br +Default is /etc/opa/ports file. +.TP 10 +-p \fIports\fR + +Specifies the list of local HFI ports used to access fabrics for counter clear. + +.IP +Default is first active port. The first HFI in the system is 1. The first port on an HFI is 1. Uses the format hfi:port, +.br +for example: +.RS +.TP 10 + +.sp +0:0 +First active port in system. + +.RE + +.RS +.TP 10 + +.sp +0:y +Port \fIy\fR within system. + +.RE + +.RS +.TP 10 + +.sp +x:0 +First active port on HFI \fIx\fR. + +.RE + +.RS +.TP 10 + +.sp +x:y +HFI \fIx\fR, port \fIy\fR. + +.RE + +.SH Environment Variables + +.PP +The following environment variables are also used by this command: +.TP 10 +PORTS + +List of ports, used in absence of -t and -p. +.TP 10 +PORTS\(ulFILE + +File containing list of ports, used in absence of -t and -p. +.SH Examples +opagenchassis +.br + +opagenchassis -p \[aq]1:1 1:2 2:1 2:2\[aq] diff --git a/IbaTools/man/opagenesmchassis.manPage b/IbaTools/man/opagenesmchassis.manPage index 183da4b..a9850d0 100644 --- a/IbaTools/man/opagenesmchassis.manPage +++ b/IbaTools/man/opagenesmchassis.manPage @@ -1,111 +1,107 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opagenesmchassis 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opagenesmchassis - -.NL - -.PP -Generates a list of chassis IPv4 and IPv6 addresses and/or TCP names where the Embedded Subnet Manager (ESM) is running, in a format acceptable for inclusion in the /etc/opa/esm\(ulchassis file. This tool uses opagenchassis output to iterate through all the chassis. -.SH Syntax -.NL -opagenesmchassis [-u user] [-S] [-t \fIportsfile\fR] [-p \fIports\fR] -.SH Options -.NL - -.TP 10 ---help -.NL -Produces full help text. -.TP 10 --u \fIuser\fR -.NL -Performs command as user. For chassis, the default is admin. -.TP 10 --S -.NL -Securely prompts for password for user on chassis. -.TP 10 --t \fIportsfile\fR -.NL -Specifies the file with a list of local HFI ports used to access fabric(s) for analysis. -.br -Default is /etc/opa/ports -.TP 10 --p \fIports\fR -.NL -Specifies the list of local HFI ports used to access fabrics. - -.IP -Default is first active port. The first HFI in the system is 1. The first port on an HFI is 1. Uses the format hfi:port, -.br -for example: -.RS -.TP 10 - -.sp -0:0 -First active port in system. - -.RE - -.RS -.TP 10 - -.sp -0:y -Port \fIy\fR within system. - -.RE - -.RS -.TP 10 - -.sp -x:0 -First active port on HFI \fIx\fR. - -.RE - -.RS -.TP 10 - -.sp -x:y -HFI \fIx\fR, port \fIy\fR. - -.RE - -.SH Environment Variables -.NL - -.PP -The following environment variables are also used by this command: -.TP 10 -\fBFF\(ulCHASSIS\(ulADMIN\(ulPASSWORD\fR -.NL -Password for chassis, used in absence of -S. -.TP 10 -\fBPORTS\fR -.NL -List of ports, used in absence of -t and -p. -.TP 10 -\fBPORTS\(ulFILE\fR -.NL -File containing list of ports, used in absence of -t and -p. -.SH Examples -.NL -opagenesmchassis -.br -opagenesmchassis -S -p \[aq]1:1 1:2 2:1 2:2\[aq] -.PP -Alternatively, while editing the file, use a vi command to include the output such as: -.br -:r! opagenesmchassis +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opagenesmchassis 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opagenesmchassis + + +.PP +Generates a list of chassis IPv4 and IPv6 addresses and/or TCP names where the Embedded Subnet Manager (ESM) is running, in a format acceptable for inclusion in the /etc/opa/esm\(ulchassis file. This tool uses opagenchassis output to iterate through all the chassis. +.SH Syntax +opagenesmchassis [-u user] [-S] [-t \fIportsfile\fR] [-p \fIports\fR] +.SH Options + +.TP 10 +--help + +Produces full help text. +.TP 10 +-u \fIuser\fR + +Performs command as user. For chassis, the default is admin. +.TP 10 +-S + +Securely prompts for password for user on chassis. +.TP 10 +-t \fIportsfile\fR + +Specifies the file with a list of local HFI ports used to access fabric(s) for analysis. +.br +Default is /etc/opa/ports +.TP 10 +-p \fIports\fR + +Specifies the list of local HFI ports used to access fabrics. + +.IP +Default is first active port. The first HFI in the system is 1. The first port on an HFI is 1. Uses the format hfi:port, +.br +for example: +.RS +.TP 10 + +.sp +0:0 +First active port in system. + +.RE + +.RS +.TP 10 + +.sp +0:y +Port \fIy\fR within system. + +.RE + +.RS +.TP 10 + +.sp +x:0 +First active port on HFI \fIx\fR. + +.RE + +.RS +.TP 10 + +.sp +x:y +HFI \fIx\fR, port \fIy\fR. + +.RE + +.SH Environment Variables + +.PP +The following environment variables are also used by this command: +.TP 10 +\fBFF\(ulCHASSIS\(ulADMIN\(ulPASSWORD\fR + +Password for chassis, used in absence of -S. +.TP 10 +\fBPORTS\fR + +List of ports, used in absence of -t and -p. +.TP 10 +\fBPORTS\(ulFILE\fR + +File containing list of ports, used in absence of -t and -p. +.SH Examples +opagenesmchassis +.br + +opagenesmchassis -S -p \[aq]1:1 1:2 2:1 2:2\[aq] +.PP +Alternatively, while editing the file, use a vi command to include the output such as: +.br +:r! opagenesmchassis diff --git a/IbaTools/man/opagenswitches.manPage b/IbaTools/man/opagenswitches.manPage index f3c785e..85a3a04 100644 --- a/IbaTools/man/opagenswitches.manPage +++ b/IbaTools/man/opagenswitches.manPage @@ -1,190 +1,192 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opagenswitches 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opagenswitches - -.NL - -.PP -Analyzes the present fabric and produces a list of Externally Managed switches in the required format for the /etc/opa/switches file. -.SH Syntax -.NL -opagenswitches [-t portsfile] [-p ports] [-R] [-L switches\(ulfile] -.br -[-o output\(ulfile] [-T topology\(ulfile] [-X snapshot\(ulfile] [-s] [-v level] [-K] -.SH Options -.NL - -.TP 10 ---help -.NL -Produces full help text. -.TP 10 --t \fIportsfile\fR -.NL -Specifies the file with list of local HFI ports used to access fabric(s) for analysis. -.br -Default is /etc/opa/ports file. -.TP 10 --p \fIports\fR -.NL -Specifies the list of local HFI ports used to access fabrics for counter clear. - -.IP -Default is first active port. The first HFI in the system is 1. The first port on an HFI is 1. Uses the format hfi:port, -.br -for example: -.RS -.TP 10 - -.sp -0:0 -First active port in system. - -.RE - -.RS -.TP 10 - -.sp -0:y -Port \fIy\fR within system. - -.RE - -.RS -.TP 10 - -.sp -x:0 -First active port on HFI \fIx\fR. - -.RE - -.RS -.TP 10 - -.sp -x:y -HFI \fIx\fR, port \fIy\fR. - -.RE - -.TP 10 --R -.NL -Does not attempt to get routes for computation of distance. -.TP 10 --s -.NL -Updates/resolves switch names using topology XML data. -.TP 10 --L \fIswitches\(ulfile\fR -.NL -Specifies the name of a pre-existing \fIswitches\(ulfile\fR to be used as input in conjunction with a topology file. When specified, the file is used instead of switches data obtained from the actual fabric. The updated switches data is output to stdout (common to all opagenswitches operations). Does not generate switches data. Must also use -s option. - -.TP 10 --o \fIoutput\(ulfile\fR -.NL -Writes switches data to \fIoutput\(ulfile\fR. Default is stdout. -.TP 10 --T \fItopology\(ulfile\fR -.NL -Specifies \fItopology\(ulfile\fR to use. May contain \[aq]%P\[aq] . Must also use -s. - -.IP -Link data in the topology file is compared to actual fabric link data (obtained by opareport -o links or opareport -X snapshot -o links). The data is also matched to a list of switch node GUIDs and the switch NodeDesc values are generated. This list is then applied to the switches data to update NodeDesc values. The comparison of topology link data to actual fabric link data starts with the host names. The host names in the actual fabric must match those in the topology file for the comparison to succeed. However, the comparison logic allows for some mismatches, which could be due to swapped or missing cables. Switch NodeDesc values are matched to GUIDs based on which switch has the greater number of matching links. -.TP 10 --X \fIsnapshot\(ulfile\fR -.NL -Uses \fIsnapshot\(ulfile\fR XML for fabric link information. -.br -May contain \[aq]%P\[aq] . Must also use -s. -.TP 10 --v \fIlevel\fR -.NL -Specifies the verbose level. Default is 0. Values include: -.RS -.TP 10 - -.sp -0 -No output. -.RE - -.RS -.TP 10 - -.sp -1 -Progress output. -.RE - -.RS -.TP 10 - -.sp -2 -Reserved. -.RE - -.RS -.TP 10 - -.sp -4 -Time stamps. -.RE - -.RS -.TP 10 - -.sp -8 -Reserved. -.RE - -.TP 10 --K -.NL -Does not clean temporary files. Temporary files are CSV format and contain lists of links used during script operation. The files are not normally needed after execution, but they can be retained for subsequent inspection or processing. - -.SH Environment Variables -.NL - -.PP -The following environment variables are also used by this command: -.TP 10 -\fBPORTS\fR -.NL -List of ports, used in absence of -t and -p. -.TP 10 -\fBPORTS\(ulFILE\fR -.NL -File containing list of ports, used in absence of -t and -p. -.TP 10 -\fBFF\(ulTOPOLOGY\(ulFILE\fR -.NL -File containing topology XML data, used in absence of -T. -.SH Examples -.NL -opagenswitches -.br -opagenswitches -p \[aq]1:1 2:1\[aq] -.br -opagenswitches -o switches -.br -opagenswitches -s -o switches -.br -opagenswitches -L switches -s -o switches -.br -opagenswitches -s -T topology.%P.xml -.br -opagenswitches -L switches -s -T topology.%P.xml -X snapshot.%P.xml +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opagenswitches 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opagenswitches + + +.PP +Analyzes the present fabric and produces a list of Externally Managed switches in the required format for the /etc/opa/switches file. +.SH Syntax +opagenswitches [-t portsfile] [-p ports] [-R] [-L switches\(ulfile] +.br +[-o output\(ulfile] +[-T topology\(ulfile] [-X snapshot\(ulfile] [-s] [-v level] [-K] +.SH Options + +.TP 10 +--help + +Produces full help text. +.TP 10 +-t \fIportsfile\fR + +Specifies the file with list of local HFI ports used to access fabric(s) for analysis. +.br +Default is /etc/opa/ports file. +.TP 10 +-p \fIports\fR + +Specifies the list of local HFI ports used to access fabrics for counter clear. + +.IP +Default is first active port. The first HFI in the system is 1. The first port on an HFI is 1. Uses the format hfi:port, +.br +for example: +.RS +.TP 10 + +.sp +0:0 +First active port in system. + +.RE + +.RS +.TP 10 + +.sp +0:y +Port \fIy\fR within system. + +.RE + +.RS +.TP 10 + +.sp +x:0 +First active port on HFI \fIx\fR. + +.RE + +.RS +.TP 10 + +.sp +x:y +HFI \fIx\fR, port \fIy\fR. + +.RE + +.TP 10 +-R + +Does not attempt to get routes for computation of distance. +.TP 10 +-s + +Updates/resolves switch names using topology XML data. +.TP 10 +-L \fIswitches\(ulfile\fR + +Specifies the name of a pre-existing \fIswitches\(ulfile\fR to be used as input in conjunction with a topology file. When specified, the file is used instead of switches data obtained from the actual fabric. The updated switches data is output to stdout (common to all opagenswitches operations). Does not generate switches data. Must also use -s option. + +.TP 10 +-o \fIoutput\(ulfile\fR + +Writes switches data to \fIoutput\(ulfile\fR. Default is stdout. +.TP 10 +-T \fItopology\(ulfile\fR + +Specifies \fItopology\(ulfile\fR to use. May contain \[aq]%P\[aq] . Must also use -s. + +.IP +Link data in the topology file is compared to actual fabric link data (obtained by opareport -o links or opareport -X snapshot -o links). The data is also matched to a list of switch node GUIDs and the switch NodeDesc values are generated. This list is then applied to the switches data to update NodeDesc values. The comparison of topology link data to actual fabric link data starts with the host names. The host names in the actual fabric must match those in the topology file for the comparison to succeed. However, the comparison logic allows for some mismatches, which could be due to swapped or missing cables. Switch NodeDesc values are matched to GUIDs based on which switch has the greater number of matching links. +.TP 10 +-X \fIsnapshot\(ulfile\fR + +Uses \fIsnapshot\(ulfile\fR XML for fabric link information. +.br +May contain \[aq]%P\[aq] . Must also use -s. +.TP 10 +-v \fIlevel\fR + +Specifies the verbose level. Default is 0. Values include: +.RS +.TP 10 + +.sp +0 +No output. +.RE + +.RS +.TP 10 + +.sp +1 +Progress output. +.RE + +.RS +.TP 10 + +.sp +2 +Reserved. +.RE + +.RS +.TP 10 + +.sp +4 +Time stamps. +.RE + +.RS +.TP 10 + +.sp +8 +Reserved. +.RE + +.TP 10 +-K + +Does not clean temporary files. Temporary files are CSV format and contain lists of links used during script operation. The files are not normally needed after execution, but they can be retained for subsequent inspection or processing. + +.SH Environment Variables + +.PP +The following environment variables are also used by this command: +.TP 10 +\fBPORTS\fR + +List of ports, used in absence of -t and -p. +.TP 10 +\fBPORTS\(ulFILE\fR + +File containing list of ports, used in absence of -t and -p. +.TP 10 +\fBFF\(ulTOPOLOGY\(ulFILE\fR + +File containing topology XML data, used in absence of -T. +.SH Examples +opagenswitches +.br + +opagenswitches -p \[aq]1:1 2:1\[aq] +.br + +opagenswitches -o switches +.br + +opagenswitches -s -o switches +.br + +opagenswitches -L switches -s -o switches +.br + +opagenswitches -s -T topology.%P.xml +.br + +opagenswitches -L switches -s -T topology.%P.xml -X snapshot.%P.xml diff --git a/IbaTools/man/opagentopology.manPage b/IbaTools/man/opagentopology.manPage index 3bdb8fb..b607e25 100644 --- a/IbaTools/man/opagentopology.manPage +++ b/IbaTools/man/opagentopology.manPage @@ -1,324 +1,400 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opagentopology 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opagentopology - -.NL - -.PP -Provides a simple sample of how to generate the topology XML file used for topology verification. Customers who wish to integrate topology XML file generation into their cluster design process can create their own script to take information available in other formats and tools and produce the topology XML file directly. The alternative is to use opaxlattopology and have tools generate the input files it expects. -.PP -This tool uses CSV input files opatopology\(ullinks.txt, opatopology\(ulFIs.txt, and opatopology\(ulSWs.txt to generate LinkSummary, Node FIs, and Node SWs information, respectively. These files are samples of what might be produced as part of translating a user custom file format into temporary intermediate CSV files. -.PP -LinkSummary information includes Link, Cable, and Port information. Note that opagentopology (not opaxmlgenerate) generates the XML version string as well as the and lines. Also note that the indent level is at the default value of zero (0). The portions of the script that call opaxmlgenerate follow: -.PP - -.br -opaxmlgenerate -X /usr/share/opa/samples/opatopology\(ul1.txt -d \; -.br --h Link -g Rate -g Rate\(ulInt -g MTU -g LinkDetails -h Cable -.br --g CableLength -g CableLabel -g CableDetails -e Cable -h Port -.br --g NodeGUID -g PortNum -g NodeDesc -g PortGUID -.br --g NodeType -g NodeType\(ulInt -g PortDetails -e Port -h Port -g NodeGUID -g PortNum -.br --g NodeDesc -g PortGUID -g NodeType -g NodeType\(ulInt -g PortDetails -e Port -.br --e Link - -.br - -.br -opaxmlgenerate -X /usr/share/opa/samples/opatopology\(ul2.txt -d \; -.br --h Node -g NodeGUID -g NodeDesc -g NodeDetails -g HostName -g NodeType -.br --g NodeType\(ulInt -g NumPorts -e Node -.NL - -.SH Syntax -.NL -/usr/share/opa/samples/opagentopology [--help] -.PP - -.B NOTE: -You must use the full path to access this command. - -.NL - -.SH Options -.NL - -.TP 10 -No option -.NL -Produces sample output. See -\fIExample\fR -. -.TP 10 ---help -.NL -Produces full help text. -.NL - -.SH opatopology\(ullinks.txt -.NL - -.PP -This file can be found in /usr/share/opa/samples/. For brevity, this sample shows only two links. The second link shows an example of omitting some information. In the second line, the MTU, LinkDetails, and other fields are not present, which is indicated by an empty value for the field (no entry between the semicolon delimiters). -.PP - -.B NOTE: -The following example exceeds the available width of the page. For readability, a blank line is shown between lines to make it clear where the line ends. In an actual link file, no blank lines are used. - -.PP - -.br -25g;2048;0;IO Server Link;11m;S4567;cable -.br -model 456;0x0002c9020020e004;1;bender HFI-1;0x0002c9020020e004;FI; -.br -Some info about port;0x0011750007000df6;7;Switch 1234 Leaf 4;;SW; -.br - - -.br - -.br -25g;;0;;;;;0x0002c9020025a678;1;mindy2 HFI-1;;FI;; -.br -0x0011750007000e6d;4;Switch 2345 Leaf 5;;SW; -.NL - -.SH opatopology\(ulFIs.txt -.NL - -.PP -This file can be found in /usr/share/opa/samples/. For brevity, this sample shows only two nodes. -.PP - -.br -0x0002c9020020e004;bender HFI-1;More details about node -.br -0x0002c9020025a678;mindy2 HFI-1;Node details - -.br - -.NL - -.SH opatopology\(ulSWs.txt -.NL - -.PP -This file can be found in /usr/share/opa/samples/. For brevity, this sample shows only two nodes. -.PP - -.br -0x0011750007000df6;Switch 1234 Leaf 4; 0x0011750007000e6d;Switch -.br -2345 Leaf 5; - -.br - -.NL - -.SH opatopology\(ulSMs.txt -.NL - -.PP -This file can be found in /usr/share/opa/samples/. For brevity, this sample shows only one node. -.PP - -.br -0x0002c9020025a678;1;mindy2 HFI-1;0x0011750007000e6d;FI;details -.br -about SM - -.br - -.NL - -.SH Example -.NL - -.PP -When run against the supplied topology input files, /usr/share/opa/samples/opagentopology -.br -produces: -.PP - -.br - -.br - -.br - -.br - -.br -25g -.br -2048 -.br -0 -.br -IO Server Link -.br - -.br -11m -.br -S4567 -.br -cable model 456 -.br - -.br - -.br -0x0002c9020020e004 -.br -1 -.br -bender HFI-1 -.br -0x0002c9020020e004 -.br -FI -.br -Some info about port -.br - -.br - -.br -0x0011750007000df6 -.br -7 -.br -Switch 1234 Leaf 4 -.br -SW -.br - -.br - -.br - -.br -25g -.br -0 -.br - -.br - -.br - -.br -0x0002c9020025a678 -.br -1 -.br -mindy2 HFI-1 -.br -FI -.br - -.br - -.br -0x0011750007000e6d -.br -4 -.br -Switch 2345 Leaf 5 -.br -SW -.br - -.br - -.br - -.br - -.br - -.br - -.br -0x0002c9020020e004 -.br -bender HFI-1 -.br -More details about node -.br - -.br - -.br -0x0002c9020025a678 -.br -mindy2 HFI-1 -.br -Node details -.br - -.br - -.br - -.br - -.br -0x0011750007000df6 -.br -Switch 1234 Leaf 4 -.br - -.br - -.br -0x0011750007000e6d -.br -Switch 2345 Leaf 5 -.br - -.br - -.br - -.br - -.br -0x0002c9020025a678 -.br -1 -.br -mindy2 HFI-1 -.br -0x0011750007000e6d -.br -FI -.br -details about SM -.br - -.br - -.br - -.br - - -.br +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opagentopology 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opagentopology + + +.PP +Provides a simple sample of how to generate the topology XML file used for topology verification. Customers who wish to integrate topology XML file generation into their cluster design process can create their own script to take information available in other formats and tools and produce the topology XML file directly. The alternative is to use opaxlattopology and have tools generate the input files it expects. +.PP +This tool uses CSV input files opatopology\(ullinks.txt, opatopology\(ulFIs.txt, and opatopology\(ulSWs.txt to generate LinkSummary, Node FIs, and Node SWs information, respectively. These files are samples of what might be produced as part of translating a user custom file format into temporary intermediate CSV files. +.PP +LinkSummary information includes Link, Cable, and Port information. Note that opagentopology (not opaxmlgenerate) generates the XML version string as well as the and lines. Also note that the indent level is at the default value of zero (0). The portions of the script that call opaxmlgenerate follow: +.PP + +.br +opaxmlgenerate -X /usr/share/opa/samples/opatopology\(ul1.txt -d \; +.br +-h Link +-g Rate -g Rate\(ulInt -g MTU -g LinkDetails -h Cable +.br +-g CableLength -g CableLabel +-g CableDetails -e Cable -h Port +.br +-g NodeGUID -g PortNum -g NodeDesc -g PortGUID + +.br +-g NodeType -g NodeType\(ulInt -g PortDetails -e Port -h Port -g NodeGUID -g PortNum + +.br +-g NodeDesc -g PortGUID -g NodeType -g NodeType\(ulInt -g PortDetails -e Port +.br +-e Link + + +.br + +.br +opaxmlgenerate -X /usr/share/opa/samples/opatopology\(ul2.txt -d \; +.br + +-h Node -g NodeGUID -g NodeDesc -g NodeDetails -g HostName -g NodeType +.br + +-g NodeType\(ulInt -g NumPorts -e Node + +.SH Syntax +/usr/share/opa/samples/opagentopology [--help] +.PP + +.B NOTE: +You must use the full path to access this command. + + +.SH Options + +.TP 10 +No option + +Produces sample output. See +\fIExample\fR +. +.TP 10 +--help + +Produces full help text. + +.SH opatopology\(ullinks.txt + +.PP +This file can be found in /usr/share/opa/samples/. For brevity, this sample shows only two links. The second link shows an example of omitting some information. In the second line, the MTU, LinkDetails, and other fields are not present, which is indicated by an empty value for the field (no entry between the semicolon delimiters). +.PP + +.B NOTE: +The following example exceeds the available width of the page. For readability, a blank line is shown between lines to make it clear where the line ends. In an actual link file, no blank lines are used. + +.PP + +.br +25g;2048;0;IO Server Link;11m;S4567;cable +.br +model 456;0x0002c9020020e004;1;bender HFI-1;0x0002c9020020e004;FI; +.br +Some info about port;0x0011750007000df6;7;Switch 1234 Leaf 4;;SW; +.br + + + +.br + +.br +25g;;0;;;;;0x0002c9020025a678;1;mindy2 HFI-1;;FI;; +.br +0x0011750007000e6d;4;Switch 2345 Leaf 5;;SW; + +.SH opatopology\(ulFIs.txt + +.PP +This file can be found in /usr/share/opa/samples/. For brevity, this sample shows only two nodes. +.PP + +.br +0x0002c9020020e004;bender HFI-1;More details about node +.br + +0x0002c9020025a678;mindy2 HFI-1;Node details + +.br + + +.SH opatopology\(ulSWs.txt + +.PP +This file can be found in /usr/share/opa/samples/. For brevity, this sample shows only two nodes. +.PP + +.br +0x0011750007000df6;Switch 1234 Leaf 4; +0x0011750007000e6d;Switch +.br +2345 Leaf 5; + +.br + + +.SH opatopology\(ulSMs.txt + +.PP +This file can be found in /usr/share/opa/samples/. For brevity, this sample shows only one node. +.PP + +.br +0x0002c9020025a678;1;mindy2 HFI-1;0x0011750007000e6d;FI;details +.br +about SM + +.br + + +.SH Example + +.PP +When run against the supplied topology input files, /usr/share/opa/samples/opagentopology +.br +produces: +.PP + +.br + +.br + + +.br + + +.br + + +.br + +25g +.br + +2048 +.br + +0 +.br + +IO Server Link +.br + + +.br + +11m +.br + +S4567 +.br + +cable model 456 +.br + + +.br + + +.br + +0x0002c9020020e004 +.br + +1 +.br + +bender HFI-1 +.br + +0x0002c9020020e004 +.br + +FI +.br + +Some info about port +.br + + +.br + + +.br + +0x0011750007000df6 +.br + +7 +.br + +Switch 1234 Leaf 4 +.br + +SW +.br + + +.br + + +.br + + +.br + +25g +.br + +0 +.br + + +.br + + +.br + + +.br + +0x0002c9020025a678 +.br + +1 +.br + +mindy2 HFI-1 +.br + +FI +.br + + +.br + + +.br + +0x0011750007000e6d +.br + +4 +.br + +Switch 2345 Leaf 5 +.br + +SW +.br + + +.br + + +.br + + +.br + + +.br + + +.br + + +.br + +0x0002c9020020e004 +.br + +bender HFI-1 +.br + +More details about node +.br + + +.br + + +.br + +0x0002c9020025a678 +.br + +mindy2 HFI-1 +.br + +Node details +.br + + +.br + + +.br + + +.br + + +.br + +0x0011750007000df6 +.br + +Switch 1234 Leaf 4 +.br + + +.br + + +.br + +0x0011750007000e6d +.br + +Switch 2345 Leaf 5 +.br + + +.br + + +.br + + +.br + + +.br + +0x0002c9020025a678 +.br + +1 +.br + +mindy2 HFI-1 +.br + +0x0011750007000e6d +.br + +FI +.br + +details about SM +.br + + +.br + + +.br + + +.br + + + +.br diff --git a/IbaTools/man/opagetvf.manPage b/IbaTools/man/opagetvf.manPage index 04576d1..baafa26 100644 --- a/IbaTools/man/opagetvf.manPage +++ b/IbaTools/man/opagetvf.manPage @@ -1,96 +1,94 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opagetvf 1 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opagetvf - -.NL - -.PP -Used for scripting application use of vFabrics, such as for mpirun parameters. You can query by VF Name, VF Index, Service ID, MGID, PKey, or SL. Fetches the Virtual Fabric info in a delimited format. Returns exactly one matching VF. When multiple VFs match the query, it prefers non-default VFs in which the calling server is a full member. If multiple choices remain, it returns the one with the lowest VF Index. Uses the same algorithm as the Distributed SA Plug-in (DSAP). -.PP -The tool can be used with additional scripts to help set PKey, SL, MTU, and Rate when running MPI jobs. Internally, this tool is based on the opasaquery -o vfinfocsv command. For more information, see -\fIopasaquery\fR -. -.SH Syntax -.NL -opagetvf [-h \fIhfi\fR] [-p \fIport\fR] [-e] [-d \fIvfname\fR| -S \fIserviceId\fR| -m \fImcgid\fR| -.br --i \fIvfIndex\fR| -k \fIpkey\fR| -L \fIsl\fR] -.SH Options -.NL - -.TP 10 ---help -.NL -Produces full help text. -.TP 10 --h \fIhfi\fR -.NL -Specifies the HFI to send by. Default is first HFI. -.TP 10 --p \fIport\fR -.NL -Specifies the port to send by. Default is first active port. -.TP 10 --e -.NL -Outputs MTU and rate as enum values. -.TP 10 --d \fIvfname\fR -.NL -Queries by VirtualFabric Name. -.TP 10 --S \fIserviceId\fR -.NL -Queries by Application ServiceId. -.TP 10 --m \fIgid\fR -.NL -Queries by Application Multicast GID. -.TP 10 --i \fIvfindex\fR -.NL -Queries by VirtualFabric Index. -.TP 10 --k \fIpkey\fR -.NL -Queries by VirtualFabric PKey. -.TP 10 --L \fISL\fR -.NL -Queries by VirtualFabric SL. -.SH Examples -.NL -opagetvf -d \[aq]Compute\[aq] -.br -opagetvf -h 2 -p 2 -d \[aq]Compute\[aq] -.SH Sample Outputs -.NL - -.PP -The output is of the form: name:index:pkey:sl:mtu:rate:optionflag::mcastSl as shown in the following example. -.PP -Option flag (bitmask) values include: -.IP \(bu -0x00 Indicates no bits are set. Specifically, no QoS, no Security, and no flow control disabled (which means flow control is enabled). -.IP \(bu -0x01 Security -.IP \(bu -0x02 QoS -.IP \(bu -0x04 Flow Control Disable -.PP - -.br -# opagetvf -d Default -.br -Default:0:0xffff:0:unlimited:unlimited:0x0:: - -.br +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opagetvf 1 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opagetvf + + +.PP +Used for scripting application use of vFabrics, such as for mpirun parameters. You can query by VF Name, VF Index, Service ID, MGID, PKey, or SL. Fetches the Virtual Fabric info in a delimited format. Returns exactly one matching VF. When multiple VFs match the query, it prefers non-default VFs in which the calling server is a full member. If multiple choices remain, it returns the one with the lowest VF Index. Uses the same algorithm as the Distributed SA Plug-in (DSAP). +.PP +The tool can be used with additional scripts to help set PKey, SL, MTU, and Rate when running MPI jobs. Internally, this tool is based on the opasaquery -o vfinfocsv command. For more information, see +\fIopasaquery\fR +. +.SH Syntax +opagetvf [-h \fIhfi\fR] [-p \fIport\fR] [-e] [-d \fIvfname\fR | -S \fIserviceId\fR | -m \fImcgid\fR | +.br + +-i \fIvfIndex\fR | -k \fIpkey\fR | -L \fIsl\fR] +.SH Options + +.TP 10 +--help + +Produces full help text. +.TP 10 +-h \fIhfi\fR + +Specifies the HFI to send by. Default is first HFI. +.TP 10 +-p \fIport\fR + +Specifies the port to send by. Default is first active port. +.TP 10 +-e + +Outputs MTU and rate as enum values. +.TP 10 +-d \fIvfname\fR + +Queries by VirtualFabric Name. +.TP 10 +-S \fIserviceId\fR + +Queries by Application ServiceId. +.TP 10 +-m \fIgid\fR + +Queries by Application Multicast GID. +.TP 10 +-i \fIvfindex\fR + +Queries by VirtualFabric Index. +.TP 10 +-k \fIpkey\fR + +Queries by VirtualFabric PKey. +.TP 10 +-L \fISL\fR + +Queries by VirtualFabric SL. +.SH Examples +opagetvf -d \[aq]Compute\[aq] +.br + +opagetvf -h 2 -p 2 -d \[aq]Compute\[aq] +.SH Sample Outputs + +.PP +The output is of the form: name:index:pkey:sl:mtu:rate:optionflag::mcastSl as shown in the following example. +.PP +Option flag (bitmask) values include: +.IP \(bu +0x00 Indicates no bits are set. Specifically, no QoS, no Security, and no flow control disabled (which means flow control is enabled). +.IP \(bu +0x01 Security +.IP \(bu +0x02 QoS +.IP \(bu +0x04 Flow Control Disable +.PP + +.br +# opagetvf -d Default +.br + +Default:0:0xffff:0:unlimited:unlimited:0x0:: + +.br diff --git a/IbaTools/man/opagetvf_env.manPage b/IbaTools/man/opagetvf_env.manPage index c2433a2..954d410 100644 --- a/IbaTools/man/opagetvf_env.manPage +++ b/IbaTools/man/opagetvf_env.manPage @@ -1,117 +1,121 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opagetvf\(ulenv 1 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opagetvf\(ulenv - -.NL - -.PP -Provides opagetvf\(ulfunc and opagetvf2\(ulfunc shell functions that query the parameters of a vFabric. Also exports values that indicate the PKEY, SL, MTU, and RATE associated with the vFabric. The typical usage of this tool is to include it in a shell script as:. /usr/sbin/opagetvf\(ulenv -.PP -A usage example is provided in: -.br -/usr/src/opa/mpi\(ulapps/openmpi.params -.PP - -.B NOTE: -opagetvf\(ulfunc and opagetvf2\(ulfunc have a similar usage. The difference is whether the MTU and RATE are returned as absolute values or enum values, respectively. - -.SH Function Syntax -.NL -opagetvf\(ulfunc "arguments to opagetvf" \fIpkey\(ulenv\(ulvar\(ulname\fR \fIsl\(ulenv\(ulvar\(ulname\fR -.br -[ \fImtu\(ulenv\(ulvar\(ulname\fR[ \fIrate\(ulenv\(ulvar\(ulname\fR]] -.PP -or -.PP - -.br -opagetvf2\(ulfunc "arguments to opagetvf" \fIpkey\(ulenv\(ulvar\(ulname\fR -.br -\fIsl\(ulenv\(ulvar\(ulname\fR[ \fImtu\(ulenv\(ulvar\(ulname\fR[ \fIrate\(ulenv\(ulvar\(ulname\fR]] - -.br - -.NL - -.SH Function Options -.NL - -.TP 10 -"arguments to opagetvf" -.NL -Specifies a set of arguments to pass to opagetvf to select a virtual fabric.See -\fIopagetvf\fR -for more information. - -.TP 10 -pkey\(ulenv\(ulvar\(ulname -.NL -Specifies the environment variable to fill in with pkey for the selected virtual fabric. The variable given will be exported with the hex numeric value for the pkey.If a variable name of "" is provided, pkey is not saved. - -.TP 10 -sl\(ulenv\(ulvar\(ulname -.NL -Specifies the environment variable to fill in with service level (sl) for the selected virtual fabric. The variable given will be exported with the numeric value for the sl.If a variable name of "" is provided, sl is not saved. - -.TP 10 -mtu\(ulenv\(ulvar\(ulname -.NL -Specifies the environment variable to fill in with maximum MTU for the selected virtual fabric. The variable given will be exported with the value for the MTU.If a variable name of "" is provided, MTU is not saved. - -.IP -For opagetvf\(ulfunc, MTU is returned as an absolute value of 2048, 4096, 8192, or 10240. -.IP -For opagetvf2\(ulfunc, MTU is returned as an enumerated value of 4, 5, 6, or 7 corresponding to the absolute values above, respectively. -.IP -If the selected virtual fabric does not have a limitation specified for MTU, the variable will be unaltered. -.TP 10 -rate\(ulenv\(ulvar\(ulname -.NL -Specifies the environment variable to fill in with maximum static rate for the selected virtual fabric. The variable given will be exported with the value for the rate.If a variable name of "" is provided, rate is not saved. - -.IP -For opagetvf\(ulfunc, rate is returned as an absolute value of 25g, 50g, 75g or 100g. -.IP -For opagetvf2\(ulfunc, rate is returned as an enumerated value of 15, 12, 9, or 16 corresponding to the absolute values above, respectively. -.IP -If the selected virtual fabric does not have a limitation specified for rate, the variable will be unaltered. -.NL - -.SH Function Example -.NL - -.PP - -.br -. /usr/sbin/opagetvf\(ulenv -.br - -.br -# ensure values are empty in case they are not specified for the -.br -virtual fabric -.br -MTU= -.br -RATE= -.br -opagetvf\(ulfunc "-d \[aq]Compute\[aq]" PKEY SERVICE\(ulLEVEL MTU RATE -.br -echo "The Compute Virtual Fabric has pkey: $PKEY SL:$SERVICE\(ulLEVEL MTU: -.br -$MTU rate:$RATE" - -.br - -.PP - -.B NOTE: -Additional examples may be found in /usr/src/opa/mpi\(ulapps/openmpi.params and /usr/src/opa/mpi\(ulapps/mvapich2.params. Those scripts use opagetvf\(ulfunc and opagetvf2\(ulfunc to get virtual fabric parameters and then pass them into openmpi and mvapich2, respectively. +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opagetvf\(ulenv 1 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opagetvf\(ulenv + + +.PP +Provides opagetvf\(ulfunc and opagetvf2\(ulfunc shell functions that query the parameters of a vFabric. Also exports values that indicate the PKEY, SL, MTU, and RATE associated with the vFabric. The typical usage of this tool is to include it in a shell script as:. /usr/sbin/opagetvf\(ulenv +.PP +A usage example is provided in: +.br +/usr/src/opa/mpi\(ulapps/openmpi.params +.PP + +.B NOTE: +opagetvf\(ulfunc and opagetvf2\(ulfunc have a similar usage. The difference is whether the MTU and RATE are returned as absolute values or enum values, respectively. + +.SH Function Syntax +opagetvf\(ulfunc "arguments to opagetvf" \fIpkey\(ulenv\(ulvar\(ulname\fR \fIsl\(ulenv\(ulvar\(ulname\fR +.br + +[ \fImtu\(ulenv\(ulvar\(ulname\fR [ \fIrate\(ulenv\(ulvar\(ulname\fR]] +.PP +or +.PP + +.br +opagetvf2\(ulfunc "arguments to opagetvf" \fIpkey\(ulenv\(ulvar\(ulname\fR +.br +\fIsl\(ulenv\(ulvar\(ulname\fR +[ \fImtu\(ulenv\(ulvar\(ulname\fR [ \fIrate\(ulenv\(ulvar\(ulname\fR]] + +.br + + +.SH Function Options + +.TP 10 +"arguments to opagetvf" + +Specifies a set of arguments to pass to opagetvf to select a virtual fabric.See +\fIopagetvf\fR +for more information. + +.TP 10 +pkey\(ulenv\(ulvar\(ulname + +Specifies the environment variable to fill in with pkey for the selected virtual fabric. The variable given will be exported with the hex numeric value for the pkey.If a variable name of "" is provided, pkey is not saved. + +.TP 10 +sl\(ulenv\(ulvar\(ulname + +Specifies the environment variable to fill in with service level (sl) for the selected virtual fabric. The variable given will be exported with the numeric value for the sl.If a variable name of "" is provided, sl is not saved. + +.TP 10 +mtu\(ulenv\(ulvar\(ulname + +Specifies the environment variable to fill in with maximum MTU for the selected virtual fabric. The variable given will be exported with the value for the MTU.If a variable name of "" is provided, MTU is not saved. + +.IP +For opagetvf\(ulfunc, MTU is returned as an absolute value of 2048, 4096, 8192, or 10240. +.IP +For opagetvf2\(ulfunc, MTU is returned as an enumerated value of 4, 5, 6, or 7 corresponding to the absolute values above, respectively. +.IP +If the selected virtual fabric does not have a limitation specified for MTU, the variable will be unaltered. +.TP 10 +rate\(ulenv\(ulvar\(ulname + +Specifies the environment variable to fill in with maximum static rate for the selected virtual fabric. The variable given will be exported with the value for the rate.If a variable name of "" is provided, rate is not saved. + +.IP +For opagetvf\(ulfunc, rate is returned as an absolute value of 25g, 50g, 75g or 100g. +.IP +For opagetvf2\(ulfunc, rate is returned as an enumerated value of 15, 12, 9, or 16 corresponding to the absolute values above, respectively. +.IP +If the selected virtual fabric does not have a limitation specified for rate, the variable will be unaltered. + +.SH Function Example + +.PP + +.br +. /usr/sbin/opagetvf\(ulenv +.br + + +.br + +# ensure values are empty in case they are not specified for the +.br +virtual fabric +.br + +MTU= +.br + +RATE= +.br + +opagetvf\(ulfunc "-d \[aq]Compute\[aq]" PKEY SERVICE\(ulLEVEL MTU RATE +.br + +echo "The Compute Virtual Fabric has pkey: $PKEY SL:$SERVICE\(ulLEVEL MTU: +.br +$MTU +rate:$RATE" + + +.br + +.PP + +.B NOTE: +Additional examples may be found in /usr/src/opa/mpi\(ulapps/openmpi.params and /usr/src/opa/mpi\(ulapps/mvapich2.params. Those scripts use opagetvf\(ulfunc and opagetvf2\(ulfunc to get virtual fabric parameters and then pass them into openmpi and mvapich2, respectively. diff --git a/IbaTools/man/opahfirev.manPage b/IbaTools/man/opahfirev.manPage index 751583d..95fe53a 100644 --- a/IbaTools/man/opahfirev.manPage +++ b/IbaTools/man/opahfirev.manPage @@ -1,59 +1,66 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opahfirev 1 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opahfirev - -.NL - -.PP - -\fB(Linux)\fR -Scans the system and reports hardware and firmware information about all the HFIs in the system. -.SH Syntax -.NL -opahfirev -.SH Options -.NL - -.TP 10 -no option -.NL -Returns information about all of the HFIs in the system. - -.TP 10 ---help -.NL -Produces full help text. - -.SH Example -.NL -# opahfirev -.br -###################### -.br -phsmpriv07.ph.intel.com - HFI 0000:81:00.0 -.br -HFI: hfi1\(ul0 -.br -Board: ChipABI 3.0, ChipRev 7.17, SW Compat 3 -.br -SN: 0x0063be82 -.br -Location:Discrete Socket:1 PCISlot:00 NUMANode:1 HFI0 -.br -Bus: Speed 8GT/s, Width x16 -.br -GUID: 0011:7501:0163:be82 -.br -SiRev: B1 (11) -.br -TMM: 10.4.0.0.146 -.br -###################### +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opahfirev 1 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opahfirev + + +.PP + +\fB(Linux)\fR +Scans the system and reports hardware and firmware information about all the HFIs in the system. +.SH Syntax +opahfirev +.SH Options + +.TP 10 +no option + +Returns information about all of the HFIs in the system. + +.TP 10 +--help + +Produces full help text. + +.SH Example +# opahfirev +.br + +###################### +.br + +phsmpriv07.ph.intel.com - HFI 0000:81:00.0 +.br + +HFI: hfi1\(ul0 +.br + +Board: ChipABI 3.0, ChipRev 7.17, SW Compat 3 +.br + +SN: 0x0063be82 +.br + +Location:Discrete Socket:1 PCISlot:00 NUMANode:1 HFI0 +.br + +Bus: Speed 8GT/s, Width x16 +.br + +GUID: 0011:7501:0163:be82 +.br + +SiRev: B1 (11) +.br + +TMM: 10.4.0.0.146 +.br + +###################### diff --git a/IbaTools/man/opahostadmin.manPage b/IbaTools/man/opahostadmin.manPage index eef95a2..fc3b73f 100644 --- a/IbaTools/man/opahostadmin.manPage +++ b/IbaTools/man/opahostadmin.manPage @@ -1,527 +1,528 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opahostadmin 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opahostadmin - -.NL - -.PP - -\fB(Host)\fR -Performs a number of multi-step host initialization and verification operations, including upgrading software or firmware, rebooting hosts, and other operations. In general, operations performed by opahostadmin involve a login to one or more host systems. -.SH Syntax -.NL -opahostadmin [-c] [-i \fIipoib\(ulsuffix\fR] [-f \fIhostfile\fR] [-h \[aq]\fIhosts\fR\[aq]] -.br -[-r \fIrelease\fR] [-I \fIinstall\(uloptions\fR] [-U \fIupgrade\(uloptions\fR] [-d \fIdir\fR] -.br -[-T \fIproduct\fR] [-P \fIpackages\fR] [-m \fInetmask\fR] [-S] \fIoperation\fR... -.SH Options -.NL - -.TP 10 ---help -.NL -Produces full help text. - -.TP 10 --c -.NL -Overwrites the result files from any previous run before starting this run. - -.TP 10 --i \fIipoib\(ulsuffix\fR -.NL -Specifies the suffix to apply to host names to create IPoIB host names. Default is -opa. - -.TP 10 --f \fIhostfile\fR -.NL -Specifies the file with the names of hosts in a cluster. Default is /etc/opa/hosts file. - -.TP 10 --h \fIhosts\fR -.NL -Specifies the list of hosts to execute the operation against. - -.TP 10 --r \fIrelease\fR -.NL -Specifies the software version to load/upgrade to. Default is the version of Intel(R) Omni-Path Software presently being run on the server. - -.TP 10 --d \fIdir\fR -.NL -Specifies the directory to retrieve \fIproduct\fR. \fIrelease\fR.tgz for load or upgrade. - -.TP 10 --I \fIinstall\(uloptions\fR -.NL -Specifies the software install options. - -.TP 10 --U \fIupgrade\(uloptions\fR -.NL -Specifies the software upgrade options. - -.TP 10 --T \fIproduct\fR -.NL -Specifies the product type to install. Default is IntelOPA-Basic. \fI\fR or IntelOPA-IFS. \fI\fR where \fI\fR is the distribution and CPU. - -.TP 10 --P \fIpackages\fR -.NL -Specifies the packages to install. Default is oftools ipoib psm\(ulmpi - -.TP 10 --m \fInetmask\fR -.NL -Specifies the IPoIB netmask to use for configipoib operation. - -.TP 10 --S -.NL -Securely prompts for user password on remote system. - -.TP 10 -\fIoperation\fR -.NL -Performs the specified \fIoperation\fR, which can be one or more of the following: - -.RS -.TP 10 - -.sp -load -Starts initial installation of all hosts. - -.RE - -.RS -.TP 10 - -.sp -upgrade -Upgrades installation of all hosts. - -.RE - -.RS -.TP 10 - -.sp -configipoib -Creates ifcfg-ib1 using host IP address from /etc/hosts file. - -.RE - -.RS -.TP 10 - -.sp -reboot -Reboots hosts, ensures they go down and come back. - -.RE - -.RS -.TP 10 - -.sp -sacache -Confirms sacache has all hosts in it. - -.RE - -.RS -.TP 10 - -.sp -ipoibping -Verifies this host can ping each host through IPoIB. - -.RE - -.RS -.TP 10 - -.sp -mpiperf -Verifies latency and bandwidth for each host. - -.RE - -.RS -.TP 10 - -.sp -mpiperfdeviation -Verifies latency and bandwidth for each host against a defined threshold (or relative to average host performance). - -.RE - -.SH Example -.NL -opahostadmin -c reboot -.br -opahostadmin upgrade -.br -opahostadmin -h \[aq]elrond arwen\[aq] reboot -.br -HOSTS=\[aq]elrond arwen\[aq] opahostadmin reboot -.SH Details -.NL - -.PP -opahostadmin provides detailed logging of its results. During each run, the following files are produced: -.IP \(bu -test.res : Appended with summary results of run. -.IP \(bu -test.log : Appended with detailed results of run. -.IP \(bu -save\(ultmp/ : Contains a directory per failed test with detailed logs. -.IP \(bu -test\(ultmp*/ : Intermediate result files while test is running. -.PP -The -c option removes all log files. -.PP -Results from opahostadmin are grouped into test suites, test cases, and test items. A given run of opahostadmin represents a single test suite. Within a test suite, multiple test cases occur; typically one test case per host being operated on. Some of the more complex operations may have multiple test items per test case. Each test item represents a major step in the overall test case. -.PP -Each opahostadmin run appends to test.res and test.log, and creates temporary files in test\(ultmp$PID in the current directory. test.res provides an overall summary of operations performed and their results. The same information is also displayed while opahostadmin is executing. test.log contains detailed information about what was performed, including the specific commands executed and the resulting output. The test\(ultmp directories contain temporary files which reflect tests in progress (or killed). The logs for any failures are logged in the save\(ultemp directory with a directory per failed test case. If the same test case fails more than once, save\(ultemp retains the information from the first failure. Subsequent runs of opahostadmin are appended to test.log. Intel recommends reviewing failures and using the -c option to remove old logs before subsequent runs of opahostadmin. -.PP -opahostadmin implicitly performs its operations in parallel. However, as for the other tools, \fBFF\(ulMAX\(ulPARALLEL\fR can be exported to change the degree of parallelism. 1000 parallel operations is the default. -.SH Environment Variables -.NL - -.PP -The following environment variables are also used by this command: -.TP 10 -\fBHOSTS\fR -.NL -List of hosts, used if -h option not supplied. - -.TP 10 -\fBHOSTS\(ulFILE\fR -.NL -File containing list of hosts, used in absence of -f and -h. - -.TP 10 -\fBFF\(ulMAX\(ulPARALLEL\fR -.NL -Maximum concurrent operations are performed. - -.TP 10 -\fBFF\(ulSERIALIZE\(ulOUTPUT\fR -.NL -Serialize output of parallel operations (yes or no). - -.TP 10 -\fBFF\(ulTIMEOUT\(ulMULT\fR -.NL -Multiplier for all timeouts associated with this command. Used if the systems are slow for some reason. - -.NL - -.SH opahostadmin Operation Details -.NL - -.PP - -\fB(Host)\fR -Intel recommends that you set up password SSH or SCP for use during this operation. Alternatively, the -S option can be used to securely prompt for a password, in which case the same password is used for all hosts. Alternately, the password may be put in the environment or the opafastfabric.conf file using \fBFF\(ulPASSWORD\fR and \fBFF\(ulROOTPASS\fR. -.TP 10 -load -.NL -Performs an initial installation of Intel(R) Omni-Path Software on a group of hosts. Any existing installation is uninstalled and existing configuration files are removed. Subsequently, the hosts are installed with a default Intel(R) Omni-Path Software configuration. The -I option can be used to select different install packages. Default is oftools ipoib mpi The -r option can be used to specify a release to install other than the one that this host is presently running. The \fIFF\(ulPRODUCT\fR. \fIFF\(ulPRODUCT\(ulVERSION\fR.tgz file (for example, IntelOPA-Basic. \fIversion\fR.tgz) is expected to exist in the directory specified by -d. Default is the current working directory. The specified software is copied to all the selected hosts and installed. - -.TP 10 -upgrade -.NL -Upgrades all selected hosts without modifying existing configurations. This operation is comparable to the -U option when running ./INSTALL manually. The -r option can be used to upgrade to a release different from this host. The default is to upgrade to the same release as this host. The \fIFF\(ulPRODUCT\fR. \fIFF\(ulPRODUCT\(ulVERSION\fR.tgz file (for example, IntelOPA-Basic. \fIversion\fR.tgz) is expected to exist in the directory specified by -d. The default is the current working directory. The specified software is copied to all the end nodes and installed. -.TP 10 -.BR - -.PP - -.B NOTE: -Only components that are currently installed are upgraded. This operation fails for hosts that do not have Intel(R) Omni-Path Software installed. - - -.TP 10 -configipoib -.NL -Creates a ifcfg-ib1 configuration file for each node using the IP address found using the resolver on the node. The standard Linux* resolver is used through the host command. (If running OFA Delta, this option configures ifcfg-ib0 .) - -.IP -If the host is not found, /etc/hosts on the node is checked. The -i option specifies an IPoIB suffix to apply to the host name to create the IPoIB host name for the node. The default suffix is -ib. The -m option specifies a netmask other than the default for the given class of IP address, such as when dividing a class A or B address into smaller IP subnets. IPoIB is configured for a static IP address and is autostarted at boot. For the Intel(R) OP Software Stack, the default /etc/ipoib.cfg file is used, which provides a redundant IPoIB configuration using both ports of the first HFI in the system. -.TP 10 -.BR - -.PP - -.B NOTE: -opahostadmin configipoib now supports DHCP (auto or static options) for configuring the IPoIB interface. You must specify these options in /etc/opa/opafastfabric.conf against the \fBFF\(ulIPOIB\(ulCONFIG\fR variable. If no options are found, the static IP configuration is used by default. If auto is specified, then one IP address from either static or dhcp is chosen. Static is used if the IP address can be obtained out of /etc/hosts or the resolver, otherwise DHCP is used. - - -.TP 10 -reboot -.NL -Reboots the given hosts and ensures they go down and come back up by pinging them during the reboot process. The ping rate is slow (5 seconds), so if the servers boot faster than this, false failures may be seen. - -.TP 10 -sacache -.NL -Verifies the given hosts can properly communicate with the SA and any cached SA data that is up to date. To run this command, Intel(R) Omni-Path Fabric software must be installed and running on the given hosts. The subnet manager and switches must be up. If this test fails: opacmdall \[aq]opasaquery -o desc\[aq] can be run against any problem hosts. - -.TP 10 -.BR - -.PP - -.B NOTE: -This operation requires that the hosts being queried are specified by a resolvable TCP/IP host name. This operation FAILS if the selected hosts are specified by IP address. - - -.TP 10 -ipoibping -.NL -Verifies IPoIB basic operation by ensuring that the host can ping all other nodes through IPoIB. To run this command, Intel(R) Omni-Path Fabric software must be installed, IPoIB must be configured and running on the host, and the given hosts, the SM, and switches must be up. The -i option can specify an alternate IPoIB hostname suffix. - -.TP 10 -mpiperf -.NL -Verifies that MPI is operational and checks MPI end-to-end latency and bandwidth between pairs of nodes (for example, 1-2, 3-4, 5-6). Use this to verify switch latency/hops, PCI bandwidth, and overall MPI performance. The test.res file contains the results of each pair of nodes tested. - -.TP 10 -.BR - -.PP - -.B NOTE: -This option is available for the Intel(R) Omni-Path Fabric Host Software OFA Delta packaging, but is not presently available for other packagings of OFED. - - -.IP -To obtain accurate results, this test should be run at a time when no other stressful applications (for example, MPI jobs or high stress file system operations) are running on the given hosts. -.IP -Bandwidth issues typically indicate server configuration issues (for example, incorrect slot used, incorrect BIOS settings, or incorrect HFI model), or fabric issues (for example, symbol errors, incorrect link width, or speed). Assuming opareport has previously been used to check for link errors and link speed issues, the server configuration should be verified. -.IP -Note that BIOS settings and differences between server models can account for 10-20% differences in bandwidth. For more details about BIOS settings, consult the documentation from the server supplier and/or the server PCI chipset manufacturer. -.TP 10 -mpiperfdeviation -.NL -Specifies the enhanced version of mpiperf that verifies MPI performance. Can be used to verify switch latency/hops, PCI bandwidth, and overall MPI performance. It performs assorted pair-wise bandwidth and latency tests, and reports pairs outside an acceptable tolerance range. The tool identifies specific nodes that have problems and provides a concise summary of results. The test.res file contains the results of each pair of nodes tested. - -.IP -By default, concurrent mode is used to quickly analyze the fabric and host performance. Pairs that have 20% less bandwidth or 50% more latency than the average pair are reported as failures. -.IP -The tool can be run in a sequential or a concurrent mode. Sequential mode runs each host against a reference host. By default, the reference host is selected based on the best performance from a quick test of the first 40 hosts. In concurrent mode, hosts are paired up and all pairs are run concurrently. Since there may be fabric contention during such a run, any poor performing pairs are then rerun sequentially against the reference host. -.IP -Concurrent mode runs the tests in the shortest amount of time, however, the results could be slightly less accurate due to switch contention. In heavily oversubscribed fabric designs, if concurrent mode is producing unexpectedly low performance, try sequential mode. -.TP 10 -.BR - -.PP - -.B NOTE: -This option is available for the Intel(R) Omni-Path Fabric Host Software OFA Delta packaging, but is not presently available for other packagings of OFED. - - -.IP -To obtain accurate results, this test should be run at a time when no other stressful applications (for example, MPI jobs, high stress file system operations) are running on the given hosts. -.IP -Bandwidth issues typically indicate server configuration issues (for example, incorrect slot used, incorrect BIOS settings, or incorrect HFI model), or fabric issues (for example, symbol errors, incorrect link width, or speed). Assuming opareport has previously been used to check for link errors and link speed issues, the server configuration should be verified. -.IP -Note that BIOS settings and differences between server models can account for 10-20% differences in bandwidth. A result 5-10% below the average is typically not cause for serious alarm, but may reflect limitations in the server design or the chosen BIOS settings. -.IP -For more details about BIOS settings, consult the documentation from the server supplier and/or the server PCI chipset manufacturer. -.IP -The deviation application supports a number of parameters which allow for more precise control over the mode, benchmark and pass/fail criteria. The parameters to use can be selected using the \fBFF\(ulDEVIATION\(ulARGS\fR configuration parameter in opafastfabric.conf -.IP -Available parameters for deviation application: -.IP - -.br -[-bwtol bwtol] [-bwdelta MBs] [-bwthres MBs] -.br -[-bwloop count] [-bwsize size] [-lattol latol] -.br -[-latdelta usec] [-latthres usec] [-latloop count] -.br -[-latsize size][-c] [-b] [-v] [-vv] -.br -[-h reference\(ulhost] - -.br - -.RS -.TP 10 - -.sp --bwtol -Specifies the percent of bandwidth degradation allowed below average value. - -.RE - -.RS -.TP 10 - -.sp --bwbidir -Performs a bidirectional bandwidth test. - -.RE - -.RS -.TP 10 - -.sp --bwunidir -Performs a unidirectional bandwidth test (Default). - -.RE - -.RS -.TP 10 - -.sp --bwdelta -Specifies the limit in MB/s of bandwidth degradation allowed below average value. - -.RE - -.RS -.TP 10 - -.sp --bwthres -Specifies the lower limit in MB/s of bandwidth allowed. - -.RE - -.RS -.TP 10 - -.sp --bwloop -Specifies the number of loops to execute each bandwidth test. - -.RE - -.RS -.TP 10 - -.sp --bwsize -Specifies the size of message to use for bandwidth test. - -.RE - -.RS -.TP 10 - -.sp --lattol -Specifies the percent of latency degradation allowed above average value. - -.RE - -.RS -.TP 10 - -.sp --latdelta -Specifies the imit in µsec of latency degradation allowed above average value. - -.RE - -.RS -.TP 10 - -.sp --latthres -Specifies the lower limit in µsec of latency allowed. - -.RE - -.RS -.TP 10 - -.sp --latloop -Specifies the number of loops to execute each latency test. - -.RE - -.RS -.TP 10 - -.sp --latsize -Specifies the size of message to use for latency test. - -.RE - -.RS -.TP 10 - -.sp --c -Runs test pairs concurrently instead of the default of sequential. - -.RE - -.RS -.TP 10 - -.sp --b -When comparing results against tolerance and delta, uses best instead of average. - -.RE - -.RS -.TP 10 - -.sp --v -Specifies the verbose output. - -.RE - -.RS -.TP 10 - -.sp --vv -Specifies the very verbose output. - -.RE - -.RS -.TP 10 - -.sp --h -Specifies the reference host to use for sequential pairing. - -.RE - -.IP -Both bwtol and bwdelta must be exceeded to fail bandwidth test. -.IP -When bwthres is supplied, bwtol and bwdelta are ignored. -.IP -Both lattol and latdelta must be exceeded to fail latency test. -.IP -When latthres is supplied, lattol and latdelta are ignored. -.IP -For consistency with OSU benchmarks, MB/s is defined as 1000000 bytes/s. +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opahostadmin 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opahostadmin + + +.PP + +\fB(Host)\fR +Performs a number of multi-step host initialization and verification operations, including upgrading software or firmware, rebooting hosts, and other operations. In general, operations performed by opahostadmin involve a login to one or more host systems. +.SH Syntax +opahostadmin [-c] [-i \fIipoib\(ulsuffix\fR] [-f \fIhostfile\fR] [-h \[aq]\fIhosts\fR\[aq]] +.br +[-r \fIrelease\fR] +[-I \fIinstall\(uloptions\fR] [-U \fIupgrade\(uloptions\fR] [-d \fIdir\fR] +.br +[-T \fIproduct\fR] +[-P \fIpackages\fR] [-m \fInetmask\fR] [-S] \fIoperation\fR ... +.SH Options + +.TP 10 +--help + +Produces full help text. + +.TP 10 +-c + +Overwrites the result files from any previous run before starting this run. + +.TP 10 +-i \fIipoib\(ulsuffix\fR + +Specifies the suffix to apply to host names to create IPoIB host names. Default is -opa. + +.TP 10 +-f \fIhostfile\fR + +Specifies the file with the names of hosts in a cluster. Default is /etc/opa/hosts file. + +.TP 10 +-h \fIhosts\fR + +Specifies the list of hosts to execute the operation against. + +.TP 10 +-r \fIrelease\fR + +Specifies the software version to load/upgrade to. Default is the version of Intel(R) Omni-Path Software presently being run on the server. + +.TP 10 +-d \fIdir\fR + +Specifies the directory to retrieve \fIproduct\fR. \fIrelease\fR.tgz for load or upgrade. + +.TP 10 +-I \fIinstall\(uloptions\fR + +Specifies the software install options. + +.TP 10 +-U \fIupgrade\(uloptions\fR + +Specifies the software upgrade options. + +.TP 10 +-T \fIproduct\fR + +Specifies the product type to install. Default is IntelOPA-Basic. \fI\fR or IntelOPA-IFS. \fI\fR where \fI\fR is the distribution and CPU. + +.TP 10 +-P \fIpackages\fR + +Specifies the packages to install. Default is oftools ipoib psm\(ulmpi + +.TP 10 +-m \fInetmask\fR + +Specifies the IPoIB netmask to use for configipoib operation. + +.TP 10 +-S + +Securely prompts for user password on remote system. + +.TP 10 +\fIoperation\fR + +Performs the specified \fIoperation\fR, which can be one or more of the following: + +.RS +.TP 10 + +.sp +load +Starts initial installation of all hosts. + +.RE + +.RS +.TP 10 + +.sp +upgrade +Upgrades installation of all hosts. + +.RE + +.RS +.TP 10 + +.sp +configipoib +Creates ifcfg-ib1 using host IP address from /etc/hosts file. + +.RE + +.RS +.TP 10 + +.sp +reboot +Reboots hosts, ensures they go down and come back. + +.RE + +.RS +.TP 10 + +.sp +sacache +Confirms sacache has all hosts in it. + +.RE + +.RS +.TP 10 + +.sp +ipoibping +Verifies this host can ping each host through IPoIB. + +.RE + +.RS +.TP 10 + +.sp +mpiperf +Verifies latency and bandwidth for each host. + +.RE + +.RS +.TP 10 + +.sp +mpiperfdeviation +Verifies latency and bandwidth for each host against a defined threshold (or relative to average host performance). + +.RE + +.SH Example +opahostadmin -c reboot +.br + +opahostadmin upgrade +.br + +opahostadmin -h \[aq]elrond arwen\[aq] reboot +.br + +HOSTS=\[aq]elrond arwen\[aq] opahostadmin reboot +.SH Details + +.PP +opahostadmin provides detailed logging of its results. During each run, the following files are produced: +.IP \(bu +test.res : Appended with summary results of run. +.IP \(bu +test.log : Appended with detailed results of run. +.IP \(bu +save\(ultmp/ : Contains a directory per failed test with detailed logs. +.IP \(bu +test\(ultmp*/ : Intermediate result files while test is running. +.PP +The -c option removes all log files. +.PP +Results from opahostadmin are grouped into test suites, test cases, and test items. A given run of opahostadmin represents a single test suite. Within a test suite, multiple test cases occur; typically one test case per host being operated on. Some of the more complex operations may have multiple test items per test case. Each test item represents a major step in the overall test case. +.PP +Each opahostadmin run appends to test.res and test.log, and creates temporary files in test\(ultmp$PID in the current directory. test.res provides an overall summary of operations performed and their results. The same information is also displayed while opahostadmin is executing. test.log contains detailed information about what was performed, including the specific commands executed and the resulting output. The test\(ultmp directories contain temporary files which reflect tests in progress (or killed). The logs for any failures are logged in the save\(ultemp directory with a directory per failed test case. If the same test case fails more than once, save\(ultemp retains the information from the first failure. Subsequent runs of opahostadmin are appended to test.log. Intel recommends reviewing failures and using the -c option to remove old logs before subsequent runs of opahostadmin. +.PP +opahostadmin implicitly performs its operations in parallel. However, as for the other tools, \fBFF\(ulMAX\(ulPARALLEL\fR can be exported to change the degree of parallelism. 1000 parallel operations is the default. +.SH Environment Variables + +.PP +The following environment variables are also used by this command: +.TP 10 +\fBHOSTS\fR + +List of hosts, used if -h option not supplied. + +.TP 10 +\fBHOSTS\(ulFILE\fR + +File containing list of hosts, used in absence of -f and -h. + +.TP 10 +\fBFF\(ulMAX\(ulPARALLEL\fR + +Maximum concurrent operations are performed. + +.TP 10 +\fBFF\(ulSERIALIZE\(ulOUTPUT\fR + +Serialize output of parallel operations (yes or no). + +.TP 10 +\fBFF\(ulTIMEOUT\(ulMULT\fR + +Multiplier for all timeouts associated with this command. Used if the systems are slow for some reason. + + +.SH opahostadmin Operation Details + +.PP + +\fB(Host)\fR +Intel recommends that you set up password SSH or SCP for use during this operation. Alternatively, the -S option can be used to securely prompt for a password, in which case the same password is used for all hosts. Alternately, the password may be put in the environment or the opafastfabric.conf file using \fBFF\(ulPASSWORD\fR and \fBFF\(ulROOTPASS\fR. +.TP 10 +load + +Performs an initial installation of Intel(R) Omni-Path Software on a group of hosts. Any existing installation is uninstalled and existing configuration files are removed. Subsequently, the hosts are installed with a default Intel(R) Omni-Path Software configuration. The -I option can be used to select different install packages. Default is oftools ipoib mpi The -r option can be used to specify a release to install other than the one that this host is presently running. The \fIFF\(ulPRODUCT\fR. \fIFF\(ulPRODUCT\(ulVERSION\fR.tgz file (for example, IntelOPA-Basic. \fIversion\fR.tgz) is expected to exist in the directory specified by -d. Default is the current working directory. The specified software is copied to all the selected hosts and installed. + +.TP 10 +upgrade + +Upgrades all selected hosts without modifying existing configurations. This operation is comparable to the -U option when running ./INSTALL manually. The -r option can be used to upgrade to a release different from this host. The default is to upgrade to the same release as this host. The \fIFF\(ulPRODUCT\fR. \fIFF\(ulPRODUCT\(ulVERSION\fR.tgz file (for example, IntelOPA-Basic. \fIversion\fR.tgz) is expected to exist in the directory specified by -d. The default is the current working directory. The specified software is copied to all the end nodes and installed. +.TP 10 +.BR + +.PP + +.B NOTE: +Only components that are currently installed are upgraded. This operation fails for hosts that do not have Intel(R) Omni-Path Software installed. + + +.TP 10 +configipoib + +Creates a ifcfg-ib1 configuration file for each node using the IP address found using the resolver on the node. The standard Linux* resolver is used through the host command. (If running OFA Delta, this option configures ifcfg-ib0 .) + +.IP +If the host is not found, /etc/hosts on the node is checked. The -i option specifies an IPoIB suffix to apply to the host name to create the IPoIB host name for the node. The default suffix is -ib. The -m option specifies a netmask other than the default for the given class of IP address, such as when dividing a class A or B address into smaller IP subnets. IPoIB is configured for a static IP address and is autostarted at boot. For the Intel(R) OP Software Stack, the default /etc/ipoib.cfg file is used, which provides a redundant IPoIB configuration using both ports of the first HFI in the system. +.TP 10 +.BR + +.PP + +.B NOTE: +opahostadmin configipoib now supports DHCP (auto or static options) for configuring the IPoIB interface. You must specify these options in /etc/opa/opafastfabric.conf against the \fBFF\(ulIPOIB\(ulCONFIG\fR variable. If no options are found, the static IP configuration is used by default. If auto is specified, then one IP address from either static or dhcp is chosen. Static is used if the IP address can be obtained out of /etc/hosts or the resolver, otherwise DHCP is used. + + +.TP 10 +reboot + +Reboots the given hosts and ensures they go down and come back up by pinging them during the reboot process. The ping rate is slow (5 seconds), so if the servers boot faster than this, false failures may be seen. + +.TP 10 +sacache + +Verifies the given hosts can properly communicate with the SA and any cached SA data that is up to date. To run this command, Intel(R) Omni-Path Fabric software must be installed and running on the given hosts. The subnet manager and switches must be up. If this test fails: opacmdall \[aq]opasaquery -o desc\[aq] can be run against any problem hosts. + +.TP 10 +.BR + +.PP + +.B NOTE: +This operation requires that the hosts being queried are specified by a resolvable TCP/IP host name. This operation FAILS if the selected hosts are specified by IP address. + + +.TP 10 +ipoibping + +Verifies IPoIB basic operation by ensuring that the host can ping all other nodes through IPoIB. To run this command, Intel(R) Omni-Path Fabric software must be installed, IPoIB must be configured and running on the host, and the given hosts, the SM, and switches must be up. The -i option can specify an alternate IPoIB hostname suffix. + +.TP 10 +mpiperf + +Verifies that MPI is operational and checks MPI end-to-end latency and bandwidth between pairs of nodes (for example, 1-2, 3-4, 5-6). Use this to verify switch latency/hops, PCI bandwidth, and overall MPI performance. The test.res file contains the results of each pair of nodes tested. + +.TP 10 +.BR + +.PP + +.B NOTE: +This option is available for the Intel(R) Omni-Path Fabric Host Software OFA Delta packaging, but is not presently available for other packagings of OFED. + + +.IP +To obtain accurate results, this test should be run at a time when no other stressful applications (for example, MPI jobs or high stress file system operations) are running on the given hosts. +.IP +Bandwidth issues typically indicate server configuration issues (for example, incorrect slot used, incorrect BIOS settings, or incorrect HFI model), or fabric issues (for example, symbol errors, incorrect link width, or speed). Assuming opareport has previously been used to check for link errors and link speed issues, the server configuration should be verified. +.IP +Note that BIOS settings and differences between server models can account for 10-20% differences in bandwidth. For more details about BIOS settings, consult the documentation from the server supplier and/or the server PCI chipset manufacturer. +.TP 10 +mpiperfdeviation + +Specifies the enhanced version of mpiperf that verifies MPI performance. Can be used to verify switch latency/hops, PCI bandwidth, and overall MPI performance. It performs assorted pair-wise bandwidth and latency tests, and reports pairs outside an acceptable tolerance range. The tool identifies specific nodes that have problems and provides a concise summary of results. The test.res file contains the results of each pair of nodes tested. + +.IP +By default, concurrent mode is used to quickly analyze the fabric and host performance. Pairs that have 20% less bandwidth or 50% more latency than the average pair are reported as failures. +.IP +The tool can be run in a sequential or a concurrent mode. Sequential mode runs each host against a reference host. By default, the reference host is selected based on the best performance from a quick test of the first 40 hosts. In concurrent mode, hosts are paired up and all pairs are run concurrently. Since there may be fabric contention during such a run, any poor performing pairs are then rerun sequentially against the reference host. +.IP +Concurrent mode runs the tests in the shortest amount of time, however, the results could be slightly less accurate due to switch contention. In heavily oversubscribed fabric designs, if concurrent mode is producing unexpectedly low performance, try sequential mode. +.TP 10 +.BR + +.PP + +.B NOTE: +This option is available for the Intel(R) Omni-Path Fabric Host Software OFA Delta packaging, but is not presently available for other packagings of OFED. + + +.IP +To obtain accurate results, this test should be run at a time when no other stressful applications (for example, MPI jobs, high stress file system operations) are running on the given hosts. +.IP +Bandwidth issues typically indicate server configuration issues (for example, incorrect slot used, incorrect BIOS settings, or incorrect HFI model), or fabric issues (for example, symbol errors, incorrect link width, or speed). Assuming opareport has previously been used to check for link errors and link speed issues, the server configuration should be verified. +.IP +Note that BIOS settings and differences between server models can account for 10-20% differences in bandwidth. A result 5-10% below the average is typically not cause for serious alarm, but may reflect limitations in the server design or the chosen BIOS settings. +.IP +For more details about BIOS settings, consult the documentation from the server supplier and/or the server PCI chipset manufacturer. +.IP +The deviation application supports a number of parameters which allow for more precise control over the mode, benchmark and pass/fail criteria. The parameters to use can be selected using the \fBFF\(ulDEVIATION\(ulARGS\fR configuration parameter in opafastfabric.conf +.IP +Available parameters for deviation application: +.IP + +.br +[-bwtol bwtol] [-bwdelta MBs] [-bwthres MBs] +.br + +[-bwloop count] [-bwsize size] [-lattol latol] +.br + +[-latdelta usec] [-latthres usec] [-latloop count] +.br + +[-latsize size][-c] [-b] [-v] [-vv] +.br + +[-h reference\(ulhost] + +.br + +.RS +.TP 10 + +.sp +-bwtol +Specifies the percent of bandwidth degradation allowed below average value. + +.RE + +.RS +.TP 10 + +.sp +-bwbidir +Performs a bidirectional bandwidth test. + +.RE + +.RS +.TP 10 + +.sp +-bwunidir +Performs a unidirectional bandwidth test (Default). + +.RE + +.RS +.TP 10 + +.sp +-bwdelta +Specifies the limit in MB/s of bandwidth degradation allowed below average value. + +.RE + +.RS +.TP 10 + +.sp +-bwthres +Specifies the lower limit in MB/s of bandwidth allowed. + +.RE + +.RS +.TP 10 + +.sp +-bwloop +Specifies the number of loops to execute each bandwidth test. + +.RE + +.RS +.TP 10 + +.sp +-bwsize +Specifies the size of message to use for bandwidth test. + +.RE + +.RS +.TP 10 + +.sp +-lattol +Specifies the percent of latency degradation allowed above average value. + +.RE + +.RS +.TP 10 + +.sp +-latdelta +Specifies the imit in µsec of latency degradation allowed above average value. + +.RE + +.RS +.TP 10 + +.sp +-latthres +Specifies the lower limit in µsec of latency allowed. + +.RE + +.RS +.TP 10 + +.sp +-latloop +Specifies the number of loops to execute each latency test. + +.RE + +.RS +.TP 10 + +.sp +-latsize +Specifies the size of message to use for latency test. + +.RE + +.RS +.TP 10 + +.sp +-c +Runs test pairs concurrently instead of the default of sequential. + +.RE + +.RS +.TP 10 + +.sp +-b +When comparing results against tolerance and delta, uses best instead of average. + +.RE + +.RS +.TP 10 + +.sp +-v +Specifies the verbose output. + +.RE + +.RS +.TP 10 + +.sp +-vv +Specifies the very verbose output. + +.RE + +.RS +.TP 10 + +.sp +-h +Specifies the reference host to use for sequential pairing. + +.RE + +.IP +Both bwtol and bwdelta must be exceeded to fail bandwidth test. +.IP +When bwthres is supplied, bwtol and bwdelta are ignored. +.IP +Both lattol and latdelta must be exceeded to fail latency test. +.IP +When latthres is supplied, lattol and latdelta are ignored. +.IP +For consistency with OSU benchmarks, MB/s is defined as 1000000 bytes/s. diff --git a/IbaTools/man/opahostsmanalysis.manPage b/IbaTools/man/opahostsmanalysis.manPage index 952ed8d..956b598 100644 --- a/IbaTools/man/opahostsmanalysis.manPage +++ b/IbaTools/man/opahostsmanalysis.manPage @@ -1,124 +1,116 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opahostsmanalysis 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opahostsmanalysis - -.NL - -.PP - -\fB(All)\fR -Performs analysis against the local server only. It is assumed that both the host SM and the FastFabric are installed on the same system. -.PP -The host SM analysis tool checks the following: -.IP \(bu -Host SM software version -.IP \(bu -Host SM configuration file (simple text compare using FF\(ulDIFF\(ulCMD) -.IP \(bu -Host SM health (for example, is it running?) -.SH Syntax -.NL -opahostsmanalysis [-b|-e] [-s] [-d \fIdir\fR] -.SH Options -.NL - -.TP 10 ---help -.NL -Produces full help text. -.TP 10 --b -.NL -Specifies the baseline mode. Default is the compare/check mode. -.TP 10 --e -.NL -Evaluates health only. Default is the compare/check mode. -.TP 10 --s -.NL -Saves history of failures (errors/differences). -.TP 10 --d \fIdir\fR -.NL -Specifies the top-level directory for saving baseline and history of failed checks. Default is /var/usr/lib/opa/analysis -.SH Example -.NL -opahostsmanalysis -.SH Environment Variables -.NL - -.PP -The following environment variables are also used by this command: -.TP 10 -\fBFF\(ulANALYSIS\(ulDIR\fR -.NL -Top-level directory for baselines and failed health checks. -.TP 10 -\fBFF\(ulCURTIME\fR -.NL -Timestamp to use on the directory created in FF\(ulDIFF\(ulCMD. -.TP 10 -\fBFF\(ulDIFF\(ulCMD\fR -.NL -Linux* command to use to compare baseline to latest snapshot. -.SH Details -.NL - -.PP -All files generated by opahostsmanalysis start with hostsm in the file name. -.PP -The opahostsmanalysis tool generates files such as the following within FF\(ulANALYSIS\(ulDIR. The actual file names reflect the individual chassis commands that have been configured using the \fBFF\(ulCHASSIS\(ulHEALTH\fR and \fBFF\(ulCHASSIS\(ulCMDS\fR parameters: -.PP - -\fBHealth Check\fR - -.IP \(bu -latest/hostsm.smstatus - Output of the sm\(ulquery smShowStatus command. -.PP - -\fBBaseline\fR - -.IP \(bu -baseline/hostsm.smver - Host SM version. -.IP \(bu -baseline/hostsm.smconfig - Copy of opafm.xml. -.PP -During a baseline run, the files are also created in FF\(ulANALYSIS\(ulDIR/latest. -.PP - -\fBFull Analysis\fR - -.IP \(bu -latest/hostsm.smstatus - Output of the sm\(ulquery smShowStatus command. -.IP \(bu -latest/hostsm.smver - Host SM version. latest/hostsm.smver.diff - diff of the baseline and latest host SM version. - -.IP \(bu -latest/hostsm.smconfig - Copy of opafm.xml. -.IP \(bu -latest/hostsm.smconfig.diff - diff of the baseline and the latest opafm.xml. -.PP -The .diff files are only created if differences are detected. -.PP -If the -s option is used and failures are detected, files related to the checks that failed are also copied to a time-stamped directory name under FF\(ulANALYSIS\(ulDIR. -.SH Host SM Items Checked Against the Baseline -.NL - -.IP \(bu -SM configuration file. -.IP \(bu -Version of the SM rpm installed on the system. -.SH Host SM Items Also Checked During Health Check -.NL - -.IP \(bu -The SM is in the running state. +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opahostsmanalysis 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opahostsmanalysis + + +.PP + +\fB(All)\fR +Performs analysis against the local server only. It is assumed that both the host SM and the FastFabric are installed on the same system. +.PP +The host SM analysis tool checks the following: +.IP \(bu +Host SM software version +.IP \(bu +Host SM configuration file (simple text compare using FF\(ulDIFF\(ulCMD) +.IP \(bu +Host SM health (for example, is it running?) +.SH Syntax +opahostsmanalysis [-b|-e] [-s] [-d \fIdir\fR] +.SH Options + +.TP 10 +--help + +Produces full help text. +.TP 10 +-b + +Specifies the baseline mode. Default is the compare/check mode. +.TP 10 +-e + +Evaluates health only. Default is the compare/check mode. +.TP 10 +-s + +Saves history of failures (errors/differences). +.TP 10 +-d \fIdir\fR + +Specifies the top-level directory for saving baseline and history of failed checks. Default is /var/usr/lib/opa/analysis +.SH Example +opahostsmanalysis +.SH Environment Variables + +.PP +The following environment variables are also used by this command: +.TP 10 +\fBFF\(ulANALYSIS\(ulDIR\fR + +Top-level directory for baselines and failed health checks. +.TP 10 +\fBFF\(ulCURTIME\fR + +Timestamp to use on the directory created in FF\(ulDIFF\(ulCMD. +.TP 10 +\fBFF\(ulDIFF\(ulCMD\fR + +Linux* command to use to compare baseline to latest snapshot. +.SH Details + +.PP +All files generated by opahostsmanalysis start with hostsm in the file name. +.PP +The opahostsmanalysis tool generates files such as the following within FF\(ulANALYSIS\(ulDIR. The actual file names reflect the individual chassis commands that have been configured using the \fBFF\(ulCHASSIS\(ulHEALTH\fR and \fBFF\(ulCHASSIS\(ulCMDS\fR parameters: +.PP + +\fBHealth Check\fR + +.IP \(bu +latest/hostsm.smstatus - Output of the sm\(ulquery smShowStatus command. +.PP + +\fBBaseline\fR + +.IP \(bu +baseline/hostsm.smver - Host SM version. +.IP \(bu +baseline/hostsm.smconfig - Copy of opafm.xml. +.PP +During a baseline run, the files are also created in FF\(ulANALYSIS\(ulDIR/latest. +.PP + +\fBFull Analysis\fR + +.IP \(bu +latest/hostsm.smstatus - Output of the sm\(ulquery smShowStatus command. +.IP \(bu +latest/hostsm.smver - Host SM version. latest/hostsm.smver.diff - diff of the baseline and latest host SM version. + +.IP \(bu +latest/hostsm.smconfig - Copy of opafm.xml. +.IP \(bu +latest/hostsm.smconfig.diff - diff of the baseline and the latest opafm.xml. +.PP +The .diff files are only created if differences are detected. +.PP +If the -s option is used and failures are detected, files related to the checks that failed are also copied to a time-stamped directory name under FF\(ulANALYSIS\(ulDIR. +.SH Host SM Items Checked Against the Baseline + +.IP \(bu +SM configuration file. +.IP \(bu +Version of the SM rpm installed on the system. +.SH Host SM Items Also Checked During Health Check + +.IP \(bu +The SM is in the running state. diff --git a/IbaTools/man/opainfo.manPage b/IbaTools/man/opainfo.manPage index 947b5a6..247eed1 100644 --- a/IbaTools/man/opainfo.manPage +++ b/IbaTools/man/opainfo.manPage @@ -1,190 +1,193 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opainfo 1 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opainfo - -.NL - -.PP -Provides summary information for local HFI port(s). -.SH Syntax -.NL -opainfo [-h \fIhfi\fR] [-p \fIport\fR] [-o \fItype\fR] [-g] [-d \fIdetail\fR] [-s pm\(ulsl] -.br -[-v [-v]...] -.NL - -.SH Options -.NL - -.TP 10 ---help -.NL -Produces full help text. - -.TP 10 --h \fIhfi\fR -.NL -Specifies the HFI, numbered 1..n. Using 0 specifies that the -p \fIport\fR port is a system-wide port number. Default is 0. - -.TP 10 --p \fIport\fR -.NL -Specifies the port, numbered 1 to n. Using 0 specifies the first active port across all HFIs/ports. Default is 1 which indicates all ports. If selected, the tool returns information on all available ports if p is not defined. - -.TP 10 --o \fItype\fR -.NL -Specifies the output type and can appear more than once. - -.TP 10 -.BR - -.PP - -.B NOTE: -Behavior without -o gives a brief summary of portinfo, counters and cableinfo. - -.RS -.TP 10 - -.sp -info -Outputs detailed portinfo. -.RE - -.RS -.TP 10 - -.sp -stats -Outputs detailed port counters. -.RE - -.TP 10 --g -.NL -Output is displayed in line-by-line format. Default is summary format. - -.TP 10 --d \fIdetail\fR -.NL -Output detail level. Range is 0 - 2. CableInfo only. Default is 0. - -.TP 10 -.BR - -.PP - -.B NOTE: --d option is ignored when used with -o type. - -.RS -.TP 10 - -.sp -0 -Minimal crucial information (for example, cable length, vendor) - -.RE - -.RS -.TP 10 - -.sp -1 -Brief summary - -.RE - -.RS -.TP 10 - -.sp -2 -Extended brief summary - -.RE - -.TP 10 --s \fIpm\(ulsl\fR -.NL -Specifies different Service Level for PMA traffic. - -.NL - -.SH -h and -p options permit a variety of selections: -.NL - -.TP 10 --h 0 -.NL -First active port in system (Default). - -.TP 10 --h 0 -p 0 -.NL -First active port in system. - -.TP 10 --h \fIx\fR -.NL -First active port on HFI \fIx\fR. - -.TP 10 --h \fIx\fR \fI\fR-p 0 -.NL -First active port on HFI \fIx\fR. - -.TP 10 --h 0 -p \fIy\fR -.NL -Port \fIy\fR within system (no matter which ports are active). - -.TP 10 --h \fIx\fR \fI\fR-p \fIy\fR -.NL -HFI \fIx\fR, port \fIy\fR. - -.NL - -.SH Debug Options -.NL - -.TP 10 --v -.NL -Specifies the verbose output. Additional invocations (-v -v ...) turn on debugging, openib debugging, and libibumad debugging. - -.SH Examples -.NL -opainfo -.br -hfi1\(ul0:1 PortGID:0xfe80000000000000:001175010165b19c -.br -PortState: Active -.br -LinkSpeed Act: 25Gb En: 25Gb -.br -LinkWidth Act: 4 En: 4 -.br -LinkWidthDnGrd ActTx: 4 Rx: 4 En: 3,4 -.br -LCRC Act: 14-bit En: 14-bit,16-bit,48-bit Mgmt: True -.br -LID: 0x00000001-0x00000001 SM LID: 0x00000002 SL: 0 -.br -QSFP: PassiveCu, 1m FCI Electronics P/N 10131941-2010LF Rev 5 -.br -Xmit Data: 22581581 MB Pkts: 5100825193 -.br -Recv Data: 18725619 MB Pkts: 4024569756 -.br -Link Quality: 5 (Excellent) +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opainfo 1 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opainfo + + +.PP +Provides summary information for local HFI port(s). +.SH Syntax +opainfo [-h \fIhfi\fR] [-p \fIport\fR] [-o \fItype\fR] [-g] [-d \fIdetail\fR] +[-s pm\(ulsl] +.br +[-v [-v]...] + +.SH Options + +.TP 10 +--help + +Produces full help text. + +.TP 10 +-h \fIhfi\fR + +Specifies the HFI, numbered 1..n. Using 0 specifies that the -p \fIport\fR port is a system-wide port number. Default is 0. + +.TP 10 +-p \fIport\fR + +Specifies the port, numbered 1 to n. Using 0 specifies the first active port across all HFIs/ports. Default is 1 which indicates all ports. If selected, the tool returns information on all available ports if p is not defined. + +.TP 10 +-o \fItype\fR + +Specifies the output type and can appear more than once. + +.TP 10 +.BR + +.PP + +.B NOTE: +Behavior without -o gives a brief summary of portinfo, counters and cableinfo. + +.RS +.TP 10 + +.sp +info +Outputs detailed portinfo. +.RE + +.RS +.TP 10 + +.sp +stats +Outputs detailed port counters. +.RE + +.TP 10 +-g + +Output is displayed in line-by-line format. Default is summary format. + +.TP 10 +-d \fIdetail\fR + +Output detail level. Range is 0 - 2. CableInfo only. Default is 0. + +.TP 10 +.BR + +.PP + +.B NOTE: +-d option is ignored when used with -o type. + +.RS +.TP 10 + +.sp +0 +Minimal crucial information (for example, cable length, vendor) + +.RE + +.RS +.TP 10 + +.sp +1 +Brief summary + +.RE + +.RS +.TP 10 + +.sp +2 +Extended brief summary + +.RE + +.TP 10 +-s \fIpm\(ulsl\fR + +Specifies different Service Level for PMA traffic. + + +.SH -h and -p options permit a variety of selections: + +.TP 10 +-h 0 + +First active port in system (Default). + +.TP 10 +-h 0 -p 0 + +First active port in system. + +.TP 10 +-h \fIx\fR + +First active port on HFI \fIx\fR. + +.TP 10 +-h \fIx\fR \fI\fR-p 0 + +First active port on HFI \fIx\fR. + +.TP 10 +-h 0 -p \fIy\fR + +Port \fIy\fR within system (no matter which ports are active). + +.TP 10 +-h \fIx\fR \fI\fR-p \fIy\fR + +HFI \fIx\fR, port \fIy\fR. + + +.SH Debug Options + +.TP 10 +-v + +Specifies the verbose output. Additional invocations (-v -v ...) turn on debugging, openib debugging, and libibumad debugging. + +.SH Examples +opainfo +.br + + hfi1\(ul0:1 PortGID:0xfe80000000000000:001175010165b19c +.br + + PortState: Active +.br + + LinkSpeed Act: 25Gb En: 25Gb +.br + + LinkWidth Act: 4 En: 4 +.br + + LinkWidthDnGrd ActTx: 4 Rx: 4 En: 3,4 +.br + + LCRC Act: 14-bit En: 14-bit,16-bit,48-bit Mgmt: True +.br + + LID: 0x00000001-0x00000001 SM LID: 0x00000002 SL: 0 +.br + + QSFP: PassiveCu, 1m FCI Electronics P/N 10131941-2010LF Rev 5 +.br + + Xmit Data: 22581581 MB Pkts: 5100825193 +.br + + Recv Data: 18725619 MB Pkts: 4024569756 +.br + + Link Quality: 5 (Excellent) diff --git a/IbaTools/man/opaledports.manPage b/IbaTools/man/opaledports.manPage index 30b30b5..9b85a5d 100644 --- a/IbaTools/man/opaledports.manPage +++ b/IbaTools/man/opaledports.manPage @@ -1,97 +1,96 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opaledports 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opaledports - -.NL - -.PP -Toggles the beaconing LED state of HFIs, switches, and switch ports. opaledports is a useful aid for finding specific physical nodes in a crowded data center. It supports the CSV link format provided by opaextractsellinks. -.SH Syntax -.NL -opaledports [-h hfi] [-p port] [-C] [-s|-d] [on|off] < portlist.csv -.SH Options -.NL - -.TP 10 ---help -.NL -Produces full help text. - -.TP 10 --h \fIhfi\fR -.NL -Specifies the HFI, numbered 1..n. Using 0 specifies that the -p \fIport\fR port is a system-wide port number. Default is 0. - -.TP 10 --p \fIport\fR -.NL -Specifies the port, numbered 1..n. Using 0 specifies the first active port. Default is 0. - -.TP 10 --C -.NL -Clears beaconing LED on all ports. - -.IP - -\fBNOTE:\fR -If -C is entered, no other options are valid. -.TP 10 --s -.NL -Affects source side (first node) of link only. - -.TP 10 --d -.NL -Affects destination side (second node) of link only. - -.TP 10 -on|off -.NL -Turns on or off the beaconing LED. Options include: - -.RS -.TP 10 - -.sp -on -Turns on beaconing LED. - -.RE - -.RS -.TP 10 - -.sp -off -Turns off beaconing LED. - -.RE - -.TP 10 -portlist.csv -.NL -Specifies the file listing the links to process. The list is of the form: - -.IP -NodeGUID;PortNum;NodeType;NodeDesc;NodeGUID;PortNum; -.br -NodeType;NodeDesc;Dontcare -.SH Examples -.NL -echo "0x001175010165ac1d;1;FI;phkpstl035 hfi1\(ul0"|opaledports on -.br -opaledports on < portlist.csv -.br -opaextractsellinks -F led:on | opaledports off -.br -opaledports -C +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opaledports 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opaledports + + +.PP +Toggles the beaconing LED state of HFIs, switches, and switch ports. opaledports is a useful aid for finding specific physical nodes in a crowded data center. It supports the CSV link format provided by opaextractsellinks. +.SH Syntax +opaledports [-h hfi] [-p port] [-C] [-s|-d] [on|off] < portlist.csv +.SH Options + +.TP 10 +--help + +Produces full help text. + +.TP 10 +-h \fIhfi\fR + +Specifies the HFI, numbered 1..n. Using 0 specifies that the -p \fIport\fR port is a system-wide port number. Default is 0. + +.TP 10 +-p \fIport\fR + +Specifies the port, numbered 1..n. Using 0 specifies the first active port. Default is 0. + +.TP 10 +-C + +Clears beaconing LED on all ports. + +.IP + +\fBNOTE:\fR +If -C is entered, no other options are valid. +.TP 10 +-s + +Affects source side (first node) of link only. + +.TP 10 +-d + +Affects destination side (second node) of link only. + +.TP 10 +on|off + +Turns on or off the beaconing LED. Options include: + +.RS +.TP 10 + +.sp +on +Turns on beaconing LED. + +.RE + +.RS +.TP 10 + +.sp +off +Turns off beaconing LED. + +.RE + +.TP 10 +portlist.csv + +Specifies the file listing the links to process. The list is of the form: + +.IP +NodeGUID;PortNum;NodeType;NodeDesc;NodeGUID;PortNum; +.br +NodeType;NodeDesc;Dontcare +.SH Examples +echo "0x001175010165ac1d;1;FI;phkpstl035 hfi1\(ul0"|opaledports on +.br + +opaledports on < portlist.csv +.br + +opaextractsellinks -F led:on | opaledports off +.br + +opaledports -C diff --git a/IbaTools/man/opalinkanalysis.manPage b/IbaTools/man/opalinkanalysis.manPage index be63741..8cc2aef 100644 --- a/IbaTools/man/opalinkanalysis.manPage +++ b/IbaTools/man/opalinkanalysis.manPage @@ -1,305 +1,303 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opalinkanalysis 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opalinkanalysis - -.NL - -.PP - -\fB(Switch)\fR -Encapsulates the capabilities for link analysis. Additionally, this tool includes cable and fabric topology verification capabilities. This tool is built on top of opareport (and its analysis capabilities), and accepts the same syntax for input topology and snapshot files. -.PP -In addition to being able to run assorted opareport link analysis reports, and generate human-readable output, this tool additionally analyzes the results and appends a concise summary of issues found to the FF\(ulRESULT\(ulDIR/punchlist.csv file. -.SH Syntax -.NL -opalinkanalysis [-U] [-t \fIportsfile\fR] [-p \fIports\fR] [-T \fItopology\(ulinput\fR] -.br -[-X \fIsnapshot\(ulinput\fR] [-x \fIsnapshot\(ulsuffix\fR] [-c \fIfile\fR] reports ... -.SH Options -.NL - -.TP 10 ---help -.NL -Produces full help text. - -.TP 10 --U -.NL -Omits unexpected devices and links in punchlist file from verify reports. - -.TP 10 --t \fIportsfile\fR -.NL -Specifies the file with list of local HFI ports used to access fabric(s) for analysis. Default is /etc/opa/ports. - -.TP 10 --p \fIports\fR -.NL -Specifies the list of local HFI ports used to access fabrics for analysis. - -.IP -Default is first active port. The first HFI in the system is 1. The first port on an HFI is 1. Uses the format hfi:port, -.br -for example: -.RS -.TP 10 - -.sp -0:0 -First active port in system. - -.RE - -.RS -.TP 10 - -.sp -0:y -Port \fIy\fR within system. - -.RE - -.RS -.TP 10 - -.sp -x:0 -First active port on HFI \fIx\fR. - -.RE - -.RS -.TP 10 - -.sp -x:y -HFI \fIx\fR, port \fIy\fR. - -.RE - -.TP 10 --T \fItopology\(ulinput\fR -.NL -Specifies the name of a topology input file to use. Any %P markers in this filename are replaced with the hfi:port being operated on (such as 0:0 or 1:2). Default is /etc/opa/topology.%P.xml. If NONE is specified, does not use any topology\(ulinput files. See -\fIopareport\fR -for more information on topology\(ulinput files. - -.TP 10 --X \fIsnapshot\(ulinput\fR -.NL -Performs analysis using data in \fIsnapshot\(ulinput\fR. \fIsnapshot\(ulinput\fR must have been generated via a previous opareport -o snapshot run. If an errors report is specified, snapshot must have been generated with the opareport -s option. When this option is used, only one port may be specified to select a topology\(ulinput file (unless -T specified). When this option is used, clearerrors and clearhwerrors reports are not permitted. - -.TP 10 --x \fIsnapshot\(ulsuffix\fR -.NL -Creates a snapshot file per selected port. The files are created in FF\(ulRESULT\(ulDIR with names of the form: snapshotSUFFIX. \fIHFI:PORT\fR.xml. - -.TP 10 --c \fIfile\fR -.NL -Specifies the error thresholds configuration file. The default is /etc/opa/opamon.si.conf. - -.TP 10 -\fIreports\fR -.NL -Supports the following reports: -.RS -.TP 10 - -.sp -errors -Specifies link error analysis. - -.RE - -.RS -.TP 10 - -.sp -slowlinks -Specifies links running slower than expected. - -.RE - -.RS -.TP 10 - -.sp -misconfiglinks -Specifies links configured to run slower than supported. - -.RE - -.RS -.TP 10 - -.sp -misconnlinks -Specifies links connected with mismatched speed potential. - -.RE - -.RS -.TP 10 - -.sp -all -Includes all reports above. (errors, slowlinks, misconfiglinks, and misconnlinks) - -.RE - -.RS -.TP 10 - -.sp -verifylinks -Verifies links against topology input. - -.RE - -.RS -.TP 10 - -.sp -verifyextlinks -Verifies links against topology input. Limits analysis to links external to systems. - -.RE - -.RS -.TP 10 - -.sp -verifyfilinks -Verifies links against topology input. Limits analysis to FI links. - -.RE - -.RS -.TP 10 - -.sp -verifyislinks -Verifies links against topology input. Limits analysis to inter-switch links. - -.RE - -.RS -.TP 10 - -.sp -verifyextislinks -Verifies links against topology input. Limits analysis to inter-switch links external to systems. - -.RE - -.RS -.TP 10 - -.sp -verifyfis -Verifies FIs against topology input. - -.RE - -.RS -.TP 10 - -.sp -verifysws -Verifies switches against topology input. - -.RE - -.RS -.TP 10 - -.sp -verifynodes -Verifies FIs and switches against topology input. - -.RE - -.RS -.TP 10 - -.sp -verifysms -Verifies SMs against topology input. - -.RE - -.RS -.TP 10 - -.sp -verifyall -Verifies links, FIs, switches, and SMs against topology input. - -.RE - -.RS -.TP 10 - -.sp -clearerrors -Clears error counters, uses PM if available. - -.RE - -.RS -.TP 10 - -.sp -clearhwerrors -Clears hardware error counters, bypasses PM. - -.RE - -.RS -.TP 10 - -.sp -clear -Includes clearerrors and clearhwerrors. - -.RE - - -.PP -A punchlist of bad links is also appended to the file: FF\(ulRESULT\(ulDIR/punchlist.csv -.SH Examples -.NL -opalinkanalysis errors -.br -opalinkanalysis errors clearerrors -.br -opalinkanalysis -p \[aq]1:1 1:2 2:1 2:2\[aq] -.SH Environment Variables -.NL - -.PP -The following environment variables are also used by this command: -.TP 10 -\fBPORTS\fR -.NL -List of ports, used in absence of -t and -p. - -.TP 10 -\fBPORTS\(ulFILE\fR -.NL -File containing list of ports, used in absence of -t and -p. - -.TP 10 -\fBFF\(ulTOPOLOGY\(ulFILE\fR -.NL -File containing \fItopology\(ulinput\fR, used in absence of -T. +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opalinkanalysis 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opalinkanalysis + + +.PP + +\fB(Switch)\fR +Encapsulates the capabilities for link analysis. Additionally, this tool includes cable and fabric topology verification capabilities. This tool is built on top of opareport (and its analysis capabilities), and accepts the same syntax for input topology and snapshot files. +.PP +In addition to being able to run assorted opareport link analysis reports, and generate human-readable output, this tool additionally analyzes the results and appends a concise summary of issues found to the FF\(ulRESULT\(ulDIR/punchlist.csv file. +.SH Syntax +opalinkanalysis [-U] [-t \fIportsfile\fR] [-p \fIports\fR] [-T \fItopology\(ulinput\fR] +.br + +[-X \fIsnapshot\(ulinput\fR] [-x \fIsnapshot\(ulsuffix\fR] [-c \fIfile\fR] reports ... +.SH Options + +.TP 10 +--help + +Produces full help text. + +.TP 10 +-U + +Omits unexpected devices and links in punchlist file from verify reports. + +.TP 10 +-t \fIportsfile\fR + +Specifies the file with list of local HFI ports used to access fabric(s) for analysis. Default is /etc/opa/ports. + +.TP 10 +-p \fIports\fR + +Specifies the list of local HFI ports used to access fabrics for analysis. + +.IP +Default is first active port. The first HFI in the system is 1. The first port on an HFI is 1. Uses the format hfi:port, +.br +for example: +.RS +.TP 10 + +.sp +0:0 +First active port in system. + +.RE + +.RS +.TP 10 + +.sp +0:y +Port \fIy\fR within system. + +.RE + +.RS +.TP 10 + +.sp +x:0 +First active port on HFI \fIx\fR. + +.RE + +.RS +.TP 10 + +.sp +x:y +HFI \fIx\fR, port \fIy\fR. + +.RE + +.TP 10 +-T \fItopology\(ulinput\fR + +Specifies the name of a topology input file to use. Any %P markers in this filename are replaced with the hfi:port being operated on (such as 0:0 or 1:2). Default is /etc/opa/topology.%P.xml. If NONE is specified, does not use any topology\(ulinput files. See +\fIopareport\fR +for more information on topology\(ulinput files. + +.TP 10 +-X \fIsnapshot\(ulinput\fR + +Performs analysis using data in \fIsnapshot\(ulinput\fR. \fIsnapshot\(ulinput\fR must have been generated via a previous opareport -o snapshot run. If an errors report is specified, snapshot must have been generated with the opareport -s option. When this option is used, only one port may be specified to select a topology\(ulinput file (unless -T specified). When this option is used, clearerrors and clearhwerrors reports are not permitted. + +.TP 10 +-x \fIsnapshot\(ulsuffix\fR + +Creates a snapshot file per selected port. The files are created in FF\(ulRESULT\(ulDIR with names of the form: snapshotSUFFIX. \fIHFI:PORT\fR.xml. + +.TP 10 +-c \fIfile\fR + +Specifies the error thresholds configuration file. The default is /etc/opa/opamon.si.conf. + +.TP 10 +\fIreports\fR + +Supports the following reports: +.RS +.TP 10 + +.sp +errors +Specifies link error analysis. + +.RE + +.RS +.TP 10 + +.sp +slowlinks +Specifies links running slower than expected. + +.RE + +.RS +.TP 10 + +.sp +misconfiglinks +Specifies links configured to run slower than supported. + +.RE + +.RS +.TP 10 + +.sp +misconnlinks +Specifies links connected with mismatched speed potential. + +.RE + +.RS +.TP 10 + +.sp +all +Includes all reports above. (errors, slowlinks, misconfiglinks, and misconnlinks) + +.RE + +.RS +.TP 10 + +.sp +verifylinks +Verifies links against topology input. + +.RE + +.RS +.TP 10 + +.sp +verifyextlinks +Verifies links against topology input. Limits analysis to links external to systems. + +.RE + +.RS +.TP 10 + +.sp +verifyfilinks +Verifies links against topology input. Limits analysis to FI links. + +.RE + +.RS +.TP 10 + +.sp +verifyislinks +Verifies links against topology input. Limits analysis to inter-switch links. + +.RE + +.RS +.TP 10 + +.sp +verifyextislinks +Verifies links against topology input. Limits analysis to inter-switch links external to systems. + +.RE + +.RS +.TP 10 + +.sp +verifyfis +Verifies FIs against topology input. + +.RE + +.RS +.TP 10 + +.sp +verifysws +Verifies switches against topology input. + +.RE + +.RS +.TP 10 + +.sp +verifynodes +Verifies FIs and switches against topology input. + +.RE + +.RS +.TP 10 + +.sp +verifysms +Verifies SMs against topology input. + +.RE + +.RS +.TP 10 + +.sp +verifyall +Verifies links, FIs, switches, and SMs against topology input. + +.RE + +.RS +.TP 10 + +.sp +clearerrors +Clears error counters, uses PM if available. + +.RE + +.RS +.TP 10 + +.sp +clearhwerrors +Clears hardware error counters, bypasses PM. + +.RE + +.RS +.TP 10 + +.sp +clear +Includes clearerrors and clearhwerrors. + +.RE + + +.PP +A punchlist of bad links is also appended to the file: FF\(ulRESULT\(ulDIR/punchlist.csv +.SH Examples +opalinkanalysis errors +.br + +opalinkanalysis errors clearerrors +.br + +opalinkanalysis -p \[aq]1:1 1:2 2:1 2:2\[aq] +.SH Environment Variables + +.PP +The following environment variables are also used by this command: +.TP 10 +\fBPORTS\fR + +List of ports, used in absence of -t and -p. + +.TP 10 +\fBPORTS\(ulFILE\fR + +File containing list of ports, used in absence of -t and -p. + +.TP 10 +\fBFF\(ulTOPOLOGY\(ulFILE\fR + +File containing \fItopology\(ulinput\fR, used in absence of -T. diff --git a/IbaTools/man/opamergeperf2.manPage b/IbaTools/man/opamergeperf2.manPage new file mode 100644 index 0000000..d3259ef --- /dev/null +++ b/IbaTools/man/opamergeperf2.manPage @@ -0,0 +1,52 @@ +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opamergeperf2 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opamergeperf2 + + +.PP +Merges the output from two opaextactperf2 runs from the same fabric. Delta counters for matching links will be computed (before subtracted from after) and a CSV file equivalent to opaextractperf2 \[aq]s output format will be generated suitable for importing into a spreadsheet or parsing by other scripts. +.PP + +.B NOTE: +The before.csv and after.csv input files must be generated from the same fabric, with before.csv containing counters prior to after.csv. Both files must have been generated to contain the +\fIrunning counters\fR + +without any counter clears between before.csv and after.csv, and without using any interval options to opareport that might report delta counters, such as opareport -i or opareport with both --begin and --end options. + +.SH Syntax +opamergeperf2 before.csv after.csv +.SH Options + +.TP 10 +--help + +Produces full help text. + +.TP 10 +before.csv + +A CSV file previously generated by opaextractperf2. + +.TP 10 +after.csv + +A CSV file previously generated by opaextractperf2. + +.SH Examples +opamergeperf2 before.csv after.csv > delta.csv + + +.SH See Also + +.PP + +\fIopaextractperf2\fR + diff --git a/IbaTools/man/opapacketcapture.manPage b/IbaTools/man/opapacketcapture.manPage index 74d3d75..4c3505d 100644 --- a/IbaTools/man/opapacketcapture.manPage +++ b/IbaTools/man/opapacketcapture.manPage @@ -1,102 +1,103 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opapacketcapture 1 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opapacketcapture - -.NL - -.PP -Starts capturing packet data. -.PP -To stop capture and trigger dump, use SIGINT or SIGUSR1. Program dumps packets to file and exits. -.PP - -.B NOTE: -Using opapacketcapture with large amounts of traffic can cause performance issues on the given host. Intel recommends you use opapacketcapture on hosts with lower packet rates and bandwidth. - -.SH Syntax -.NL -opapacketcapture [-o \fIoutfile\fR] [-d \fIdevfile\fR] [-f \fIfilterfile\fR] -.br -[-t \fItriggerfile\fR] [-l \fItriggerlag\fR][-a \fIalarm\fR] [-p \fIpackets\fR] [-s \fImaxblocks\fR] -.br -[-v [-v]] -.SH Options -.NL - -.TP 10 ---help -.NL -Produces full help text. - -.TP 10 --o \fIoutfile\fR -.NL -Specifies the output file for captured packets. -.br -Default is packetDump.pcap - -.TP 10 --d \fIdevfile\fR -.NL -Specifies the device file for capturing packets. -.br - - -.TP 10 --f \fIfilterfile\fR -.NL -Specifies the file used for filtering. If absent, no filtering is done. - -.TP 10 --t \fItriggerfile\fR -.NL -Specifies the file used for triggering a stop capture. If absent, normal triggering is performed. - -.TP 10 --l \fItriggerlag\fR -.NL -Specifies the number of packets to collect after trigger condition is met, before dumping data and exiting. Default is 10. - -.TP 10 --a \fIalarm\fR -.NL -Specifies the number of seconds for alarm trigger to dump capture and exit. - -.TP 10 --p \fIpackets\fR -.NL -Specifies the number of packets for alarm trigger to dump capture and exit. - -.TP 10 --s \fImaxblocks\fR -.NL -Specifies the number of blocks to allocate for ring buffer. Value is in Millions. Default is 2 which corresponds to 128 MiB because 1 block = 64 Bytes. - -.TP 10 --v -.NL -Produces verbose output. (Use verbose Level 1+ to show levels.) - -.SH Example -.NL -# opapacketcapture -.br -opapacketcapture: Capturing packets using 128 MiB buffer -.br -^C -.br -opapacketcapture: Triggered -.br -Number of packets stored is 100 -.PP -In the example above, opapacketcapture operates until -\fBCTRL+C\fR -is entered. +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opapacketcapture 1 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opapacketcapture + + +.PP +Starts capturing packet data. +.PP +To stop capture and trigger dump, use SIGINT or SIGUSR1. Program dumps packets to file and exits. +.PP + +.B NOTE: +Using opapacketcapture with large amounts of traffic can cause performance issues on the given host. Intel recommends you use opapacketcapture on hosts with lower packet rates and bandwidth. + +.SH Syntax +opapacketcapture [-o \fIoutfile\fR] [-d \fIdevfile\fR] [-f \fIfilterfile\fR] +.br +[-t \fItriggerfile\fR] +[-l \fItriggerlag\fR][-a \fIalarm\fR] [-p \fIpackets\fR] [-s \fImaxblocks\fR] +.br +[-v [-v]] +.SH Options + +.TP 10 +--help + +Produces full help text. + +.TP 10 +-o \fIoutfile\fR + +Specifies the output file for captured packets. +.br +Default is packetDump.pcap + +.TP 10 +-d \fIdevfile\fR + +Specifies the device file for capturing packets. +.br + + +.TP 10 +-f \fIfilterfile\fR + +Specifies the file used for filtering. If absent, no filtering is done. + +.TP 10 +-t \fItriggerfile\fR + +Specifies the file used for triggering a stop capture. If absent, normal triggering is performed. + +.TP 10 +-l \fItriggerlag\fR + +Specifies the number of packets to collect after trigger condition is met, before dumping data and exiting. Default is 10. + +.TP 10 +-a \fIalarm\fR + +Specifies the number of seconds for alarm trigger to dump capture and exit. + +.TP 10 +-p \fIpackets\fR + +Specifies the number of packets for alarm trigger to dump capture and exit. + +.TP 10 +-s \fImaxblocks\fR + +Specifies the number of blocks to allocate for ring buffer. Value is in Millions. Default is 2 which corresponds to 128 MiB because 1 block = 64 Bytes. + +.TP 10 +-v + +Produces verbose output. (Use verbose Level 1+ to show levels.) + +.SH Example +# opapacketcapture +.br + +opapacketcapture: Capturing packets using 128 MiB buffer +.br + +^C +.br + +opapacketcapture: Triggered +.br + +Number of packets stored is 100 +.PP +In the example above, opapacketcapture operates until +\fBCTRL+C\fR +is entered. diff --git a/IbaTools/man/opapaquery.manPage b/IbaTools/man/opapaquery.manPage index 5e1f84f..678f4dd 100644 --- a/IbaTools/man/opapaquery.manPage +++ b/IbaTools/man/opapaquery.manPage @@ -1,719 +1,750 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opapaquery 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opapaquery - -.NL - -.PP - -\fB(All)\fR -Performs various queries of the performance management (PM)/performance administration (PA) agent and provides details about fabric performance. Refer to the -\fIIntel(R) Omni-Path Fabric Suite Fabric Manager User Guide\fR - -for a description of the operation and client services of the PM/PA. -.PP -By default, opapaquery queries the most recent data. However, if an image number (\fIimgNum\fR) and/or image offset (\fIimgOff\fR) is provided, the query returns previous sweep data. Queries that access previous sweep data return with the absolute image number representing that data, and therefore have an image offset of zero. -.PP -opapaquery\[aq]s operation is dependent on an Intel(R) Omni-Path Fabric Suite Fabric Manager version 6.0 or greater running as master SM/PM in the fabric. -.PP -By default, opapaquery uses the first active port on the local system. However, if the Fabric Management Node is connected to more than one fabric (for example, a subnet), the HFI and port may be specified to select the fabric whose PA is to be queried. -.SH Syntax -.NL -opapaquery [-v] [-h hfi|-b addr] [-p port] [-x gid] [-E] -.br -[-T ssl\(ulparams] [-o type] [-g groupName] [-l nodeLid] [-P portNumber] -.br -[--timeout] [-G nodeGuid] [-D nodeDesc] [-d delta] [-j date\(ultime] -.br -[-q date\(ultime] [-U] [-s select] [-f focus] [-S start] [-r range] -.br -[-n imgNum] [-O imgOff] [-y imgTime] [-m moveImgNum] [-M moveImgOff] [-V vfName] -.SH Options -.NL - -.TP 10 --v/--verbose -.NL -Specifies the verbose output. - -.TP 10 --h/--hfi \fIhfi\fR -.NL -Specifies the HFI, numbered 1..n. Using 0 specifies that the -p \fIport\fR port is a system-wide port number. Default is 0. - -.TP 10 --b/--oob \fIaddress\fR -.NL -Specifies Out-of-Band address of node running the FE. Can be either hostname, IPv4, or IPv6 address. Default is "127.0.0.1". - -.TP 10 --p/--port \fIport\fR -.NL -Specifies the port. -.RS - -.IP \(bu -In-band: Numbered 1...n. Using 0 specifies the first active port. Default is 0. -.IP \(bu -Out-of-band: Port FE is listening on. Default is 3245. - -.RE - - -.TP 10 --x/--source-gid \fIsrc\(ulgid\fR -.NL -Specifies the source GID of the local GID. (This is required for most Path and Trace Record Queries when Out-of-Band.) - -.TP 10 --E/--feEsm -.NL -Specifies the ESM FE. - -.TP 10 --T/--ssl-params \fIfile\fR -.NL -Specifies the SSL/TLS parameters XML file. Default is /etc/opa/opamgt\(ultls.xml. - -.TP 10 --o/--output \fItype\fR -.NL -Specifies the output type. Default is groupList. See -\fIOutput Types\fR -. - -.TP 10 --g/--groupName \fIgroupName\fR -.NL -Specifies the group name for groupInfo query. - -.TP 10 --l/--lid \fIlid\fR -.NL -Specifies the LID of the node. - -.TP 10 --P/--portNumber \fIportNumber\fR -.NL -Specifies the port number within the node. - -.TP 10 ---timeout -.NL -Specifies the timeout (response wait time) in ms. Default is 1000 ms. - -.TP 10 --G/--nodeGuid -.NL -Specifies the GUID of the node. - -.TP 10 --D/--nodeDesc -.NL -Specifies the description of the node. - -.TP 10 --d/--delta \fIdelta\fR -.NL -Specifies the delta flag for portCounters query - 0 or 1. - -.TP 10 --j/--begin \fIdate\(ultime\fR -.NL -Obtains portCounters over an interval beginning at \fIdate\(ultime\fR. \fIdate\(ultime\fR may be a time entered as HH:MM[:SS] or date as mm/dd/YYYY, dd.mm.YYYY, YYYY-mm-dd or date followed by time; for example, "2016-07-04 14:40". Relative times are taken as "x [second|minute|hour|day](s) ago. - -.TP 10 --q/--end \fIdate\(ultime\fR -.NL -Obtains portCounters over an interval ending at \fIdate\(ultime\fR. \fIdate\(ultime\fR may be a time entered as HH:MM[:SS] or date as mm/dd/YYYY, dd.mm.YYYY, YYYY-mm-dd or date followed by time; for example, "2016-07-04 14:40". Relative times are taken as "x [second|minute|hour|day](s) ago. - -.TP 10 --U/--userCntrs -.NL -Queries by user-controlled counters flag for portCounters. - -.TP 10 --s/--select \fIselect\fR -.NL -Specifies the 32-bit select flag for clearing port counters. - -.IP -Select bits for clrPortCounters. 0 is the least significant bit (rightmost). The clrPortCounters bit descriptions are listed in the order "mask - bit - location" below: -.RS - -.IP \(bu -0x80000000 - 31 - Transmit Data (XmitData) - -.IP \(bu -0x40000000 - 30 - Receive Data (RcvData) - -.IP \(bu -0x20000000 - 29 - Transmit Packets (XmitPkts) - -.IP \(bu -0x10000000 - 28 - Receive Packets (RcvPkts) - -.IP \(bu -0x08000000 - 27 - Multicast Transmit Packets (MulticastXmitPkts) - -.IP \(bu -0x04000000 - 26 - Multicast Receive Packets (MulticastRcvPkts) - -.IP \(bu -0x02000000 - 25 - Transmit Wait (XmitWait) - -.IP \(bu -0x01000000 - 24 - Congestion Discards (CongDiscards) - -.IP \(bu -0x00800000 - 23 - Receive FECN (RcvFECN) - -.IP \(bu -0x00400000 - 22 - Receive BECN (RcvBECN) - -.IP \(bu -0x00200000 - 21 - Transmit Time Congestion (XmitTimeCong) - -.IP \(bu -0x00100000 - 20 - Transmit Time Wasted BW (XmitWastedBW) - -.IP \(bu -0x00080000 - 19 - Transmit Time Wait Data (XmitWaitData) - -.IP \(bu -0x00040000 - 18 - Receive Bubble (RcvBubble) - -.IP \(bu -0x00020000 - 17 - Mark FECN (MarkFECN) - -.IP \(bu -0x00010000 - 16 - Receive Constraint Errors (RcvConstraintErrors) - -.IP \(bu -0x00008000 - 15 - Receive Switch Relay (RcvSwitchRelayErrors) - -.IP \(bu -0x00004000 - 14 - Transmit Discards (XmitDiscards) - -.IP \(bu -0x00002000 - 13 - Transmit Constraint Errors (XmitConstraintErrors) - -.IP \(bu -0x00001000 - 12 - Receive Remote Physical Errors (RcvRemotePhysicalErrors) - -.IP \(bu -0x00000800 - 11 - Local Link Integrity (LocalLinkIntegrityErrors) - -.IP \(bu -0x00000400 - 10 - Receive Errors (RcvErrors) - -.IP \(bu -0x00000200 - 9 - Excessive Buffer Overrun (ExcessiveBufferOverruns) - -.IP \(bu -0x00000100 - 8 - FM Configuration Errors (FMConfigErrors) - -.IP \(bu -0x00000080 - 7 - Link Error Recovery (LinkErrorRecovery) - -.IP \(bu -0x00000040 - 6 - Link Error Downed (LinkDowned) - -.IP \(bu -0x00000020 - 5 - Uncorrectable Errors (UncorrectableErrors) - - -.RE - -.IP -Select bits for clrVfPortCounters. 0 is the least significant bit (rightmost). The clrVfPortCounters bit descriptions are listed in the order "mask - bit - location" below: -.RS - -.IP \(bu -0x80000000 - 31 - VL Transmit Data (VLXmitData) - -.IP \(bu -0x40000000 - 30 - VL Receive Data (VLRcvData) - -.IP \(bu -0x20000000 - 29 - VL Transmit Packets (VLXmitPkts) - -.IP \(bu -0x10000000 - 28 - VL Receive Packets (VLRcvPkts) - -.IP \(bu -0x08000000 - 27 - VL Transmit Discards (VLXmitDiscards) - -.IP \(bu -0x04000000 - 26 - VL Congestion Discards (VLCongDiscards) - -.IP \(bu -0x02000000 - 25 - VL Transmit Wait (VLXmitWait) - -.IP \(bu -0x01000000 - 24 - VL Receive FECN (VLRcvFECN) - -.IP \(bu -0x00800000 - 23 - VL Receive BECN (VLRcvBECN) - -.IP \(bu -0x00400000 - 22 - VL Transmit Time Congestion (VLXmitTimeCong) - -.IP \(bu -0x00200000 - 21 - VL Transmit Wasted BW (VLXmitWastedBW) - -.IP \(bu -0x00100000 - 20 - VL Transmit Wait Data (VLXmitWaitData) - -.IP \(bu -0x00080000 - 19 - VL Receive Bubble (VLRcvBubble) - -.IP \(bu -0x00040000 - 18 - VL Mark FECN (VLMarkFECN) - -.IP \(bu -Bits 17-0 reserved - - -.RE - -.TP 10 --f/--focus \fIfocus\fR -.NL -Specifies the focus select value for getting \fIfocus\fR ports. \fIfocus\fR select values are: -.RS -.TP 10 - -.sp -unexpclrport -Lists unexpectedly cleared ports - LID ordered. - -.RE - -.RS -.TP 10 - -.sp -norespport -Lists no response ports - LID ordered. - -.RE - -.RS -.TP 10 - -.sp -skippedport -Lists skipped ports - LID ordered. - -.RE - -.RS -.TP 10 - -.sp -utilhigh -Sorted by utilization - highest first. - -.RE - -.RS -.TP 10 - -.sp -pktrate -Sorted by packet rate - highest first. - -.RE - -.RS -.TP 10 - -.sp -utillow -Sorted by utilization - lowest first. - -.RE - -.RS -.TP 10 - -.sp -integrity -Sorted by integrity category - highest first. - -.RE - -.RS -.TP 10 - -.sp -congestion -Sorted by congestion category - highest first. - -.RE - -.RS -.TP 10 - -.sp -smacongestion -Sorted by SMA congestion category - highest first. - -.RE - -.RS -.TP 10 - -.sp -bubbles -Sorted by bubble category - highest first. -.RE - -.RS -.TP 10 - -.sp -security -Sorted by security category - highest first. - -.RE - -.RS -.TP 10 - -.sp -routing -Sorted by routing category - highest first. - -.RE - -.RS -.TP 10 - -.sp -vfutilhigh -Sorted by utilization - highest first. -.RE - -.RS -.TP 10 - -.sp -vfpktrate -Sorted by packet rate - highest first. -.RE - -.RS -.TP 10 - -.sp -vfutillow -Sorted by utilization - lowest first. -.RE - -.RS -.TP 10 - -.sp -vfcongestion -Sorted by congestion category - highest first. -.RE - -.RS -.TP 10 - -.sp -vfbubbles -Sorted by bubble category - highest first. -.RE - -.TP 10 --S/--start \fIstart\fR -.NL -Specifies the start of window for focus ports, should always be 0. - -.TP 10 --r/--range \fIrange\fR -.NL -Specifies the size of window for focus ports list. - -.TP 10 --Q/--tuple -.NL -Specifies a tuple that identifies a focus select value, comparator and argument in the form select: comparator:argument. Up to 8 tuples may be specified as: -Q s1:c1:a1 -Q s2:c2:a2 ... -Q s8:c8:a8 - -.IP -Valid focus select values are: utilization, pktrate, integrity, congestion, smacongestion, bubbles, security and routing. -.IP -Valid comparator values are: GT, GE, LT, LE -.IP -Valid arguments are: Any 64-bit value in hexadecimal or decimal. -.IP -When specifying more than one tuple, a logical operator -Z/--operator must also be specified. -.TP 10 --Z/--operator -.NL -Specifies a logical operator used to join the results of the specified tuples. - -.IP -and - Specifies a port is returned if it meets all of the tuple filter criteria. -.IP -or - Specifies a port is returned if it meets one or more of the tuple filter criteria. -.TP 10 --n/--imgNum \fIimgNum\fR -.NL -Specifies the 64-bit image number. - -.TP 10 --O/--imgOff \fIimgOff\fR -.NL -Specifies the image offset. - -.TP 10 --y/--imgTime -.NL -Specifies the image time. May be used with imageinfo, groupInfo, groupInfo, groupConfig, freezeImage, focusPorts, vfInfo, vfConfig, and vfFocusPorts. Will return closest image within image interval if possible. See --begin/--end above for format. - -.TP 10 --m/--moveImgNum \fImoveImgNum\fR -.NL -Specifies the 64-bit image number. Used with moveFreeze to move a freeze image. - -.TP 10 --M/--moveImgOff \fImoveImgOff\fR -.NL -Specifies the image offset. Can be used with moveFreeze to move a freeze image. - -.TP 10 --V/--vfName \fIvfName\fR -.NL -Specifies the VF name for vfInfo query. - -.NL - -.SH -h and -p options permit a variety of selections: -.NL - -.TP 10 --h 0 -.NL -First active port in system (Default). - -.TP 10 --h 0 -p 0 -.NL -First active port in system. - -.TP 10 --h \fIx\fR -.NL -First active port on HFI \fIx\fR. - -.TP 10 --h \fIx\fR \fI\fR-p 0 -.NL -First active port on HFI \fIx\fR. - -.TP 10 --h 0 -p \fIy\fR -.NL -Port \fIy\fR within system (no matter which ports are active). - -.TP 10 --h \fIx\fR \fI\fR-p \fIy\fR -.NL -HFI \fIx\fR, port \fIy\fR. - -.SH Output Types -.NL - -.TP 10 -classPortInfo -.NL -Specifies the class port info. - -.TP 10 -groupList -.NL -Specifies the list of PA groups. - -.TP 10 -groupInfo -.NL -Specifies the summary statistics of a PA group. Requires -g option for \fIgroupName\fR. - -.TP 10 -groupConfig -.NL -Specifies the configuration of a PA group. Requires -g option for \fIgroupName\fR. - -.TP 10 -groupNodeInfo -.NL -Specifies the node information of a PA group. Requires -g option for \fIgroupName\fR. Options -l \fIlid\fR, -G \fInodeGuid\fR and -D \fInodeDesc\fR are optional. - -.TP 10 -groupLinkInfo -.NL -Specifies the link Information of a PA group. Requires -g option for \fIgroupName\fR. Options -l \fIlid\fR and -P \fIport\fR are optional. Note that -P 255 specifies all ports. Option -P \fIport\fR without -l \fIlid\fR is ignored. - -.TP 10 -portCounters -.NL -Specifies the port counters of fabric port. Requires -l \fIlid\fR and -P \fIport\fR options. -d \fIdelta\fR is optional. - -.TP 10 -clrPortCounters -.NL -Clears port counters of fabric port. Requires -l \fIlid\fR and -P \fIport\fR, and -s \fIselect\fR options. - -.TP 10 -clrAllPortCounters -.NL -Clears all port counters in fabric. - -.TP 10 -pmConfig -.NL -Retrieves PM configuration information. - -.TP 10 -freezeImage -.NL -Creates freeze frame for image ID. Requires -n \fIimgNum\fR. - -.TP 10 -releaseImage -.NL -Releases freeze frame for image ID. Requires -n \fIimgNum\fR. - -.TP 10 -renewImage -.NL -Renews lease for freeze frame for image ID. Requires -n \fIimgNum\fR. - -.TP 10 -moveFreeze -.NL -Moves freeze frame from image ID to new image ID. Requires -n \fIimgNum\fR and -m \fImoveImgNum\fR. - -.TP 10 -focusPorts -.NL -Gets sorted list of ports using utilization or error values (from group buckets). Requires -g \fIgroupname\fR, -f \fIfocus\fR, -S \fIstart\fR, -r \fIrange\fR. - -.TP 10 -imageInfo -.NL -Gets configuration of a PA image (timestamps, etc.). Requires -n \fIimgNum\fR. - -.TP 10 -vfList -.NL -Specifies the list of virtual fabrics. - -.TP 10 -vfInfo -.NL -Specifies the summary statistics of a virtual fabric. Requires -V option for \fIvfName\fR. - -.TP 10 -vfConfig -.NL -Specifies the configuration of a virtual fabric. Requires -V option for \fIvfName\fR. - -.TP 10 -vfPortCounters -.NL -Specifies the port counters of fabric port. Requires -V \fIvfName\fR, -l \fIlid\fR and -P \fIport\fR options, -d \fIdelta\fR is optional. - -.TP 10 -vfFocusPorts -.NL -Gets sorted list of virtual fabric ports using utilization or error values (from VF buckets). Requires -V \fIvfname\fR, -f \fIfocus\fR, -S \fIstart\fR, -r \fIrange\fR. - -.TP 10 -clrVfPortCounters -.NL -Clears VF port counters of fabric port. Requires -l \fIlid\fR, -P \fIport\fR, -s \fIselect\fR, and -V \fIvfname\fR options. - -.SH Examples -.NL -opapaquery -o classPortInfo -.br -opapaquery -o groupList -.br -opapaquery -o groupInfo -g All -.br -opapaquery -o groupConfig -g All -.br -opapaquery -o groupNodeInfo -g All -G -.br -opapaquery -o groupNodeInfo -g All -D -.br -opapaquery -o groupNodeInfo -g All -l 1 -.br -opapaquery -o groupNodeInfo -g All -l 1 -G -.br -opapaquery -o groupLinkInfo -g All -.br -opapaquery -o groupLinkInfo -g All -l 1 -P 1 -.br -opapaquery -o groupLinkInfo -g All -l 1 -P 255 -.br -opapaquery -o portCounters -l 1 -P 1 -d 1 -.br -opapaquery -o portCounters -l 1 -P 1 -d 1 -n 0x20000000d02 -O 1 -.br -opapaquery -o portCounters -l 1 -P 1 -d 1 -j 13:30 -q 14:20 -.br -opapaquery -o clrPortCounters -l 1 -P 1 -s 0xC0000000 -.br -(clears XmitData & RcvData) -.br -opapaquery -o clrAllPortCounters -s 0xC0000000 -.br -(clears XmitData & RcvData on all ports) -.br -opapaquery -o pmConfig -.br -opapaquery -o freezeImage -n 0x20000000d02 -.br -opapaquery -o releaseImage -n 0xd01 -.br -opapaquery -o renewImage -n 0xd01 -.br -opapaquery -o moveFreeze -n 0xd01 -m 0x20000000d02 -M -2 -.br -opapaquery -o focusPorts -g All -f integrity -S 0 -r 20 -.br -opapaquery -o focusPorts -g All -S 0 -r 20 -Z AND -Q integrity:ge:20 -Q bubbles:lt:10 -.br -opapaquery -o focusPorts -g All -f skippedport -S 0 -r 20 -.br -opapaquery -o imageInfo -n 0x20000000d02 -.br -opapaquery -o imageInfo -y "1 hour ago" -.br -opapaquery -o vfList -.br -opapaquery -o vfInfo -V Default -.br -opapaquery -o vfConfig -V Default -.br -opapaquery -o vfPortCounters -l 1 -P 1 -d 1 -V Default -.br -opapaquery -o clrVfPortCounters -l 1 -P 1 -s 0xC0000000 -V Default -.br -(clears VLXmitData & VLRcvData) -.br -opapaquery -o vfFocusPorts -V Default -f integrity -S 0 -r 20 +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opapaquery 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opapaquery + + +.PP + +\fB(All)\fR +Performs various queries of the performance management (PM)/performance administration (PA) agent and provides details about fabric performance. Refer to the +\fIIntel(R) Omni-Path Fabric Suite Fabric Manager User Guide\fR + +for a description of the operation and client services of the PM/PA. +.PP +By default, opapaquery queries the most recent data. However, if an image number (\fIimgNum\fR) and/or image offset (\fIimgOff\fR) is provided, the query returns previous sweep data. Queries that access previous sweep data return with the absolute image number representing that data, and therefore have an image offset of zero. +.PP +opapaquery\[aq]s operation is dependent on an Intel(R) Omni-Path Fabric Suite Fabric Manager version 6.0 or greater running as master SM/PM in the fabric. +.PP +By default, opapaquery uses the first active port on the local system. However, if the Fabric Management Node is connected to more than one fabric (for example, a subnet), the HFI and port may be specified to select the fabric whose PA is to be queried. +.SH Syntax +opapaquery [-v] [-h hfi|-b addr] [-p port] [-x gid] [-E] +.br +[-T ssl\(ulparams] [-o type] +[-g groupName] [-l nodeLid] [-P portNumber] +.br +[--timeout] [-G nodeGuid] +[-D nodeDesc] [-d delta] [-j date\(ultime] +.br +[-q date\(ultime] [-U] [-s select] [-f focus] +[-S start] [-r range] +.br +[-n imgNum] [-O imgOff] [-y imgTime] [-m moveImgNum] +[-M moveImgOff] [-V vfName] +.SH Options + +.TP 10 +-v/--verbose + +Specifies the verbose output. + +.TP 10 +-h/--hfi \fIhfi\fR + +Specifies the HFI, numbered 1..n. Using 0 specifies that the -p \fIport\fR port is a system-wide port number. Default is 0. + +.TP 10 +-b/--oob \fIaddress\fR + +Specifies Out-of-Band address of node running the FE. Can be either hostname, IPv4, or IPv6 address. Default is "127.0.0.1". + +.TP 10 +-p/--port \fIport\fR + +Specifies the port. +.RS + +.IP \(bu +In-band: Numbered 1...n. Using 0 specifies the first active port. Default is 0. +.IP \(bu +Out-of-band: Port FE is listening on. Default is 3245. + +.RE + + +.TP 10 +-x/--source-gid \fIsrc\(ulgid\fR + +Specifies the source GID of the local GID. (This is required for most Path and Trace Record Queries when Out-of-Band.) + +.TP 10 +-E/--feEsm + +Specifies the ESM FE. + +.TP 10 +-T/--ssl-params \fIfile\fR + +Specifies the SSL/TLS parameters XML file. Default is /etc/opa/opamgt\(ultls.xml. + +.TP 10 +-o/--output \fItype\fR + +Specifies the output type. Default is groupList. See +\fIOutput Types\fR +. + +.TP 10 +-g/--groupName \fIgroupName\fR + +Specifies the group name for groupInfo query. + +.TP 10 +-l/--lid \fIlid\fR + +Specifies the LID of the node. + +.TP 10 +-P/--portNumber \fIportNumber\fR + +Specifies the port number within the node. + +.TP 10 +--timeout + +Specifies the timeout (response wait time) in ms. Default is 1000 ms. + +.TP 10 +-G/--nodeGuid + +Specifies the GUID of the node. + +.TP 10 +-D/--nodeDesc + +Specifies the description of the node. + +.TP 10 +-d/--delta \fIdelta\fR + +Specifies the delta flag for portCounters query - 0 or 1. + +.TP 10 +-j/--begin \fIdate\(ultime\fR + +Obtains portCounters over an interval beginning at \fIdate\(ultime\fR. \fIdate\(ultime\fR may be a time entered as HH:MM[:SS] or date as mm/dd/YYYY, dd.mm.YYYY, YYYY-mm-dd or date followed by time; for example, "2016-07-04 14:40". Relative times are taken as "x [second|minute|hour|day](s) ago. + +.TP 10 +-q/--end \fIdate\(ultime\fR + +Obtains portCounters over an interval ending at \fIdate\(ultime\fR. \fIdate\(ultime\fR may be a time entered as HH:MM[:SS] or date as mm/dd/YYYY, dd.mm.YYYY, YYYY-mm-dd or date followed by time; for example, "2016-07-04 14:40". Relative times are taken as "x [second|minute|hour|day](s) ago. + +.TP 10 +-U/--userCntrs + +Queries by user-controlled counters flag for portCounters. + +.TP 10 +-s/--select \fIselect\fR + +Specifies the 32-bit select flag for clearing port counters. + +.IP +Select bits for clrPortCounters. 0 is the least significant bit (rightmost). The clrPortCounters bit descriptions are listed in the order "mask - bit - location" below: +.RS + +.IP \(bu +0x80000000 - 31 - Transmit Data (XmitData) + +.IP \(bu +0x40000000 - 30 - Receive Data (RcvData) + +.IP \(bu +0x20000000 - 29 - Transmit Packets (XmitPkts) + +.IP \(bu +0x10000000 - 28 - Receive Packets (RcvPkts) + +.IP \(bu +0x08000000 - 27 - Multicast Transmit Packets (MulticastXmitPkts) + +.IP \(bu +0x04000000 - 26 - Multicast Receive Packets (MulticastRcvPkts) + +.IP \(bu +0x02000000 - 25 - Transmit Wait (XmitWait) + +.IP \(bu +0x01000000 - 24 - Congestion Discards (CongDiscards) + +.IP \(bu +0x00800000 - 23 - Receive FECN (RcvFECN) + +.IP \(bu +0x00400000 - 22 - Receive BECN (RcvBECN) + +.IP \(bu +0x00200000 - 21 - Transmit Time Congestion (XmitTimeCong) + +.IP \(bu +0x00100000 - 20 - Transmit Time Wasted BW (XmitWastedBW) + +.IP \(bu +0x00080000 - 19 - Transmit Time Wait Data (XmitWaitData) + +.IP \(bu +0x00040000 - 18 - Receive Bubble (RcvBubble) + +.IP \(bu +0x00020000 - 17 - Mark FECN (MarkFECN) + +.IP \(bu +0x00010000 - 16 - Receive Constraint Errors (RcvConstraintErrors) + +.IP \(bu +0x00008000 - 15 - Receive Switch Relay (RcvSwitchRelayErrors) + +.IP \(bu +0x00004000 - 14 - Transmit Discards (XmitDiscards) + +.IP \(bu +0x00002000 - 13 - Transmit Constraint Errors (XmitConstraintErrors) + +.IP \(bu +0x00001000 - 12 - Receive Remote Physical Errors (RcvRemotePhysicalErrors) + +.IP \(bu +0x00000800 - 11 - Local Link Integrity (LocalLinkIntegrityErrors) + +.IP \(bu +0x00000400 - 10 - Receive Errors (RcvErrors) + +.IP \(bu +0x00000200 - 9 - Excessive Buffer Overrun (ExcessiveBufferOverruns) + +.IP \(bu +0x00000100 - 8 - FM Configuration Errors (FMConfigErrors) + +.IP \(bu +0x00000080 - 7 - Link Error Recovery (LinkErrorRecovery) + +.IP \(bu +0x00000040 - 6 - Link Error Downed (LinkDowned) + +.IP \(bu +0x00000020 - 5 - Uncorrectable Errors (UncorrectableErrors) + + +.RE + +.IP +Select bits for clrVfPortCounters. 0 is the least significant bit (rightmost). The clrVfPortCounters bit descriptions are listed in the order "mask - bit - location" below: +.RS + +.IP \(bu +0x80000000 - 31 - VL Transmit Data (VLXmitData) + +.IP \(bu +0x40000000 - 30 - VL Receive Data (VLRcvData) + +.IP \(bu +0x20000000 - 29 - VL Transmit Packets (VLXmitPkts) + +.IP \(bu +0x10000000 - 28 - VL Receive Packets (VLRcvPkts) + +.IP \(bu +0x08000000 - 27 - VL Transmit Discards (VLXmitDiscards) + +.IP \(bu +0x04000000 - 26 - VL Congestion Discards (VLCongDiscards) + +.IP \(bu +0x02000000 - 25 - VL Transmit Wait (VLXmitWait) + +.IP \(bu +0x01000000 - 24 - VL Receive FECN (VLRcvFECN) + +.IP \(bu +0x00800000 - 23 - VL Receive BECN (VLRcvBECN) + +.IP \(bu +0x00400000 - 22 - VL Transmit Time Congestion (VLXmitTimeCong) + +.IP \(bu +0x00200000 - 21 - VL Transmit Wasted BW (VLXmitWastedBW) + +.IP \(bu +0x00100000 - 20 - VL Transmit Wait Data (VLXmitWaitData) + +.IP \(bu +0x00080000 - 19 - VL Receive Bubble (VLRcvBubble) + +.IP \(bu +0x00040000 - 18 - VL Mark FECN (VLMarkFECN) + +.IP \(bu +Bits 17-0 reserved + + +.RE + +.TP 10 +-f/--focus \fIfocus\fR + +Specifies the focus select value for getting \fIfocus\fR ports. \fIfocus\fR select values are: +.RS +.TP 10 + +.sp +unexpclrport +Lists unexpectedly cleared ports - LID ordered. + +.RE + +.RS +.TP 10 + +.sp +norespport +Lists no response ports - LID ordered. + +.RE + +.RS +.TP 10 + +.sp +skippedport +Lists skipped ports - LID ordered. + +.RE + +.RS +.TP 10 + +.sp +utilhigh +Sorted by utilization - highest first. + +.RE + +.RS +.TP 10 + +.sp +pktrate +Sorted by packet rate - highest first. + +.RE + +.RS +.TP 10 + +.sp +utillow +Sorted by utilization - lowest first. + +.RE + +.RS +.TP 10 + +.sp +integrity +Sorted by integrity category - highest first. + +.RE + +.RS +.TP 10 + +.sp +congestion +Sorted by congestion category - highest first. + +.RE + +.RS +.TP 10 + +.sp +smacongestion +Sorted by SMA congestion category - highest first. + +.RE + +.RS +.TP 10 + +.sp +bubbles +Sorted by bubble category - highest first. +.RE + +.RS +.TP 10 + +.sp +security +Sorted by security category - highest first. + +.RE + +.RS +.TP 10 + +.sp +routing +Sorted by routing category - highest first. + +.RE + +.RS +.TP 10 + +.sp +vfutilhigh +Sorted by utilization - highest first. +.RE + +.RS +.TP 10 + +.sp +vfpktrate +Sorted by packet rate - highest first. +.RE + +.RS +.TP 10 + +.sp +vfutillow +Sorted by utilization - lowest first. +.RE + +.RS +.TP 10 + +.sp +vfcongestion +Sorted by congestion category - highest first. +.RE + +.RS +.TP 10 + +.sp +vfbubbles +Sorted by bubble category - highest first. +.RE + +.TP 10 +-S/--start \fIstart\fR + +Specifies the start of window for focus ports, should always be 0. + +.TP 10 +-r/--range \fIrange\fR + +Specifies the size of window for focus ports list. + +.TP 10 +-Q/--tuple + +Specifies a tuple that identifies a focus select value, comparator and argument in the form select: comparator:argument. Up to 8 tuples may be specified as: -Q s1:c1:a1 -Q s2:c2:a2 ... -Q s8:c8:a8 + +.IP +Valid focus select values are: utilization, pktrate, integrity, congestion, smacongestion, bubbles, security and routing. +.IP +Valid comparator values are: GT, GE, LT, LE +.IP +Valid arguments are: Any 64-bit value in hexadecimal or decimal. +.IP +When specifying more than one tuple, a logical operator -Z/--operator must also be specified. +.TP 10 +-Z/--operator + +Specifies a logical operator used to join the results of the specified tuples. + +.IP +and - Specifies a port is returned if it meets all of the tuple filter criteria. +.IP +or - Specifies a port is returned if it meets one or more of the tuple filter criteria. +.TP 10 +-n/--imgNum \fIimgNum\fR + +Specifies the 64-bit image number. + +.TP 10 +-O/--imgOff \fIimgOff\fR + +Specifies the image offset. + +.TP 10 +-y/--imgTime + +Specifies the image time. May be used with imageinfo, groupInfo, groupInfo, groupConfig, freezeImage, focusPorts, vfInfo, vfConfig, and vfFocusPorts. Will return closest image within image interval if possible. See --begin/--end above for format. + +.TP 10 +-m/--moveImgNum \fImoveImgNum\fR + +Specifies the 64-bit image number. Used with moveFreeze to move a freeze image. + +.TP 10 +-M/--moveImgOff \fImoveImgOff\fR + +Specifies the image offset. Can be used with moveFreeze to move a freeze image. + +.TP 10 +-V/--vfName \fIvfName\fR + +Specifies the VF name for vfInfo query. + + +.SH -h and -p options permit a variety of selections: + +.TP 10 +-h 0 + +First active port in system (Default). + +.TP 10 +-h 0 -p 0 + +First active port in system. + +.TP 10 +-h \fIx\fR + +First active port on HFI \fIx\fR. + +.TP 10 +-h \fIx\fR \fI\fR-p 0 + +First active port on HFI \fIx\fR. + +.TP 10 +-h 0 -p \fIy\fR + +Port \fIy\fR within system (no matter which ports are active). + +.TP 10 +-h \fIx\fR \fI\fR-p \fIy\fR + +HFI \fIx\fR, port \fIy\fR. + +.SH Output Types + +.TP 10 +classPortInfo + +Specifies the class port info. + +.TP 10 +groupList + +Specifies the list of PA groups. + +.TP 10 +groupInfo + +Specifies the summary statistics of a PA group. Requires -g option for \fIgroupName\fR. + +.TP 10 +groupConfig + +Specifies the configuration of a PA group. Requires -g option for \fIgroupName\fR. + +.TP 10 +groupNodeInfo + +Specifies the node information of a PA group. Requires -g option for \fIgroupName\fR. Options -l \fIlid\fR, -G \fInodeGuid\fR and -D \fInodeDesc\fR are optional. + +.TP 10 +groupLinkInfo + +Specifies the link Information of a PA group. Requires -g option for \fIgroupName\fR. Options -l \fIlid\fR and -P \fIport\fR are optional. Note that -P 255 specifies all ports. Option -P \fIport\fR without -l \fIlid\fR is ignored. + +.TP 10 +portCounters + +Specifies the port counters of fabric port. Requires -l \fIlid\fR and -P \fIport\fR options. -d \fIdelta\fR is optional. + +.TP 10 +clrPortCounters + +Clears port counters of fabric port. Requires -l \fIlid\fR and -P \fIport\fR, and -s \fIselect\fR options. + +.TP 10 +clrAllPortCounters + +Clears all port counters in fabric. + +.TP 10 +pmConfig + +Retrieves PM configuration information. + +.TP 10 +freezeImage + +Creates freeze frame for image ID. Requires -n \fIimgNum\fR. + +.TP 10 +releaseImage + +Releases freeze frame for image ID. Requires -n \fIimgNum\fR. + +.TP 10 +renewImage + +Renews lease for freeze frame for image ID. Requires -n \fIimgNum\fR. + +.TP 10 +moveFreeze + +Moves freeze frame from image ID to new image ID. Requires -n \fIimgNum\fR and -m \fImoveImgNum\fR. + +.TP 10 +focusPorts + +Gets sorted list of ports using utilization or error values (from group buckets). Requires -g \fIgroupname\fR, -f \fIfocus\fR, -S \fIstart\fR, -r \fIrange\fR. + +.TP 10 +imageInfo + +Gets configuration of a PA image (timestamps, etc.). Requires -n \fIimgNum\fR. + +.TP 10 +vfList + +Specifies the list of virtual fabrics. + +.TP 10 +vfInfo + +Specifies the summary statistics of a virtual fabric. Requires -V option for \fIvfName\fR. + +.TP 10 +vfConfig + +Specifies the configuration of a virtual fabric. Requires -V option for \fIvfName\fR. + +.TP 10 +vfPortCounters + +Specifies the port counters of fabric port. Requires -V \fIvfName\fR, -l \fIlid\fR and -P \fIport\fR options, -d \fIdelta\fR is optional. + +.TP 10 +vfFocusPorts + +Gets sorted list of virtual fabric ports using utilization or error values (from VF buckets). Requires -V \fIvfname\fR, -f \fIfocus\fR, -S \fIstart\fR, -r \fIrange\fR. + +.TP 10 +clrVfPortCounters + +Clears VF port counters of fabric port. Requires -l \fIlid\fR, -P \fIport\fR, -s \fIselect\fR, and -V \fIvfname\fR options. + +.SH Examples +opapaquery -o classPortInfo +.br + +opapaquery -o groupList +.br + +opapaquery -o groupInfo -g All +.br + +opapaquery -o groupConfig -g All +.br + +opapaquery -o groupNodeInfo -g All -G +.br + +opapaquery -o groupNodeInfo -g All -D +.br + +opapaquery -o groupNodeInfo -g All -l 1 +.br + +opapaquery -o groupNodeInfo -g All -l 1 -G +.br + +opapaquery -o groupLinkInfo -g All +.br + +opapaquery -o groupLinkInfo -g All -l 1 -P 1 +.br + +opapaquery -o groupLinkInfo -g All -l 1 -P 255 +.br + +opapaquery -o portCounters -l 1 -P 1 -d 1 +.br + +opapaquery -o portCounters -l 1 -P 1 -d 1 -n 0x20000000d02 -O 1 +.br + +opapaquery -o portCounters -l 1 -P 1 -d 1 -j 13:30 -q 14:20 +.br + +opapaquery -o clrPortCounters -l 1 -P 1 -s 0xC0000000 +.br + + (clears XmitData & RcvData) +.br + +opapaquery -o clrAllPortCounters -s 0xC0000000 +.br + + (clears XmitData & RcvData on all ports) +.br + +opapaquery -o pmConfig +.br + +opapaquery -o freezeImage -n 0x20000000d02 +.br + +opapaquery -o releaseImage -n 0xd01 +.br + +opapaquery -o renewImage -n 0xd01 +.br + +opapaquery -o moveFreeze -n 0xd01 -m 0x20000000d02 -M -2 +.br + +opapaquery -o focusPorts -g All -f integrity -S 0 -r 20 +.br + +opapaquery -o focusPorts -g All -S 0 -r 20 -Z AND -Q integrity:ge:20 -Q bubbles:lt:10 +.br + +opapaquery -o focusPorts -g All -f skippedport -S 0 -r 20 +.br + +opapaquery -o imageInfo -n 0x20000000d02 +.br + +opapaquery -o imageInfo -y "1 hour ago" +.br + +opapaquery -o vfList +.br + +opapaquery -o vfInfo -V Default +.br + +opapaquery -o vfConfig -V Default +.br + +opapaquery -o vfPortCounters -l 1 -P 1 -d 1 -V Default +.br + +opapaquery -o clrVfPortCounters -l 1 -P 1 -s 0xC0000000 -V Default +.br + + (clears VLXmitData & VLRcvData) +.br + +opapaquery -o vfFocusPorts -V Default -f integrity -S 0 -r 20 diff --git a/IbaTools/man/opapingall.manPage b/IbaTools/man/opapingall.manPage index e45908f..9b1133d 100644 --- a/IbaTools/man/opapingall.manPage +++ b/IbaTools/man/opapingall.manPage @@ -1,110 +1,109 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opapingall 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opapingall - -.NL - -.PP - -\fB(All)\fR -Pings a group of hosts or chassis to verify that they are powered on and accessible through TCP/IP ping. -.SH Syntax -.NL -opapingall [-C] [-p] [-f \fIhostfile\fR] [-F \fIchassisfile\fR] [-h \[aq]hosts\[aq]] -.br -[-H \[aq]chassis\[aq]] -.SH Options -.NL - -.TP 10 ---help -.NL -Produces full help text. - -.TP 10 --C -.NL -Performs a ping against a chassis. Default is hosts. - -.TP 10 --p -.NL -Pings all hosts/chassis in parallel. - -.TP 10 --f \fIhostfile\fR -.NL -Specifies the file with hosts in cluster. -.br -Default is /etc/opa/hosts. - -.TP 10 --F \fIchassisfile\fR -.NL -Specifies the file with chassis in cluster. -.br -Default is /etc/opa/chassis. - -.TP 10 --h hosts -.NL -Specifies the list of hosts to ping. - -.TP 10 --H chassis -.NL -Specifies the list of chassis to ping. - -.SH Example -.NL -opapingall -.br -opapingall -h \[aq]arwen elrond\[aq] -.br -HOSTS=\[aq]arwen elrond\[aq] opapingall -.br -opapingall -C -.PP - -.B NOTE: -This command pings all hosts/chassis found in the specified host/chassis file. The use of -C option merely selects the default file and/or environment variable to use. For this command, it is valid to use a file that lists both hosts and chassis. - -.br -opapingall -C -H \[aq]chassis1 chassis2\[aq] -.br -CHASSIS=\[aq]chassis1 chassis2\[aq] opapingall -C -.SH Environment Variables -.NL - -.TP 10 -\fBHOSTS\fR -.NL -List of hosts, used if -h option not supplied. - -.TP 10 -\fBCHASSIS\fR -.NL -List of chassis, used if -H option not supplied. - -.TP 10 -\fBHOSTS\(ulFILE\fR -.NL -File containing list of hosts, used in absence of -f and -h. - -.TP 10 -\fBCHASSIS\(ulFILE\fR -.NL -File containing list of chassis, used in absence of -F and -H. - -.TP 10 -\fBFF\(ulMAX\(ulPARALLEL\fR -.NL -When -p option is used, maximum concurrent operations are performed. +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opapingall 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opapingall + + +.PP + +\fB(All)\fR +Pings a group of hosts or chassis to verify that they are powered on and accessible through TCP/IP ping. +.SH Syntax +opapingall [-C] [-p] [-f \fIhostfile\fR] [-F \fIchassisfile\fR] [-h \[aq]hosts\[aq]] +.br +[-H \[aq]chassis\[aq]] +.SH Options + +.TP 10 +--help + +Produces full help text. + +.TP 10 +-C + +Performs a ping against a chassis. Default is hosts. + +.TP 10 +-p + +Pings all hosts/chassis in parallel. + +.TP 10 +-f \fIhostfile\fR + +Specifies the file with hosts in cluster. +.br +Default is /etc/opa/hosts. + +.TP 10 +-F \fIchassisfile\fR + +Specifies the file with chassis in cluster. +.br +Default is /etc/opa/chassis. + +.TP 10 +-h hosts + +Specifies the list of hosts to ping. + +.TP 10 +-H chassis + +Specifies the list of chassis to ping. + +.SH Example +opapingall +.br + +opapingall -h \[aq]arwen elrond\[aq] +.br + +HOSTS=\[aq]arwen elrond\[aq] opapingall +.br + +opapingall -C +.PP + +.B NOTE: +This command pings all hosts/chassis found in the specified host/chassis file. The use of -C option merely selects the default file and/or environment variable to use. For this command, it is valid to use a file that lists both hosts and chassis. + +.br +opapingall -C -H \[aq]chassis1 chassis2\[aq] +.br + +CHASSIS=\[aq]chassis1 chassis2\[aq] opapingall -C +.SH Environment Variables + +.TP 10 +\fBHOSTS\fR + +List of hosts, used if -h option not supplied. + +.TP 10 +\fBCHASSIS\fR + +List of chassis, used if -H option not supplied. + +.TP 10 +\fBHOSTS\(ulFILE\fR + +File containing list of hosts, used in absence of -f and -h. + +.TP 10 +\fBCHASSIS\(ulFILE\fR + +File containing list of chassis, used in absence of -F and -H. + +.TP 10 +\fBFF\(ulMAX\(ulPARALLEL\fR + +When -p option is used, maximum concurrent operations are performed. diff --git a/IbaTools/man/opapmaquery.manPage b/IbaTools/man/opapmaquery.manPage index 8be7c6a..77b334c 100644 --- a/IbaTools/man/opapmaquery.manPage +++ b/IbaTools/man/opapmaquery.manPage @@ -1,380 +1,398 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opapmaquery 1 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opapmaquery - -.NL - -.PP - -\fB(All)\fR -Performs individual PMA queries against a specific LID. It is very useful in displaying port runtime information. -.SH Syntax -.NL -opapmaquery [-v] [-s \fIsl\fR] [-l \fIlid\fR] [-h \fIhfi\fR] [-p \fIport\fR] [-o \fIotype\fR] -.br -[-m \fIport\fR] [-n \fImask\fR] [-e \fImask\fR] [-w \fImask\fR] -.NL - -.SH Options -.NL - -.TP 10 ---help -.NL -Produces full help text. - -.TP 10 --v -.NL -Specifies the verbose output. Can be specified more than once for additional openib debugging and libibumad debugging. - -.TP 10 --s \fIsl\fR -.NL -Specifies different service level. Default is SM SL. - -.TP 10 --l \fIlid\fR -.NL -Specifies the destination LID. Default is local port. - -.TP 10 --h/--hfi \fIhfi\fR -.NL -Specifies the HFI, numbered 1..n. Using 0 specifies that the -p \fIport\fR port is a system-wide port number. Default is 0. - -.TP 10 --p/--port \fIport\fR -.NL -Specifies the port, numbered 1..n. Using 0 specifies the first active port. Default is 0. - -.TP 10 --o \fIotype\fR -.NL -Specifies the output type. Default is getportstatus. Refer to -\fIotype options vary by report\fR -for supported options. - -.IP -Valid output types are: -.RS -.TP 10 - -.sp -classportinfo -Specifies the class of port info. - -.RE - -.RS -.TP 10 - -.sp -getportstatus -Specifies the list of port counters. Supported options: - -.IP - -.br -[-m port] [-w vl mask] - -.br - -.RE - -.RS -.TP 10 - -.sp -clearportstatus -Clears the port counters. Supported options: - -.IP - -.br -[-n port mask] [-e counter mask] [-w vl mask] - -.br - -.RE - -.RS -.TP 10 - -.sp -getdatacounters -Specifies the list of data counters. Supported options: - -.IP - -.br -[-n port mask] [-w vl mask] - -.br - -.RE - -.RS -.TP 10 - -.sp -geterrorcounters -Specifies the list of error counters. Supported options: - -.IP - -.br -[-n port mask] [-w vl mask] - -.br - -.RE - -.RS -.TP 10 - -.sp -geterrorinfo -Specifies the list of error info. Supported options: - -.IP - -.br -[-n port mask] - -.br - -.RE - -.RS -.TP 10 - -.sp -clearerrorinfo -Clears the error info. Supported options: - -.IP - -.br -[-n port mask] [-e counter mask] - -.br - -.RE - -.NL - -.SH -h and -p options permit a variety of selections: -.NL - -.TP 10 --h 0 -.NL -First active port in system (Default). - -.TP 10 --h 0 -p 0 -.NL -First active port in system. - -.TP 10 --h \fIx\fR -.NL -First active port on HFI \fIx\fR. - -.TP 10 --h \fIx\fR \fI\fR-p 0 -.NL -First active port on HFI \fIx\fR. - -.TP 10 --h 0 -p \fIy\fR -.NL -Port \fIy\fR within system (no matter which ports are active). - -.TP 10 --h \fIx\fR \fI\fR-p \fIy\fR -.NL -HFI \fIx\fR, port \fIy\fR. - -.NL - -.SH \fIotype\fR options vary by report -.NL - -.TP 10 --m \fIport\fR -.NL -Specifies the port in destination device to query/clear. Required when using -l option for all but -o classportinfo. - -.TP 10 --n \fImask\fR -.NL -Specifies the port mask, in hexadecimal. Bits represent ports 63-0. For example: 0x2 for port 1, 0x6 for ports 1, 2. - -.TP 10 --e \fImask\fR -.NL -Specifies the counter/error select mask, in hexadecimal. The following lists "Mask - Bit - Location for Counters". Where applicable, location "for Error Info" is presented. Default is all bits set (0xffffffe0). - -.RS - -.IP \(bu -0x80000000 - 31 - Transmit Data (XmitData) -For Error Info: Receive Error Info - -.IP \(bu -0x40000000 - 30 - Receive Data (RcvData) -For Error Info: Excessive Buffer Overrun - -.IP \(bu -0x20000000 - 29 - Transmit Packets (XmitPkts) -For Error Info: Transmit Const Error Info - -.IP \(bu -0x10000000 - 28 - Receive Packets (RcvPkts) -For Error Info: Receive Const Error Info - -.IP \(bu -0x08000000 - 27 - Multicast Transmit Packets (MulticastXmitPkts) -For Error Info: Receive Switch Relay Error Info - -.IP \(bu -0x04000000 - 26 - Multicast Receive Packets (MulticastRcvPkts) -For Error Info: Uncorrectable Error Info - -.IP \(bu -0x02000000 - 25 - Transmit Wait (XmitWait) -For Error Info: FM Configuration Error Info - -.IP \(bu -0x01000000 - 24 - Congestion Discards (CongDiscards) - -.IP \(bu -0x00800000 - 23 - Receive FECN (RcvFECN) - -.IP \(bu -0x00400000 - 22 - Receive BECN (RcvBECN) - -.IP \(bu -0x00200000 - 21 - Transmit Time Congestion (XmitTimeCong) - -.IP \(bu -0x00100000 - 20 - Transmit Time Wasted BW (XmitWastedBW) - -.IP \(bu -0x00080000 - 19 - Transmit Time Wait Data (XmitWaitData) - -.IP \(bu -0x00040000 - 18 - Receive Bubble (RcvBubble) - -.IP \(bu -0x00020000 - 17 - Mark FECN (MarkFECN) - -.IP \(bu -0x00010000 - 16 - Receive Constraint Errors (RcvConstraintErrors) - -.IP \(bu -0x00008000 - 15 - Receive Switch Relay (RcvSwitchRelayErrors) - -.IP \(bu -0x00004000 - 14 - Transmit Discards (XmitDiscards) - -.IP \(bu -0x00002000 - 13 - Transmit Constraint Errors (XmitConstraintErrors) - -.IP \(bu -0x00001000 - 12 - Receive Remote Physical Errors (RcvRemotePhysicalErrors) - -.IP \(bu -0x00000800 - 11 - Local Link Integrity (LocalLinkIntegrityErrors) - -.IP \(bu -0x00000400 - 10 - Receive Errors (RcvErrors) - -.IP \(bu -0x00000200 - 9 - Excessive Buffer Overrun (ExcessiveBufferOverruns) - -.IP \(bu -0x00000100 - 8 - FM Configuration Errors (FMConfigErrors) - -.IP \(bu -0x00000080 - 7 - Link Error Recovery (LinkErrorRecovery) - -.IP \(bu -0x00000040 - 6 - Link Error Downed (LinkDowned) - -.IP \(bu -0x00000020 - 5 - Uncorrectable Errors (UncorrectableErrors) - - -.RE - -.TP 10 --w \fImask\fR -.NL -Specifies the Virtual Lane Select Mask, in hexadecimal. Bits represent VL number 31-0. For example, 0x1 for VL 0, 0x3 for VL 0,1. Default is none. - -.SH Examples -.NL -opapmaquery -o classportinfo -.br - -.br -opapmaquery -o getportstatus -.br -# get data and error counts, local port -.br - -.br -opapmaquery -o getdatacounters -n 0x2 -.br -# get data counts, local port 1 -.br - -.br -opapmaquery -o geterrorcounters -n 0x2 -.br -# get error counts, local port 1 -.br - -.br -opapmaquery -o clearportstatus -n 0x2 -.br -# clear all counters local port 1 -.br - -.br -opapmaquery -o geterrorinfo -n 0x2 -.br -# get error info for local port 1 -.br - -.br -opapmaquery -o clearerrorinfo -n 0x2 -.br -# clear all error info, local port 1 -.br -opapmaquery -o getdatacounters -l 6 -n 0x7e -w 0x1 -.br -# for device at LID 6, get data counters on ports 1-6, inclusive of VL 0 data -.br - -.br -opapmaquery -o clearportstatus -l 6 -n 0x2 -e 0x1ffff -.br -# for device at LID 6, on port 1, clear only error counters -.br - -.br -opapmaquery -o clearerrorinfo -l 6 -n 0x2 -e 0x04000000 -.br -# for device at LID 6, on ports 1, clear uncorrectable error info +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opapmaquery 1 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opapmaquery + + +.PP + +\fB(All)\fR +Performs individual PMA queries against a specific LID. It is very useful in displaying port runtime information. +.SH Syntax +opapmaquery [-v] [-s \fIsl\fR] [-l \fIlid\fR] [-h \fIhfi\fR] [-p \fIport\fR] [-o \fIotype\fR] +.br +[-m \fIport\fR] +[-n \fImask\fR] [-e \fImask\fR] [-w \fImask\fR] + +.SH Options + +.TP 10 +--help + +Produces full help text. + +.TP 10 +-v + +Specifies the verbose output. Can be specified more than once for additional openib debugging and libibumad debugging. + +.TP 10 +-s \fIsl\fR + +Specifies different service level. Default is SM SL. + +.TP 10 +-l \fIlid\fR + +Specifies the destination LID. Default is local port. + +.TP 10 +-h/--hfi \fIhfi\fR + +Specifies the HFI, numbered 1..n. Using 0 specifies that the -p \fIport\fR port is a system-wide port number. Default is 0. + +.TP 10 +-p/--port \fIport\fR + +Specifies the port, numbered 1..n. Using 0 specifies the first active port. Default is 0. + +.TP 10 +-o \fIotype\fR + +Specifies the output type. Default is getportstatus. Refer to +\fIotype options vary by report\fR +for supported options. + +.IP +Valid output types are: +.RS +.TP 10 + +.sp +classportinfo +Specifies the class of port info. + +.RE + +.RS +.TP 10 + +.sp +getportstatus +Specifies the list of port counters. Supported options: + +.IP + +.br +[-m port] [-w vl mask] + +.br + +.RE + +.RS +.TP 10 + +.sp +clearportstatus +Clears the port counters. Supported options: + +.IP + +.br +[-n port mask] [-e counter mask] [-w vl mask] + +.br + +.RE + +.RS +.TP 10 + +.sp +getdatacounters +Specifies the list of data counters. Supported options: + +.IP + +.br +[-n port mask] [-w vl mask] + +.br + +.RE + +.RS +.TP 10 + +.sp +geterrorcounters +Specifies the list of error counters. Supported options: + +.IP + +.br +[-n port mask] [-w vl mask] + +.br + +.RE + +.RS +.TP 10 + +.sp +geterrorinfo +Specifies the list of error info. Supported options: + +.IP + +.br +[-n port mask] + +.br + +.RE + +.RS +.TP 10 + +.sp +clearerrorinfo +Clears the error info. Supported options: + +.IP + +.br +[-n port mask] [-e counter mask] + +.br + +.RE + + +.SH -h and -p options permit a variety of selections: + +.TP 10 +-h 0 + +First active port in system (Default). + +.TP 10 +-h 0 -p 0 + +First active port in system. + +.TP 10 +-h \fIx\fR + +First active port on HFI \fIx\fR. + +.TP 10 +-h \fIx\fR \fI\fR-p 0 + +First active port on HFI \fIx\fR. + +.TP 10 +-h 0 -p \fIy\fR + +Port \fIy\fR within system (no matter which ports are active). + +.TP 10 +-h \fIx\fR \fI\fR-p \fIy\fR + +HFI \fIx\fR, port \fIy\fR. + + +.SH \fIotype\fR options vary by report + +.TP 10 +-m \fIport\fR + +Specifies the port in destination device to query/clear. Required when using -l option for all but -o classportinfo. + +.TP 10 +-n \fImask\fR + +Specifies the port mask, in hexadecimal. Bits represent ports 63-0. For example: 0x2 for port 1, 0x6 for ports 1, 2. + +.TP 10 +-e \fImask\fR + +Specifies the counter/error select mask, in hexadecimal. The following lists "Mask - Bit - Location for Counters". Where applicable, location "for Error Info" is presented. Default is all bits set (0xffffffe0). + +.RS + +.IP \(bu +0x80000000 - 31 - Transmit Data (XmitData) +For Error Info: Receive Error Info + +.IP \(bu +0x40000000 - 30 - Receive Data (RcvData) +For Error Info: Excessive Buffer Overrun + +.IP \(bu +0x20000000 - 29 - Transmit Packets (XmitPkts) +For Error Info: Transmit Const Error Info + +.IP \(bu +0x10000000 - 28 - Receive Packets (RcvPkts) +For Error Info: Receive Const Error Info + +.IP \(bu +0x08000000 - 27 - Multicast Transmit Packets (MulticastXmitPkts) +For Error Info: Receive Switch Relay Error Info + +.IP \(bu +0x04000000 - 26 - Multicast Receive Packets (MulticastRcvPkts) +For Error Info: Uncorrectable Error Info + +.IP \(bu +0x02000000 - 25 - Transmit Wait (XmitWait) +For Error Info: FM Configuration Error Info + +.IP \(bu +0x01000000 - 24 - Congestion Discards (CongDiscards) + +.IP \(bu +0x00800000 - 23 - Receive FECN (RcvFECN) + +.IP \(bu +0x00400000 - 22 - Receive BECN (RcvBECN) + +.IP \(bu +0x00200000 - 21 - Transmit Time Congestion (XmitTimeCong) + +.IP \(bu +0x00100000 - 20 - Transmit Time Wasted BW (XmitWastedBW) + +.IP \(bu +0x00080000 - 19 - Transmit Time Wait Data (XmitWaitData) + +.IP \(bu +0x00040000 - 18 - Receive Bubble (RcvBubble) + +.IP \(bu +0x00020000 - 17 - Mark FECN (MarkFECN) + +.IP \(bu +0x00010000 - 16 - Receive Constraint Errors (RcvConstraintErrors) + +.IP \(bu +0x00008000 - 15 - Receive Switch Relay (RcvSwitchRelayErrors) + +.IP \(bu +0x00004000 - 14 - Transmit Discards (XmitDiscards) + +.IP \(bu +0x00002000 - 13 - Transmit Constraint Errors (XmitConstraintErrors) + +.IP \(bu +0x00001000 - 12 - Receive Remote Physical Errors (RcvRemotePhysicalErrors) + +.IP \(bu +0x00000800 - 11 - Local Link Integrity (LocalLinkIntegrityErrors) + +.IP \(bu +0x00000400 - 10 - Receive Errors (RcvErrors) + +.IP \(bu +0x00000200 - 9 - Excessive Buffer Overrun (ExcessiveBufferOverruns) + +.IP \(bu +0x00000100 - 8 - FM Configuration Errors (FMConfigErrors) + +.IP \(bu +0x00000080 - 7 - Link Error Recovery (LinkErrorRecovery) + +.IP \(bu +0x00000040 - 6 - Link Error Downed (LinkDowned) + +.IP \(bu +0x00000020 - 5 - Uncorrectable Errors (UncorrectableErrors) + + +.RE + +.TP 10 +-w \fImask\fR + +Specifies the Virtual Lane Select Mask, in hexadecimal. Bits represent VL number 31-0. For example, 0x1 for VL 0, 0x3 for VL 0,1. Default is none. + +.SH Examples +opapmaquery -o classportinfo +.br + + +.br + +opapmaquery -o getportstatus +.br + +# get data and error counts, local port +.br + + +.br + +opapmaquery -o getdatacounters -n 0x2 +.br + +# get data counts, local port 1 +.br + + +.br + +opapmaquery -o geterrorcounters -n 0x2 +.br + +# get error counts, local port 1 +.br + + +.br + +opapmaquery -o clearportstatus -n 0x2 +.br + +# clear all counters local port 1 +.br + + +.br + +opapmaquery -o geterrorinfo -n 0x2 +.br + +# get error info for local port 1 +.br + + +.br + +opapmaquery -o clearerrorinfo -n 0x2 +.br + +# clear all error info, local port 1 + +.br +opapmaquery -o getdatacounters -l 6 -n 0x7e -w 0x1 +.br + +# for device at LID 6, get data counters on ports 1-6, inclusive of VL 0 data +.br + + +.br + +opapmaquery -o clearportstatus -l 6 -n 0x2 -e 0x1ffff +.br + +# for device at LID 6, on port 1, clear only error counters +.br + + +.br + +opapmaquery -o clearerrorinfo -l 6 -n 0x2 -e 0x04000000 +.br + +# for device at LID 6, on ports 1, clear uncorrectable error info diff --git a/IbaTools/man/opaportconfig.manPage b/IbaTools/man/opaportconfig.manPage index 15096af..a26cb1f 100644 --- a/IbaTools/man/opaportconfig.manPage +++ b/IbaTools/man/opaportconfig.manPage @@ -1,425 +1,417 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opaportconfig 1 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opaportconfig - -.NL - -.PP - -\fB(Host or Switch)\fR -Controls the configuration and state of a specified Intel(R) Omni-Path Host Fabric Interface (HFI) port on the local host or a remote switch. -.PP - -.B NOTE: -This tool is designed for expert users only. Non-expert users should use other tools such as opaenableports, opadisableports and opaportinfo for basic functionality. - -.SH Syntax -.NL -opaportconfig [-l \fIlid\fR[-m \fIdest\(ulport\fR]] [-h \fIhfi\fR] [-p \fIport\fR] [-r \fIsecs\fR] [-z] -.br -[-S \fIstate\fR] [-P \fIphysstate\fR] [-s \fIspeed\fR] [-w \fIwidth\fR] [-c \fILTPCRC\fR] [-v] [-x] -.br -[-L \fIlid\fR] [< \fIsub command\fR>] -.SH Options -.NL - -.TP 10 ---help -.NL -Produces full help text. - -.TP 10 --l \fIlid\fR -.NL -Specifies the destination LID. Default is local port. - -.TP 10 --m \fIdest\(ulport\fR -.NL -Specifies the destination port. Default is port with given LID. Used to access switch ports. - -.TP 10 --h \fIhfi\fR -.NL -Specifies the HFI to send through/to. Default is first HFI. - -.TP 10 --p \fIport\fR -.NL -Specifies the port to send through/to. Default is first port. - -.TP 10 -\fIsub command\fR -.NL -Specifies the one of the following choices: - -.RS -.TP 10 - -.sp -enable -Enables port. - -.RE - -.RS -.TP 10 - -.sp -disable -Disables port. - -.RE - -.RS -.TP 10 - -.sp -bounce -Bounces port. - -.TP 10 -.BR - -.PP - -.B NOTE: -Bouncing remote ports may cause timeouts. - -.RE - -.RS -.TP 10 - -.sp -ledon -Turns port LED on. - -.RE - -.RS -.TP 10 - -.sp -ledoff -Turns port LED off. - -.RE - -.NL - -.SH Configuration Options -.NL - -.TP 10 --r \fIsecs\fR -.NL -Repeats to keep the port down for the specified amount of seconds. - -.TP 10 --S \fIstate\fR -.NL -Specifies the new state. Default is 0. - -.RS -.TP 10 - -.sp -0 -No-op. - -.RE - -.RS -.TP 10 - -.sp -1 -Down. - -.RE - -.RS -.TP 10 - -.sp -2 -Initiate. - -.RE - -.RS -.TP 10 - -.sp -3 -Armed. - -.RE - -.RS -.TP 10 - -.sp -4 -Active. - -.RE - -.TP 10 --P \fIphysstate\fR -.NL -Specifies the new physical state. Default is 0. - -.TP 10 -.BR - -.PP - -.B NOTE: -All transitions are valid. - -.RS -.TP 10 - -.sp -0 -No-op. - -.RE - -.RS -.TP 10 - -.sp -2 -Polling. - -.RE - -.RS -.TP 10 - -.sp -3 -Disabled. - -.RE - -.RS -.TP 10 - -.sp -11 -Phy-Test. Current physstate must be disabled. - -.RE - -.TP 10 --s \fIspeed\fR -.NL -Specifies the new link speeds enabled. Default is 0. To enable multiple speeds, use the sum of the desired speeds. - -.RS -.TP 10 - -.sp -0 -No-op. - -.RE - -.RS -.TP 10 - -.sp -2 -0x0002 - 25 Gb/s. - -.RE - -.TP 10 --w \fIwidth\fR -.NL -Specifies the new link widths enabled. Default is 0. To enable multiple widths, use sum of desired widths. - -.RS -.TP 10 - -.sp -0 -No-op. - -.RE - -.RS -.TP 10 - -.sp -1 -0x01 - 1x. - -.RE - -.RS -.TP 10 - -.sp -2 -0x02 - 2x. - -.RE - -.RS -.TP 10 - -.sp -4 -0x04 - 3x. - -.RE - -.RS -.TP 10 - -.sp -8 -0x08 - 4x. - -.RE - -.TP 10 --c \fILTPCRC\fR -.NL -Specifies the new LTP CRCs enabled. Default is 0. -.br -To enable multiple LTP CRCs, use sum of desired LTP CRCs. - -.RS -.TP 10 - -.sp -0 -No-op. - -.RE - -.RS -.TP 10 - -.sp -1 -0x1 - 14-bit LTP CRC mode. - -.RE - -.RS -.TP 10 - -.sp -2 -0x2 - 16-bit LTP CRC mode. - -.RE - -.RS -.TP 10 - -.sp -4 -0x4 - 48-bit LTP CRC mode. -.RE - -.RS -.TP 10 - -.sp -8 -0x8 - 12/16 bits per lane LTP CRC mode. - -.RE - -.NL - -.SH -h and -p options permit a variety of selections: -.NL - -.TP 10 --h 0 -.NL -First active port in system (Default). - -.TP 10 --h 0 -p 0 -.NL -First active port in system. - -.TP 10 --h \fIx\fR -.NL -First active port on HFI \fIx\fR. - -.TP 10 --h \fIx\fR \fI\fR-p 0 -.NL -First active port on HFI \fIx\fR. - -.TP 10 --h 0 -p \fIy\fR -.NL -Port \fIy\fR within system (no matter which ports are active). - -.TP 10 --h \fIx\fR \fI\fR-p \fIy\fR -.NL -HFI \fIx\fR, port \fIy\fR. - -.NL - -.SH Debug Options -.NL - -.TP 10 --v -.NL -Verbose output. Additional invocations turn on debugging, openib debugging, and libibumad debugging. - -.TP 10 --z -.NL -Does not get port information first; clears most port attributes. - -.TP 10 --L \fIlid\fR -.NL -Sets PortInfo.LID = lid. - -.SH Examples -.NL -opaportconfig -w 1 -.br -opaportconfig -p 1 -h 2 -w 3 -.SH Description -.NL - -.PP -Port configuration is transient in nature. If the given host is rebooted or its Intel(R) Omni-Path Fabric Stack is restarted, the port reverts to its default configuration and state. Typically, the default state is to have the port enabled with all speeds and widths supported by the given HFI port. -.PP -To access switch ports using this command, the -l and -m options must be given. The -l option specifies the lid of switch port 0 (the logical management port for the switch) and -m specifies the actual switch port to access. -.PP - -.B NOTE: -The /etc/init.d/opaportconfig script is provided as an example of changing port speed every time the server boots. This script can be edited, then scheduled, using chkconfig to control link settings on any set of HFI ports. - -.PP - -.B CAUTION: -When using this command to disable or reconfigure switch ports, if the final port in the path between the Fabric Management Node and the switch is disabled or fails to come online, then opaenableports is not able to reenable it. In this case, the switch CLI and/or a switch reboot may be needed to correct the situation. +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opaportconfig 1 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opaportconfig + + +.PP + +\fB(Host or Switch)\fR +Controls the configuration and state of a specified Intel(R) Omni-Path Host Fabric Interface (HFI) port on the local host or a remote switch. +.PP + +.B NOTE: +This tool is designed for expert users only. Non-expert users should use other tools such as opaenableports, opadisableports and opaportinfo for basic functionality. + +.SH Syntax +opaportconfig [-l \fIlid\fR [-m \fIdest\(ulport\fR]] [-h \fIhfi\fR] [-p \fIport\fR] [-r \fIsecs\fR] [-z] +.br + +[-S \fIstate\fR] [-P \fIphysstate\fR] [-s \fIspeed\fR] [-w \fIwidth\fR] [-c \fILTPCRC\fR] +[-v] [-x] +.br +[-L \fIlid\fR] [< \fIsub command\fR>] +.SH Options + +.TP 10 +--help + +Produces full help text. + +.TP 10 +-l \fIlid\fR + +Specifies the destination LID. Default is local port. + +.TP 10 +-m \fIdest\(ulport\fR + +Specifies the destination port. Default is port with given LID. Used to access switch ports. + +.TP 10 +-h \fIhfi\fR + +Specifies the HFI to send through/to. Default is first HFI. + +.TP 10 +-p \fIport\fR + +Specifies the port to send through/to. Default is first port. + +.TP 10 +\fIsub command\fR + +Specifies the one of the following choices: + +.RS +.TP 10 + +.sp +enable +Enables port. + +.RE + +.RS +.TP 10 + +.sp +disable +Disables port. + +.RE + +.RS +.TP 10 + +.sp +bounce +Bounces port. + +.TP 10 +.BR + +.PP + +.B NOTE: +Bouncing remote ports may cause timeouts. + +.RE + +.RS +.TP 10 + +.sp +ledon +Turns port LED on. + +.RE + +.RS +.TP 10 + +.sp +ledoff +Turns port LED off. + +.RE + + +.SH Configuration Options + +.TP 10 +-r \fIsecs\fR + +Repeats to keep the port down for the specified amount of seconds. + +.TP 10 +-S \fIstate\fR + +Specifies the new state. Default is 0. + +.RS +.TP 10 + +.sp +0 +No-op. + +.RE + +.RS +.TP 10 + +.sp +1 +Down. + +.RE + +.RS +.TP 10 + +.sp +2 +Initiate. + +.RE + +.RS +.TP 10 + +.sp +3 +Armed. + +.RE + +.RS +.TP 10 + +.sp +4 +Active. + +.RE + +.TP 10 +-P \fIphysstate\fR + +Specifies the new physical state. Default is 0. + +.TP 10 +.BR + +.PP + +.B NOTE: +All transitions are valid. + +.RS +.TP 10 + +.sp +0 +No-op. + +.RE + +.RS +.TP 10 + +.sp +2 +Polling. + +.RE + +.RS +.TP 10 + +.sp +3 +Disabled. + +.RE + +.RS +.TP 10 + +.sp +11 +Phy-Test. Current physstate must be disabled. + +.RE + +.TP 10 +-s \fIspeed\fR + +Specifies the new link speeds enabled. Default is 0. To enable multiple speeds, use the sum of the desired speeds. + +.RS +.TP 10 + +.sp +0 +No-op. + +.RE + +.RS +.TP 10 + +.sp +2 +0x0002 - 25 Gb/s. + +.RE + +.TP 10 +-w \fIwidth\fR + +Specifies the new link widths enabled. Default is 0. To enable multiple widths, use sum of desired widths. + +.RS +.TP 10 + +.sp +0 +No-op. + +.RE + +.RS +.TP 10 + +.sp +1 +0x01 - 1x. + +.RE + +.RS +.TP 10 + +.sp +2 +0x02 - 2x. + +.RE + +.RS +.TP 10 + +.sp +4 +0x04 - 3x. + +.RE + +.RS +.TP 10 + +.sp +8 +0x08 - 4x. + +.RE + +.TP 10 +-c \fILTPCRC\fR + +Specifies the new LTP CRCs enabled. Default is 0. +.br +To enable multiple LTP CRCs, use sum of desired LTP CRCs. + +.RS +.TP 10 + +.sp +0 +No-op. + +.RE + +.RS +.TP 10 + +.sp +1 +0x1 - 14-bit LTP CRC mode. + +.RE + +.RS +.TP 10 + +.sp +2 +0x2 - 16-bit LTP CRC mode. + +.RE + +.RS +.TP 10 + +.sp +4 +0x4 - 48-bit LTP CRC mode. +.RE + +.RS +.TP 10 + +.sp +8 +0x8 - 12/16 bits per lane LTP CRC mode. + +.RE + + +.SH -h and -p options permit a variety of selections: + +.TP 10 +-h 0 + +First active port in system (Default). + +.TP 10 +-h 0 -p 0 + +First active port in system. + +.TP 10 +-h \fIx\fR + +First active port on HFI \fIx\fR. + +.TP 10 +-h \fIx\fR \fI\fR-p 0 + +First active port on HFI \fIx\fR. + +.TP 10 +-h 0 -p \fIy\fR + +Port \fIy\fR within system (no matter which ports are active). + +.TP 10 +-h \fIx\fR \fI\fR-p \fIy\fR + +HFI \fIx\fR, port \fIy\fR. + + +.SH Debug Options + +.TP 10 +-v + +Verbose output. Additional invocations turn on debugging, openib debugging, and libibumad debugging. + +.TP 10 +-z + +Does not get port information first; clears most port attributes. + +.TP 10 +-L \fIlid\fR + +Sets PortInfo.LID = lid. + +.SH Examples +opaportconfig -w 1 +.br + +opaportconfig -p 1 -h 2 -w 3 +.SH Description + +.PP +Port configuration is transient in nature. If the given host is rebooted or its Intel(R) Omni-Path Fabric Stack is restarted, the port reverts to its default configuration and state. Typically, the default state is to have the port enabled with all speeds and widths supported by the given HFI port. +.PP +To access switch ports using this command, the -l and -m options must be given. The -l option specifies the lid of switch port 0 (the logical management port for the switch) and -m specifies the actual switch port to access. +.PP + +.B NOTE: +The /etc/init.d/opaportconfig script is provided as an example of changing port speed every time the server boots. This script can be edited, then scheduled, using chkconfig to control link settings on any set of HFI ports. + +.PP + +.B CAUTION: +When using this command to disable or reconfigure switch ports, if the final port in the path between the Fabric Management Node and the switch is disabled or fails to come online, then opaenableports is not able to reenable it. In this case, the switch CLI and/or a switch reboot may be needed to correct the situation. diff --git a/IbaTools/man/opaportinfo.manPage b/IbaTools/man/opaportinfo.manPage index c9e362b..b38f927 100644 --- a/IbaTools/man/opaportinfo.manPage +++ b/IbaTools/man/opaportinfo.manPage @@ -1,99 +1,91 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opaportinfo 1 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opaportinfo - -.NL - -.PP - -\fB(Host or Switch)\fR -Displays configuration and state of a specified Intel(R) Omni-Path Host Fabric Interface (HFI) port on the local host or a remote switch. -.SH Syntax -.NL -opaportinfo [-l \fIlid\fR[-m \fIdest\(ulport\fR]] [-h \fIhfi\fR] [-p \fIport\fR] [-v] -.SH Options -.NL - -.TP 10 --l \fIlid\fR -.NL -Specifies the destination LID. Default is local port. - -.TP 10 --m \fIdest\(ulport\fR -.NL -Specifies the destination port. Default is port with given LID. Useful to access switch ports. - -.TP 10 --h \fIhfi\fR -.NL -Specifies the HFI to send through/to. Default is first HFI. - -.TP 10 --p \fIport\fR -.NL -Specifies the port to send through/to. Default is first port. - -.NL - -.SH -h and -p options permit a variety of selections: -.NL - -.TP 10 --h 0 -.NL -First active port in system (Default). - -.TP 10 --h 0 -p 0 -.NL -First active port in system. - -.TP 10 --h \fIx\fR -.NL -First active port on HFI \fIx\fR. - -.TP 10 --h \fIx\fR \fI\fR-p 0 -.NL -First active port on HFI \fIx\fR. - -.TP 10 --h 0 -p \fIy\fR -.NL -Port \fIy\fR within system (no matter which ports are active). - -.TP 10 --h \fIx\fR \fI\fR-p \fIy\fR -.NL -HFI \fIx\fR, port \fIy\fR. - -.NL - -.SH Debug Options -.NL - -.TP 10 --v -.NL -Specifies the verbose output. Additional invocations (-v -v ...) turn on debugging, openib debugging, and libibumad debugging. - -.SH Examples -.NL -opaportinfo -p 1 -.br -opaportinfo -p 2 -h 2 -l 5 -m 18 -.SH Description -.NL - -.PP -To access switch ports using this command, the -l and -m options must be given. The -l option specifies the LID of switch port 0 (the logical management port for the switch) and -m specifies the actual switch port to access. +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opaportinfo 1 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opaportinfo + + +.PP + +\fB(Host or Switch)\fR +Displays configuration and state of a specified Intel(R) Omni-Path Host Fabric Interface (HFI) port on the local host or a remote switch. +.SH Syntax +opaportinfo [-l \fIlid\fR [-m \fIdest\(ulport\fR]] [-h \fIhfi\fR] [-p \fIport\fR] [-v] +.SH Options + +.TP 10 +-l \fIlid\fR + +Specifies the destination LID. Default is local port. + +.TP 10 +-m \fIdest\(ulport\fR + +Specifies the destination port. Default is port with given LID. Useful to access switch ports. + +.TP 10 +-h \fIhfi\fR + +Specifies the HFI to send through/to. Default is first HFI. + +.TP 10 +-p \fIport\fR + +Specifies the port to send through/to. Default is first port. + + +.SH -h and -p options permit a variety of selections: + +.TP 10 +-h 0 + +First active port in system (Default). + +.TP 10 +-h 0 -p 0 + +First active port in system. + +.TP 10 +-h \fIx\fR + +First active port on HFI \fIx\fR. + +.TP 10 +-h \fIx\fR \fI\fR-p 0 + +First active port on HFI \fIx\fR. + +.TP 10 +-h 0 -p \fIy\fR + +Port \fIy\fR within system (no matter which ports are active). + +.TP 10 +-h \fIx\fR \fI\fR-p \fIy\fR + +HFI \fIx\fR, port \fIy\fR. + + +.SH Debug Options + +.TP 10 +-v + +Specifies the verbose output. Additional invocations (-v -v ...) turn on debugging, openib debugging, and libibumad debugging. + +.SH Examples +opaportinfo -p 1 +.br + +opaportinfo -p 2 -h 2 -l 5 -m 18 +.SH Description + +.PP +To access switch ports using this command, the -l and -m options must be given. The -l option specifies the LID of switch port 0 (the logical management port for the switch) and -m specifies the actual switch port to access. diff --git a/IbaTools/man/opareport.manPage b/IbaTools/man/opareport.manPage index a284380..6e4d490 100644 --- a/IbaTools/man/opareport.manPage +++ b/IbaTools/man/opareport.manPage @@ -1,898 +1,948 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opareport 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opareport - -.NL - -.PP - -\fB(All)\fR -Provides powerful fabric analysis and reporting capabilities. Must be run on a host connected to the Intel(R) Omni-Path Fabric with the Intel(R) Omni-Path Fabric Suite FastFabric Toolset installed. -.SH Syntax -.NL -opareport [-v][-q] [-h \fIhfi\fR] [-p \fIport\fR] [--timeout] [-o \fIreport\fR] -.br -[-d \fIdetail\fR] [-P|-H] [-N] [-x] [-X \fIsnapshot\(ulinput\fR] [-T \fItopology\(ulinput\fR] -.br -[-s] [-r] [-V] [-i \fIseconds\fR] [-b \fIdate\(ultime\fR] [-e \fIdate\(ultime\fR] [-C] [-a] [-m] -.br -[-M] [-A] [-c \fIfile\fR] [-L] [-F \fIpoint\fR] [-S \fIpoint\fR] [-D \fIpoint\fR] [-Q] -.SH Options -.NL - -.TP 10 ---help -.NL -Produces full help text. - -.TP 10 --v/--verbose -.NL -Returns verbose output. - -.TP 10 --q/--quiet -.NL -Disables progress reports. - -.TP 10 --h/--hfi \fIhfi\fR -.NL -Specifies the HFI, numbered 1..n. Using 0 specifies that the -p \fIport\fR port is a system-wide port number. Default is 0. - -.TP 10 --p/--port \fIport\fR -.NL -Specifies the port, numbered 1..n. Using 0 specifies the first active port. Default is 0. - -.TP 10 ---timeout -.NL -Specifies the timeout (wait time for response) in ms. Default is 1000 ms. - -.TP 10 --o/--output \fIreport\fR -.NL -Specifies the report type for output. Refer to -\fIReport Types\fR -for details. - -.TP 10 --d/--detail \fIlevel\fR -.NL -Specifies the level of detail 0-n for output. Default is 2. - -.TP 10 --P/--persist -.NL -Only includes data persistent across reboots. - -.TP 10 --H/--hard -.NL -Only includes permanent hardware data. - -.TP 10 --N/--noname -.NL -Omits node and IOC names. - -.TP 10 --x/--xml -.NL -Produces output in XML. - -.TP 10 --X/--infile \fIsnapshot\(ulinput\fR -.NL -Generates a report using the data in the snapshot\(ulinput file. snapshot\(ulinput must have been generated during a previous -o \fIsnapshot\fR run. When used, the -s, -i, -C, and -a options are ignored. \[aq]-\[aq] may be used as the snapshot\(ulinput to specify stdin. - -.TP 10 --T/--topology \fItopology\(ulinput\fR -.NL -Uses topology\(ulinput file to augment and verify fabric information. When used, various reports can be augmented with information not available electronically (such as cable labels). \[aq]-\[aq] may be used to specify stdin. - -.TP 10 --s/--stats -.NL -Gets performance statistics for all ports. - -.TP 10 --i/--interval \fIseconds\fR -.NL -Obtains performance statistics over interval \fIseconds\fR. Clears all statistics, waits interval \fIseconds\fR, then generates report. Implies -s option. - -.TP 10 --b/--begin \fIdate\(ultime\fR -.NL -Obtains performance stats beginning at \fIdate\(ultime\fR. Implies -s option. -.RS - -.IP \(bu -If -b/--begin and -e/--end are specified, the performance stats are provided over the specified interval. -.IP \(bu -If only -b/--begin is specified, the absolute value of the performance stats at the specified time is provided. - -.RE -\fIdate\(ultime\fR may be a time entered as HH:MM[:SS] or date as mm/dd/YYYY, dd.mm.YYYY, YYYY-mm-dd or date followed by time; for example, "2016-07-04 14:40". Relative times are taken as "x [second|minute|hour|day](s) ago. - -.TP 10 --e/--end \fIdate\(ultime\fR -.NL -Obtains performance stats over an interval ending at \fIdate\(ultime\fR. Implies -s option. - -.RS - -.IP \(bu -If -b/--begin and -e/--end are specified, the performance stats are provided over the specified interval. -.IP \(bu -If only -e/--end is specified, the absolute value of the performance stats at the specified time is provided. - -.RE - -.IP -\fIdate\(ultime\fR may be a time entered as HH:MM[:SS] or date as mm/dd/YYYY, dd.mm.YYYY, YYYY-mm-dd or date followed by time; for example, "2016-07-04 14:40". Relative times are taken as "x [second|minute|hour|day](s) ago. -.TP 10 --C/--clear -.NL -Clears performance statistics for all ports. Only statistics with error thresholds are cleared. A clear occurs after generating the report. - -.TP 10 --a/--clearall -.NL -Clears all performance statistics for all ports. - -.TP 10 --m/--smadirect -.NL -Accesses fabric information directly from SMA. - -.TP 10 --M/--pmadirect -.NL -Accesses performance statistics using direct PMA. - -.TP 10 --A/--allports -.NL -Gets PortInfo for down switch ports. Uses direct SMA to get this data. If used with -M, also gets PMA stats for down switch ports. - -.TP 10 --c/--config \fIfile\fR -.NL -Specifies the error thresholds configuration file. Default is /etc/opa/opamon.conf file. - -.TP 10 --L/--limit -.NL -Limits operation to exact specified focus with -F for port error counters check (-o \fIerrors\fR) and port counters clear (-C or -i). Normally, the neighbor of each selected port is also checked/cleared. Does not affect other reports. - -.TP 10 --F/--focus \fIpoint\fR -.NL -Specifies the focus area for report. - -.IP -Limits output to reflect a subsection of the fabric. May not work with all reports. (For example, route, mcgroups, and the verify* reports may ignore the option or not generate useful results.) -.TP 10 --S/--src \fIpoint\fR -.NL -Specifies the source for trace route. Default is local port. - -.TP 10 --D/--dest \fIpoint\fR -.NL -Specifies the destination for trace route. - -.TP 10 --Q/--quietfocus -.NL -Excludes focus description from report. - -.NL - -.SH -h and -p options permit a variety of selections: -.NL - -.TP 10 --h 0 -.NL -First active port in system (Default). - -.TP 10 --h 0 -p 0 -.NL -First active port in system. - -.TP 10 --h \fIx\fR -.NL -First active port on HFI \fIx\fR. - -.TP 10 --h \fIx\fR \fI\fR-p 0 -.NL -First active port on HFI \fIx\fR. - -.TP 10 --h 0 -p \fIy\fR -.NL -Port \fIy\fR within system (no matter which ports are active). - -.TP 10 --h \fIx\fR \fI\fR-p \fIy\fR -.NL -HFI \fIx\fR, port \fIy\fR. - -.NL - -.SH Snapshot-Specific Options -.NL - -.TP 10 --r/--routes -.NL -Gets routing tables for all switches. - -.TP 10 --V/--vltables -.NL -Gets the P-Key tables for all nodes and the QoS VL-related tables for all ports. - -.NL - -.SH Report Types -.NL - -.TP 10 -comps -.NL -Summary of all systems and SMs in fabric. - -.TP 10 -brcomps -.NL -Brief summary of all systems and SMs in fabric. - -.TP 10 -nodes -.NL -Summary of all node types and SMs in fabric. - -.TP 10 -brnodes -.NL -Brief summary of all node types and SMs in fabric. - -.TP 10 -ious -.NL -Summary of all IO units in the fabric. - -.TP 10 -lids -.NL -Summary of all LIDs in the fabric. - -.TP 10 -links -.NL -Summary of all links. - -.TP 10 -linkinfo -.NL -Summary of all links with LIDs in the fabric. - -.TP 10 -extlinks -.NL -Summary of links external to systems. - -.TP 10 -filinks -.NL -Summary of links to FIs. - -.TP 10 -islinks -.NL -Summary of inter-switch links. - -.TP 10 -extislinks -.NL -Summary of inter-switch links external to systems. - -.TP 10 -slowlinks -.NL -Summary of links running slower than expected. - -.TP 10 -slowconfiglinks -.NL -Summary of links configured to run slower than supported, includes slowlinks. - -.TP 10 -slowconnlinks -.NL -Summary of links connected with mismatched speed potential, includes slowconfiglinks. - -.TP 10 -misconfiglinks -.NL -Summary of links configured to run slower than supported. - -.TP 10 -misconnlinks -.NL -Summary of links connected with mismatched speed potential. - -.TP 10 -errors -.NL -Summary of links whose errors exceed counts in the configuration file. - -.TP 10 -otherports -.NL -Summary of ports not connected to the fabric. - -.TP 10 -linear -.NL -Summary of linear forwarding data base (FDB) for each switch. - -.TP 10 -mcast -.NL -Summary of multicast FDB for each switch in the fabric. - -.TP 10 -mcgroups -.NL -Summary of multicast groups. - -.IP -When used in conjunction with -d, the following report details are possible: -.RS - -.IP \(bu --d0 : Shows the number of multicast groups -.IP \(bu --d1 : Shows a list of multicast groups -.IP \(bu --d2 : Shows a list of members per multicast group - -.RE - -.IP -This report can be used with option -X. -.TP 10 -portusage -.NL -Summary of ports referenced in linear FDB for each switch, broken down by NodeType of DLID. - -.TP 10 -pathusage -.NL -Summary of number of FI to FI paths routed through each switch port. - -.TP 10 -treepathusage -.NL -Analysis of number of FI to FI paths routed through each switch port for a FAT tree. - -.TP 10 -portgroups -.NL -Summary of adaptive routing port groups for each switch. - -.TP 10 -quarantinednodes -.NL -Summary of quarantined nodes. - -.TP 10 -validateroutes -.NL -Validates all routes in the fabric. - -.TP 10 -validatevlroutes -.NL -Validates all routes in the fabric using SLSC, SCSC, and SCVL tables. - -.TP 10 -validatepgs -.NL -Validates all port groups in the fabric. - -.TP 10 -validatecreditloops -.NL -Validates topology configuration of the fabric to identify any existing credit loops. - -.TP 10 -validatevlcreditloops -.NL -Validates topology configuration of the fabric including SLSC, SCSC, and SCVL tables to identify any existing credit loops. - -.TP 10 -validatemcroutes -.NL -Validates multicast routes of the fabric to identify loops in multicast forwarding tables and detect MFT-multicast membership inconsistencies. - -.TP 10 -vfinfo -.NL -Summary of virtual fabric (vFabric) information. - -.TP 10 -vfmember -.NL -Summary of vFabric membership information. - -.TP 10 -dgmember -.NL -Summary of DeviceGroup membership information. - -.TP 10 -verifyfis -.NL -Compares fabric (or snapshot) FIs to supplied topology and identifies differences and omissions. - -.TP 10 -verifysws -.NL -Compares fabric (or snapshot) switches to supplied topology and identifies differences and omissions. - -.TP 10 -verifynodes -.NL -Returns verifyfis and verifysws reports. - -.TP 10 -verifysms -.NL -Compares fabric (or snapshot) SMs to supplied topology and identifies differences and omissions. - -.TP 10 -verifylinks -.NL -Compares fabric (or snapshot) links to supplied topology and identifies differences and omissions. - -.TP 10 -verifyextlinks -.NL -Compares fabric (or snapshot) links to supplied topology and identifies differences and omissions. Limits analysis to links external to systems. - -.TP 10 -verifyfilinks -.NL -Compares fabric (or snapshot) links to supplied topology and identify differences and omissions. Limits analysis to links to FIs. - -.TP 10 -verifyislinks -.NL -Compares fabric (or snapshot) links to supplied topology and identify differences and omissions. Limits analysis to inter-switch links. - -.TP 10 -verifyextislinks -.NL -Compares fabric (or snapshot) links to supplied topology and identify differences and omissions. Limits analysis to inter-switch links external to systems. - -.TP 10 -verifyall -.NL -Returns verifyfis, verifysws, verifysms, and verifylinks reports. - -.TP 10 -all -.NL -Returns comps, nodes, ious, links, extlinks, slowconnlinks, and errors reports. - -.TP 10 -route -.NL -Traces route between -S and -D points. - -.TP 10 -bfrctrl -.NL -Reports Buffer Control Tables for all ports. - -.TP 10 -snapshot -.NL -Outputs snapshot of the fabric state for later use as \fIsnapshot\(ulinput\fR. This implies -x. May not be combined with other reports. When selected, -F, -P, -H, and -N options are ignored. - -.TP 10 -topology -.NL -Outputs the topology of the fabric for later use as \fItopology\(ulinput\fR. This implies -x. May not be combined with other reports. Use with detail level 3 or more to get Port element under Node in output xml. - -.TP 10 -none -.NL -No report, useful to clear statistics. - -.NL - -.SH Point Syntax -.NL - -.TP 10 -gid:\fIvalue\fR -.NL -\fIvalue\fR is numeric port GID of form: subnet:guid. - -.TP 10 -lid:\fIvalue\fR -.NL -\fIvalue\fR is numeric LID. - -.TP 10 -lid:value:node -.NL -\fIvalue\fR is numeric LID, selects entire node with given LID. - -.TP 10 -lid:\fIvalue\fR:port:\fIvalue2\fR -.NL -\fIvalue\fR is numeric LID of node, \fIvalue2\fR is port number. - -.TP 10 -portguid:\fIvalue\fR -.NL -\fIvalue\fR is numeric port GUID. - -.TP 10 -nodeguid:\fIvalue\fR -.NL -\fIvalue\fR is numeric node GUID. - -.TP 10 -nodeguid:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is numeric node GUID, \fIvalue2\fR is port number. - -.TP 10 -iocguid:\fIvalue\fR -.NL -\fIvalue\fR is numeric IOC GUID. - -.TP 10 -iocguid:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is numeric IOC GUID, \fIvalue2\fR is port number. - -.TP 10 -systemguid:\fIvalue\fR -.NL -\fIvalue\fR is numeric system image GUID. - -.TP 10 -systemguid:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is the numeric system image GUID, \fIvalue2\fR is port number. - -.TP 10 -ioc:\fIvalue\fR -.NL -\fIvalue\fR is IOC Profile ID String (IOC Name). - -.TP 10 -ioc:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is IOC Profile ID String (IOC Name), \fIvalue2\fR is port number. - -.TP 10 -iocpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for IOC Profile ID String (IOC Name). - -.TP 10 -iocpat:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is glob pattern for IOC Profile ID String (IOC Name), \fIvalue2\fR is port number. - -.TP 10 -ioctype:\fIvalue\fR -.NL -\fIvalue\fR is IOC type (SRP or OTHER). - -.TP 10 -ioctype:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is IOC type (SRP or OTHER); \fIvalue2\fR is port number. - -.TP 10 -node:\fIvalue\fR -.NL -\fIvalue\fR is node description (node name). - -.TP 10 -node:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is node description (node name), \fIvalue2\fR is port number. - -.TP 10 -nodepat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for node description (node name). - -.TP 10 -nodepat:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is the glob pattern for the node description (node name), \fIvalue2\fR is port number. - -.TP 10 -nodedetpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for node details. - -.TP 10 -nodedetpat:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is the glob pattern for the node details, \fIvalue2\fR is port number. - -.TP 10 -nodetype:\fIvalue\fR -.NL -\fIvalue\fR is node type (SW or FI). - -.TP 10 -nodetype:\fIvalue1\fR:port:\fIvalue2\fR -.NL -\fIvalue1\fR is node type (SW or FI), \fIvalue2\fR is port number. - -.TP 10 -rate:\fIvalue\fR -.NL -\fIvalue\fR is string for rate (25g, 50g, 75g, 100g), omits switch mgmt port 0. - -.TP 10 -portstate:\fIvalue\fR -.NL -\fIvalue\fR is a string for state (down, init, armed, active, notactive, initarmed). - -.TP 10 -portphysstate:\fIvalue\fR -.NL -\fIvalue\fR is a string for PHYs state (polling, disabled, training, linkup, recovery, offline, test) - -.TP 10 -mtucap:\fIvalue\fR -.NL -\fIvalue\fR is MTU size (2048, 4096, 8192, 10240), omits switch mgmt port 0. - -.TP 10 -labelpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable label. - -.TP 10 -lengthpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable length. - -.TP 10 -cabledetpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable details. - -.TP 10 -cabinflenpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable info length. - -.TP 10 -cabinfvendnamepat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable info vendor name. - -.TP 10 -cabinfvendpnpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable info vendor part number. - -.TP 10 -cabinfvendrevpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable info vendor revision. - -.TP 10 -cabinfvendsnpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for cable info vendor serial number. - -.TP 10 -cabinftype:\fIvalue\fR -.NL -\fIvalue\fR is either optical, passive\(ulcopper, active\(ulcopper, or unknown. - -.TP 10 -linkdetpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for link details. - -.TP 10 -portdetpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for port details. - -.TP 10 -sm -.NL -Specifies the master subnet manager (SM). - -.TP 10 -smdetpat:\fIvalue\fR -.NL -\fIvalue\fR is glob pattern for SM details. - -.TP 10 -route:\fIpoint1\fR:\fIpoint2\fR -.NL -Specifies all ports along the routes between the two given points. - -.TP 10 -led:\fIvalue\fR -.NL -\fIvalue\fR is either on or off for LED port beacon. - -.TP 10 -linkqual:\fIvalue\fR -.NL -Specifies the ports with a link quality equal to \fIvalue\fR. - -.TP 10 -linkqualLE:\fIvalue\fR -.NL -Specifies the ports with a link quality less than or equal to \fIvalue\fR. - -.TP 10 -linkqualGE:\fIvalue\fR -.NL -Specifies the ports with a link quality greater than or equal to \fIvalue\fR. - -.TP 10 -nodepatfile:\fIFILENAME\fR -.NL -Specifies the name of file with the list of nodes. - -.TP 10 -nodepairpatfile:\fIFILENAME\fR -.NL -Specifies the name of file with the list of node pairs, separated by a colon. - -.SH Examples -.NL - -.PP -opareport can generate hundreds of different reports. Commonly generated reports include the following: -.PP - -.br -opareport -o comps -d 3 -.br -opareport -o errors -o slowlinks -.br -opareport -o nodes -F portguid:0x00117500a000447b -.br -opareport -o nodes -F nodeguid:0x001175009800447b:port:1 -.br -opareport -o nodes -F nodeguid:0x001175009800447b -.br -opareport -o nodes -F \[aq]node:duster hfi1\(ul0\[aq] -.br -opareport -o nodes -F \[aq]node:duster hfi1\(ul0:port:1\[aq] -.br -opareport -o nodes -F \[aq]nodepat:d*\[aq] -.br -opareport -o nodes -F \[aq]nodepat:d*:port:1\[aq] -.br -opareport -o nodes -F \[aq]nodedetpat:compute*\[aq] -.br -opareport -o nodes -F \[aq]nodedetpat:compute*:port:1\[aq] -.br -opareport -o nodes -F nodetype:FI -.br -opareport -o nodes -F nodetype:FI:port:1 -.br -opareport -o nodes -F lid:1 -.br -opareport -o nodes -F led:on opareport -o nodes -F led:off opareport -o nodes -F lid:1:node -.br -opareport -o nodes -F lid:1:port:2 -.br -opareport -o nodes -F gid:0xfe80000000000000:0x00117500a000447b -.br -opareport -o nodes -F systemguid:0x001175009800447b -.br -opareport -o nodes -F systemguid:0x001175009800447b:port:1 -.br -opareport -o nodes -F iocguid:0x00117501300001e0 -.br -opareport -o nodes -F iocguid:0x00117501300001e0:port:2 -.br -opareport -o nodes -F \[aq]ioc:Chassis 0x001175005000010C, Slot 2, IOC 1\[aq] -.br -opareport -o nodes -F \[aq]ioc:Chassis 0x001175005000010C, Slot 2, IOC 1:port:2\[aq] -.br -opareport -o nodes -F \[aq]iocpat:*Slot 2*\[aq] -.br -opareport -o nodes -F \[aq]iocpat:*Slot 2*:port:2\[aq] -.br -opareport -o nodes -F ioctype:SRP opareport -o nodes -F ioctype:SRP:port:2 -.br -opareport -o extlinks -F rate:100g -.br -opareport -o extlinks -F portstate:armed -.br -opareport -o extlinks -F portphysstate:linkup -.br -opareport -o extlinks -F \[aq]labelpat:S1345*\[aq] -.br -opareport -o extlinks -F \[aq]lengthpat:11m\[aq] -.br -opareport -o extlinks -F \[aq]cabledetpat:*hitachi*\[aq] -.br -opareport -o extlinks -F \[aq]linkdetpat:*core ISL*\[aq] -.br -opareport -o extlinks -F \[aq]portdetpat:*mgmt*\[aq] -.br -opareport -o links -F mtucap:2048 -.br -opareport -o nodes -F sm -.br -opareport -o nodes -F \[aq]smdetpat:primary*\[aq] -.br -opareport -o nodes -F \[aq]route:node:duster hfi1\(ul0:node:cuda hfi1\(ul0\[aq] -.br -opareport -o nodes -F \[aq]route:node:duster hfi1\(ul0:port:1:node:cuda hfi1\(ul0:port:2\[aq] -.br -opareport -o treepathusage -F nodepairpatfile:FILENAME -.br -opareport -o pathusage -F nodepatfile:FILENAME -.br -opareport -s -o snapshot > file -.br -opareport -o topology > topology.xml -.br -opareport -o errors -X file -.br -opareport -s --begin "2 days ago" -.br -opareport -s --begin "12:30" --end "14:00" - -.br - -.NL - -.SH Other Information -.NL - -.PP -opareport also supports operation with the Fabric Manager Performance Manager (PM)/Performance Manager Agent (PMA). When opareport detects the presence of a PM, it automatically issues any required PortCounter queries and clears to the PM to access the PMs running totals. If a PM is not detected, then opareport directly accesses the PMAs on all the nodes. The -M option can force access to the PMA even if a PM is present. -.PP -opareport takes advantage of these interfaces to obtain extensive information about the fabric from the subnet manager and the end nodes. Using this information, opareport is able to cross-reference it and produce analysis greatly beyond what any single subnet manager request could provide. As such, it exceeds the capabilities previously available in tools such as opasaquery and opafabricinfo. -.PP -opareport obtains and displays counters from the Fabric Manager PM/PA or directly from the fabric PMAs using the -M option. -.PP -opareport internally cross-references all this information so its output can be in user-friendly form. Reports include GUIDs, LIDs, and names for components. Obviously, these reports are easiest to read if the end user has taken the time to provide unique names for all the components in the fabric (node names and IOC names). All Intel components support this capability. For hosts, the node names are automatically assigned based on the network host name of the server. For switches and line cards, the names can be assigned using the element managers for each component. -.PP -Each run of opareport obtains up-to-date information from the fabric. At the start of the run opareport takes a few seconds to obtain all the fabric data, then it is output to stdout. The reports are sorted by GUIDs and other permanent information so they can be rerun in the future and produce output in the same order even if components have been rebooted. This is useful for comparison using simple tools like diff. opareport permits multiple reports to be requested for a single run (for example, one of each report type). -.PP -By default, opareport uses the first active port on the local system. However, if the Management Node is connected to more than one fabric (for example, a subnet), the Intel(R) Omni-Path Host Fabric Interface (HFI) and port may be specified to select the fabric to analyze. +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opareport 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opareport + + +.PP + +\fB(All)\fR +Provides powerful fabric analysis and reporting capabilities. Must be run on a host connected to the Intel(R) Omni-Path Fabric with the Intel(R) Omni-Path Fabric Suite FastFabric Toolset installed. +.SH Syntax +opareport [-v][-q] [-h \fIhfi\fR] [-p \fIport\fR] [--timeout] [-o \fIreport\fR] +.br +[-d \fIdetail\fR] [-P|-H] +[-N] [-x] [-X \fIsnapshot\(ulinput\fR] [-T \fItopology\(ulinput\fR] +.br +[-s] [-r] [-V] [-i \fIseconds\fR] +[-b \fIdate\(ultime\fR] [-e \fIdate\(ultime\fR] [-C] [-a] +.br +[-m] [-M] [-A] [-c \fIfile\fR] [-L] [-F \fIpoint\fR] +[-S \fIpoint\fR] [-D \fIpoint\fR] [-Q] +.SH Options + +.TP 10 +--help + +Produces full help text. + +.TP 10 +-v/--verbose + +Returns verbose output. + +.TP 10 +-q/--quiet + +Disables progress reports. + +.TP 10 +-h/--hfi \fIhfi\fR + +Specifies the HFI, numbered 1..n. Using 0 specifies that the -p \fIport\fR port is a system-wide port number. Default is 0. + +.TP 10 +-p/--port \fIport\fR + +Specifies the port, numbered 1..n. Using 0 specifies the first active port. Default is 0. + +.TP 10 +--timeout + +Specifies the timeout (wait time for response) in ms. Default is 1000 ms. + +.TP 10 +-o/--output \fIreport\fR + +Specifies the report type for output. Refer to +\fIReport Types\fR +for details. + +.TP 10 +-d/--detail \fIlevel\fR + +Specifies the level of detail 0-n for output. Default is 2. + +.TP 10 +-P/--persist + +Only includes data persistent across reboots. + +.TP 10 +-H/--hard + +Only includes permanent hardware data. + +.TP 10 +-N/--noname + +Omits node and IOC names. + +.TP 10 +-x/--xml + +Produces output in XML. + +.TP 10 +-X/--infile \fIsnapshot\(ulinput\fR + +Generates a report using the data in the snapshot\(ulinput file. snapshot\(ulinput must have been generated during a previous -o \fIsnapshot\fR run. When used, the -s, -i, -C, and -a options are ignored. \[aq]-\[aq] may be used as the snapshot\(ulinput to specify stdin. + +.TP 10 +-T/--topology \fItopology\(ulinput\fR + +Uses topology\(ulinput file to augment and verify fabric information. When used, various reports can be augmented with information not available electronically (such as cable labels). \[aq]-\[aq] may be used to specify stdin. + +.TP 10 +-s/--stats + +Gets performance statistics for all ports. + +.TP 10 +-i/--interval \fIseconds\fR + +Obtains performance statistics over interval \fIseconds\fR. Clears all statistics, waits interval \fIseconds\fR, then generates report. Implies -s option. + +.TP 10 +-b/--begin \fIdate\(ultime\fR + +Obtains performance stats beginning at \fIdate\(ultime\fR. Implies -s option. +.RS + +.IP \(bu +If -b/--begin and -e/--end are specified, the performance stats are provided over the specified interval. +.IP \(bu +If only -b/--begin is specified, the absolute value of the performance stats at the specified time is provided. + +.RE +\fIdate\(ultime\fR may be a time entered as HH:MM[:SS] or date as mm/dd/YYYY, dd.mm.YYYY, YYYY-mm-dd or date followed by time; for example, "2016-07-04 14:40". Relative times are taken as "x [second|minute|hour|day](s) ago. + +.TP 10 +-e/--end \fIdate\(ultime\fR + +Obtains performance stats ending at \fIdate\(ultime\fR. Implies -s option. + +.RS + +.IP \(bu +If -b/--begin and -e/--end are specified, the performance stats are provided over the specified interval. +.IP \(bu +If only -e/--end is specified, the absolute value of the performance stats at the specified time is provided. + +.RE + +.IP +\fIdate\(ultime\fR may be a time entered as HH:MM[:SS] or date as mm/dd/YYYY, dd.mm.YYYY, YYYY-mm-dd or date followed by time; for example, "2016-07-04 14:40". Relative times are taken as "x [second|minute|hour|day](s) ago. +.TP 10 +-C/--clear + +Clears performance statistics for all ports. Only statistics with error thresholds are cleared. A clear occurs after generating the report. + +.TP 10 +-a/--clearall + +Clears all performance statistics for all ports. + +.TP 10 +-m/--smadirect + +Accesses fabric information directly from SMA. + +.TP 10 +-M/--pmadirect + +Accesses performance statistics using direct PMA. + +.TP 10 +-A/--allports + +Gets PortInfo for down switch ports. Uses direct SMA to get this data. If used with -M, also gets PMA stats for down switch ports. + +.TP 10 +-c/--config \fIfile\fR + +Specifies the error thresholds configuration file. Default is /etc/opa/opamon.conf file. + +.TP 10 +-L/--limit + +Limits operation to exact specified focus with -F for port error counters check (-o \fIerrors\fR) and port counters clear (-C or -i). Normally, the neighbor of each selected port is also checked/cleared. Does not affect other reports. + +.TP 10 +-F/--focus \fIpoint\fR + +Specifies the focus area for report. + +.IP +Limits output to reflect a subsection of the fabric. May not work with all reports. (For example, route, mcgroups, and the verify* reports may ignore the option or not generate useful results.) +.TP 10 +-S/--src \fIpoint\fR + +Specifies the source for trace route. Default is local port. + +.TP 10 +-D/--dest \fIpoint\fR + +Specifies the destination for trace route. + +.TP 10 +-Q/--quietfocus + +Excludes focus description from report. + + +.SH -h and -p options permit a variety of selections: + +.TP 10 +-h 0 + +First active port in system (Default). + +.TP 10 +-h 0 -p 0 + +First active port in system. + +.TP 10 +-h \fIx\fR + +First active port on HFI \fIx\fR. + +.TP 10 +-h \fIx\fR \fI\fR-p 0 + +First active port on HFI \fIx\fR. + +.TP 10 +-h 0 -p \fIy\fR + +Port \fIy\fR within system (no matter which ports are active). + +.TP 10 +-h \fIx\fR \fI\fR-p \fIy\fR + +HFI \fIx\fR, port \fIy\fR. + + +.SH Snapshot-Specific Options + +.TP 10 +-r/--routes + +Gets routing tables for all switches. + +.TP 10 +-V/--vltables + +Gets the P-Key tables for all nodes and the QoS VL-related tables for all ports. + + +.SH Report Types + +.TP 10 +comps + +Summary of all systems and SMs in fabric. + +.TP 10 +brcomps + +Brief summary of all systems and SMs in fabric. + +.TP 10 +nodes + +Summary of all node types and SMs in fabric. + +.TP 10 +brnodes + +Brief summary of all node types and SMs in fabric. + +.TP 10 +ious + +Summary of all IO units in the fabric. + +.TP 10 +lids + +Summary of all LIDs in the fabric. + +.TP 10 +linkinfo + +Summary of all links with LIDs in the fabric. + +.TP 10 +links + +Summary of all links. + +.TP 10 +extlinks + +Summary of links external to systems. + +.TP 10 +filinks + +Summary of links to FIs. + +.TP 10 +islinks + +Summary of inter-switch links. + +.TP 10 +extislinks + +Summary of inter-switch links external to systems. + +.TP 10 +slowlinks + +Summary of links running slower than expected. + +.TP 10 +slowconfiglinks + +Summary of links configured to run slower than supported, includes slowlinks. + +.TP 10 +slowconnlinks + +Summary of links connected with mismatched speed potential, includes slowconfiglinks. + +.TP 10 +misconfiglinks + +Summary of links configured to run slower than supported. + +.TP 10 +misconnlinks + +Summary of links connected with mismatched speed potential. + +.TP 10 +errors + +Summary of links whose errors exceed counts in the configuration file. + +.TP 10 +otherports + +Summary of ports not connected to the fabric. + +.TP 10 +linear + +Summary of linear forwarding data base (FDB) for each switch. + +.TP 10 +mcast + +Summary of multicast FDB for each switch in the fabric. + +.TP 10 +mcgroups + +Summary of multicast groups. + +.IP +When used in conjunction with -d, the following report details are possible: +.RS + +.IP \(bu +-d0 : Shows the number of multicast groups +.IP \(bu +-d1 : Shows a list of multicast groups +.IP \(bu +-d2 : Shows a list of members per multicast group + +.RE + +.IP +This report can be used with option -X. +.TP 10 +portusage + +Summary of ports referenced in linear FDB for each switch, broken down by NodeType of DLID. + +.TP 10 +pathusage + +Summary of number of FI to FI paths routed through each switch port. + +.TP 10 +treepathusage + +Analysis of number of FI to FI paths routed through each switch port for a FAT tree. + +.TP 10 +portgroups + +Summary of adaptive routing port groups for each switch. + +.TP 10 +quarantinednodes + +Summary of quarantined nodes. + +.TP 10 +validateroutes + +Validates all routes in the fabric. + +.TP 10 +validatevlroutes + +Validates all routes in the fabric using SLSC, SCSC, and SCVL tables. + +.TP 10 +validatepgs + +Validates all port groups in the fabric. + +.TP 10 +validatecreditloops + +Validates topology configuration of the fabric to identify any existing credit loops. + +.TP 10 +validatevlcreditloops + +Validates topology configuration of the fabric including SLSC, SCSC, and SCVL tables to identify any existing credit loops. + +.TP 10 +validatemcroutes + +Validates multicast routes of the fabric to identify loops in multicast forwarding tables and detect MFT-multicast membership inconsistencies. + +.TP 10 +vfinfo + +Summary of virtual fabric (vFabric) information. + +.TP 10 +vfmember + +Summary of vFabric membership information. + +.TP 10 +dgmember + +Summary of DeviceGroup membership information. + +.TP 10 +verifyfis + +Compares fabric (or snapshot) FIs to supplied topology and identifies differences and omissions. + +.TP 10 +verifysws + +Compares fabric (or snapshot) switches to supplied topology and identifies differences and omissions. + +.TP 10 +verifynodes + +Returns verifyfis and verifysws reports. + +.TP 10 +verifysms + +Compares fabric (or snapshot) SMs to supplied topology and identifies differences and omissions. + +.TP 10 +verifylinks + +Compares fabric (or snapshot) links to supplied topology and identifies differences and omissions. + +.TP 10 +verifyextlinks + +Compares fabric (or snapshot) links to supplied topology and identifies differences and omissions. Limits analysis to links external to systems. + +.TP 10 +verifyfilinks + +Compares fabric (or snapshot) links to supplied topology and identify differences and omissions. Limits analysis to links to FIs. + +.TP 10 +verifyislinks + +Compares fabric (or snapshot) links to supplied topology and identify differences and omissions. Limits analysis to inter-switch links. + +.TP 10 +verifyextislinks + +Compares fabric (or snapshot) links to supplied topology and identify differences and omissions. Limits analysis to inter-switch links external to systems. + +.TP 10 +verifyall + +Returns verifyfis, verifysws, verifysms, and verifylinks reports. + +.TP 10 +all + +Returns comps, nodes, ious, links, extlinks, slowconnlinks, and errors reports. + +.TP 10 +route + +Traces route between -S and -D points. + +.TP 10 +bfrctrl + +Reports Buffer Control Tables for all ports. + +.TP 10 +snapshot + +Outputs snapshot of the fabric state for later use as \fIsnapshot\(ulinput\fR. This implies -x. May not be combined with other reports. When selected, -F, -P, -H, and -N options are ignored. + +.TP 10 +topology + +Outputs the topology of the fabric for later use as \fItopology\(ulinput\fR. This implies -x. May not be combined with other reports. Use with detail level 3 or more to get Port element under Node in output xml. + +.TP 10 +none + +No report, useful to clear statistics. + + +.SH Point Syntax + +.TP 10 +gid:\fIvalue\fR + +\fIvalue\fR is numeric port GID of form: subnet:guid. + +.TP 10 +lid:\fIvalue\fR + +\fIvalue\fR is numeric LID. + +.TP 10 +lid:value:node + +\fIvalue\fR is numeric LID, selects entire node with given LID. + +.TP 10 +lid:\fIvalue\fR:port:\fIvalue2\fR + +\fIvalue\fR is numeric LID of node, \fIvalue2\fR is port number. + +.TP 10 +portguid:\fIvalue\fR + +\fIvalue\fR is numeric port GUID. + +.TP 10 +nodeguid:\fIvalue\fR + +\fIvalue\fR is numeric node GUID. + +.TP 10 +nodeguid:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is numeric node GUID, \fIvalue2\fR is port number. + +.TP 10 +iocguid:\fIvalue\fR + +\fIvalue\fR is numeric IOC GUID. + +.TP 10 +iocguid:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is numeric IOC GUID, \fIvalue2\fR is port number. + +.TP 10 +systemguid:\fIvalue\fR + +\fIvalue\fR is numeric system image GUID. + +.TP 10 +systemguid:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is the numeric system image GUID, \fIvalue2\fR is port number. + +.TP 10 +ioc:\fIvalue\fR + +\fIvalue\fR is IOC Profile ID String (IOC Name). + +.TP 10 +ioc:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is IOC Profile ID String (IOC Name), \fIvalue2\fR is port number. + +.TP 10 +iocpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for IOC Profile ID String (IOC Name). + +.TP 10 +iocpat:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is glob pattern for IOC Profile ID String (IOC Name), \fIvalue2\fR is port number. + +.TP 10 +ioctype:\fIvalue\fR + +\fIvalue\fR is IOC type (SRP or OTHER). + +.TP 10 +ioctype:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is IOC type (SRP or OTHER); \fIvalue2\fR is port number. + +.TP 10 +node:\fIvalue\fR + +\fIvalue\fR is node description (node name). + +.TP 10 +node:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is node description (node name), \fIvalue2\fR is port number. + +.TP 10 +nodepat:\fIvalue\fR + +\fIvalue\fR is glob pattern for node description (node name). + +.TP 10 +nodepat:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is the glob pattern for the node description (node name), \fIvalue2\fR is port number. + +.TP 10 +nodedetpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for node details. + +.TP 10 +nodedetpat:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is the glob pattern for the node details, \fIvalue2\fR is port number. + +.TP 10 +nodetype:\fIvalue\fR + +\fIvalue\fR is node type (SW or FI). + +.TP 10 +nodetype:\fIvalue1\fR:port:\fIvalue2\fR + +\fIvalue1\fR is node type (SW or FI), \fIvalue2\fR is port number. + +.TP 10 +rate:\fIvalue\fR + +\fIvalue\fR is string for rate (25g, 50g, 75g, 100g), omits switch mgmt port 0. + +.TP 10 +portstate:\fIvalue\fR + +\fIvalue\fR is a string for state (down, init, armed, active, notactive, initarmed). + +.TP 10 +portphysstate:\fIvalue\fR + +\fIvalue\fR is a string for PHYs state (polling, disabled, training, linkup, recovery, offline, test) + +.TP 10 +mtucap:\fIvalue\fR + +\fIvalue\fR is MTU size (2048, 4096, 8192, 10240), omits switch mgmt port 0. + +.TP 10 +labelpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable label. + +.TP 10 +lengthpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable length. + +.TP 10 +cabledetpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable details. + +.TP 10 +cabinflenpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable info length. + +.TP 10 +cabinfvendnamepat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable info vendor name. + +.TP 10 +cabinfvendpnpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable info vendor part number. + +.TP 10 +cabinfvendrevpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable info vendor revision. + +.TP 10 +cabinfvendsnpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for cable info vendor serial number. + +.TP 10 +cabinftype:\fIvalue\fR + +\fIvalue\fR is either optical, passive\(ulcopper, active\(ulcopper, or unknown. + +.TP 10 +linkdetpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for link details. + +.TP 10 +portdetpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for port details. + +.TP 10 +sm + +Specifies the master subnet manager (SM). + +.TP 10 +smdetpat:\fIvalue\fR + +\fIvalue\fR is glob pattern for SM details. + +.TP 10 +route:\fIpoint1\fR:\fIpoint2\fR + +Specifies all ports along the routes between the two given points. + +.TP 10 +led:\fIvalue\fR + +\fIvalue\fR is either on or off for LED port beacon. + +.TP 10 +linkqual:\fIvalue\fR + +Specifies the ports with a link quality equal to \fIvalue\fR. + +.TP 10 +linkqualLE:\fIvalue\fR + +Specifies the ports with a link quality less than or equal to \fIvalue\fR. + +.TP 10 +linkqualGE:\fIvalue\fR + +Specifies the ports with a link quality greater than or equal to \fIvalue\fR. + +.TP 10 +nodepatfile:\fIFILENAME\fR + +Specifies the name of file with the list of nodepats or node descriptions. + +.TP 10 +nodepairpatfile:\fIFILENAME\fR + +Specifies the name of file with the list of node pairs, separated by a colon. + +.TP 10 +ldr + +Specifies the ports with a non-zero link down reason or neighbor link down reason. + +.TP 10 +ldr:\fIvalue\fR + +Specifies the ports with a link down reason or neighbor link down reason equal to \fIvalue\fR. + +.SH Examples + +.PP +opareport can generate hundreds of different reports. Commonly generated reports include the following: +.PP + +.br + opareport -o comps -d 3 +.br + + opareport -o errors -o slowlinks +.br + + opareport -o nodes -F portguid:0x00117500a000447b +.br + + opareport -o nodes -F nodeguid:0x001175009800447b:port:1 +.br + + opareport -o nodes -F nodeguid:0x001175009800447b +.br + + opareport -o nodes -F \[aq]node:duster hfi1\(ul0\[aq] +.br + + opareport -o nodes -F \[aq]node:duster hfi1\(ul0:port:1\[aq] +.br + + opareport -o nodes -F \[aq]nodepat:d*\[aq] +.br + + opareport -o nodes -F \[aq]nodepat:d*:port:1\[aq] +.br + + opareport -o nodes -F \[aq]nodedetpat:compute*\[aq] +.br + + opareport -o nodes -F \[aq]nodedetpat:compute*:port:1\[aq] +.br + + opareport -o nodes -F nodetype:FI +.br + + opareport -o nodes -F nodetype:FI:port:1 +.br + + opareport -o nodes -F lid:1 +.br + + opareport -o nodes -F led:on + opareport -o nodes -F led:off + opareport -o nodes -F lid:1:node +.br + + opareport -o nodes -F lid:1:port:2 +.br + + opareport -o nodes -F gid:0xfe80000000000000:0x00117500a000447b +.br + + opareport -o nodes -F systemguid:0x001175009800447b +.br + + opareport -o nodes -F systemguid:0x001175009800447b:port:1 +.br + + opareport -o nodes -F iocguid:0x00117501300001e0 +.br + + opareport -o nodes -F iocguid:0x00117501300001e0:port:2 +.br + + opareport -o nodes -F \[aq]ioc:Chassis 0x001175005000010C, Slot 2, IOC 1\[aq] +.br + + opareport -o nodes -F \[aq]ioc:Chassis 0x001175005000010C, Slot 2, IOC 1:port:2\[aq] +.br + + opareport -o nodes -F \[aq]iocpat:*Slot 2*\[aq] +.br + + opareport -o nodes -F \[aq]iocpat:*Slot 2*:port:2\[aq] +.br + + opareport -o nodes -F ioctype:SRP + opareport -o nodes -F ioctype:SRP:port:2 +.br + + opareport -o extlinks -F rate:100g +.br + + opareport -o extlinks -F portstate:armed +.br + + opareport -o extlinks -F portphysstate:linkup +.br + + opareport -o extlinks -F \[aq]labelpat:S1345*\[aq] +.br + + opareport -o extlinks -F \[aq]lengthpat:11m\[aq] +.br + + opareport -o extlinks -F \[aq]cabledetpat:*hitachi*\[aq] +.br + + opareport -o extlinks -F \[aq]linkdetpat:*core ISL*\[aq] +.br + + opareport -o extlinks -F \[aq]portdetpat:*mgmt*\[aq] +.br + + opareport -o links -F mtucap:2048 +.br + + opareport -o nodes -F sm +.br + + opareport -o nodes -F \[aq]smdetpat:primary*\[aq] +.br + + opareport -o nodes -F \[aq]route:node:duster hfi1\(ul0:node:cuda hfi1\(ul0\[aq] +.br + + opareport -o nodes -F \[aq]route:node:duster hfi1\(ul0:port:1:node:cuda hfi1\(ul0:port:2\[aq] +.br + + opareport -o treepathusage -F nodepairpatfile:FILENAME +.br + + opareport -o pathusage -F nodepatfile:FILENAME +.br + + opareport -s -o snapshot > file +.br + + opareport -o topology > topology.xml +.br + + opareport -o errors -X file +.br + + opareport -s --begin "2 days ago" +.br + + opareport -s --begin "12:30" --end "14:00" +.br + + opareport -o linkinfo -x > file + +.br + + +.SH Other Information + +.PP +opareport also supports operation with the Fabric Manager Performance Manager (PM)/Performance Manager Agent (PMA). When opareport detects the presence of a PM, it automatically issues any required PortCounter queries and clears to the PM to access the PMs running totals. If a PM is not detected, then opareport directly accesses the PMAs on all the nodes. The -M option can force access to the PMA even if a PM is present. +.PP +opareport takes advantage of these interfaces to obtain extensive information about the fabric from the subnet manager and the end nodes. Using this information, opareport is able to cross-reference it and produce analysis greatly beyond what any single subnet manager request could provide. As such, it exceeds the capabilities previously available in tools such as opasaquery and opafabricinfo. +.PP +opareport obtains and displays counters from the Fabric Manager PM/PA or directly from the fabric PMAs using the -M option. +.PP +opareport internally cross-references all this information so its output can be in user-friendly form. Reports include GUIDs, LIDs, and names for components. Obviously, these reports are easiest to read if the end user has taken the time to provide unique names for all the components in the fabric (node names and IOC names). All Intel components support this capability. For hosts, the node names are automatically assigned based on the network host name of the server. For switches and line cards, the names can be assigned using the element managers for each component. +.PP +Each run of opareport obtains up-to-date information from the fabric. At the start of the run opareport takes a few seconds to obtain all the fabric data, then it is output to stdout. The reports are sorted by GUIDs and other permanent information so they can be rerun in the future and produce output in the same order even if components have been rebooted. This is useful for comparison using simple tools like diff. opareport permits multiple reports to be requested for a single run (for example, one of each report type). +.PP +By default, opareport uses the first active port on the local system. However, if the Management Node is connected to more than one fabric (for example, a subnet), the Intel(R) Omni-Path Host Fabric Interface (HFI) and port may be specified to select the fabric to analyze. diff --git a/IbaTools/man/opareports.manPage b/IbaTools/man/opareports.manPage index f5476dd..e32fc75 100644 --- a/IbaTools/man/opareports.manPage +++ b/IbaTools/man/opareports.manPage @@ -1,1001 +1,1047 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opareports 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opareports - -.NL - -.PP - -\fB(All)\fR -opareports is a front end to opareport that provides many of the same options and capabilities. It can also run a report against multiple fabrics or subnets (for example, local host HFI ports). opareports can use an input file to augment the reports using additional details from the topology\(ulinput file. -.SH Syntax -.NL -opareports [-t \fIportsfile\fR] [-p \fIports\fR] [-T \fItopology\(ulinput\fR] [opareport \fIarguments\fR] -.SH Options -.NL - -.TP 10 ---help -.NL -Produces full help text. -.TP 10 --t \fIportsfile\fR -.NL -Specifies the file with list of local HFI ports used to access fabric for analysis. Default is /etc/opa/ports file. -.TP 10 --p \fIports\fR -.NL -Specifies the list of local HFI ports used to access fabric for counter clear. - -.IP -Default is first active port. The first HFI in the system is 1. The first port on an HFI is 1. Uses the format hfi:port, -.br -for example: -.RS -.TP 10 - -.sp -0:0 -First active port in system. - -.RE - -.RS -.TP 10 - -.sp -0:y -Port \fIy\fR within system. - -.RE - -.RS -.TP 10 - -.sp -x:0 -First active port on HFI \fIx\fR. - -.RE - -.RS -.TP 10 - -.sp -x:y -HFI \fIx\fR, port \fIy\fR. - -.RE - -.TP 10 --T \fItopology\(ulinput\fR -.NL -Specifies the name of a topology input file to use. The filename may have %P as a marker which is replaced with the hfi:port being operated on, such as 0:0 or 1:2. The default filename is specified by \fBFF\(ulTOPOLOGY\(ulFILE\fR as /etc/opa/topology.%P.xml. If -T NONE is specified, no topology input file is used. -.TP 10 -opareport \fIarguments\fR -.NL -Options are passed to opareport. - -.IP -Specifies any of the other opareport arguments listed below (see -\fIopareport Options\fR -): -.br -opareport [-v][-q] [-h \fIhfi\fR] [-p \fIport\fR] [--timeout] -.br -[-o \fIreport\fR][-d \fIdetail\fR] [-P|-H] [-N] [-x] -.br -[-X \fIsnapshot\(ulinput\fR][-T \fItopology\(ulinput\fR] [-s] [-r] [-V] -.br -[-i \fIseconds\fR][-b \fIdate\(ultime\fR] [-e \fIdate\(ultime\fR] [-C] [-a] -.br -[-m] [-M] [-A][-c \fIfile\fR] [-L] [-F \fIpoint\fR] [-S \fIpoint\fR] -.br -[-D \fIpoint\fR] [-Q] - -.br - -.TP 10 -.BR - -.PP - -.B NOTE: -When using opareport arguments, regard the following: -.RS - -.IP \(bu -The -h and -X options are not available. -.IP \(bu -The meaning of -p is different for opareports than opareport. -.IP \(bu -When run against multiple fabrics, the -x and -o snapshot options are not available. -.IP \(bu -When run against multiple fabrics, the -F option is applied to all fabrics. - -.RE - - -.SH Examples -.NL -opareports -.br -opareports -p \[aq]1:1 2:1\[aq] -.SH Environment Variables -.NL - -.PP -The following environment variables are also used by this command: -.TP 10 -\fBPORTS\fR -.NL -List of ports, used in absence of -t and -p. -.TP 10 -\fBPORTS\(ulFILE\fR -.NL -File containing list of ports, used in absence of -t and -p. -.TP 10 -\fBFF\(ulTOPOLOGY\(ulFILE\fR -.NL -File containing topology\(ulinput (may have %P marker in filename), used in absence of -T. -.NL - -.SH opareport Options -.NL - -.PP -For reference: -.TP 10 ---help -.NL -Produces full help text. - -.TP 10 --v/--verbose -.NL -Returns verbose output. - -.TP 10 --q/--quiet -.NL -Disables progress reports. - -.TP 10 --h/--hfi \fIhfi\fR -.NL -Specifies the HFI, numbered 1..n. Using 0 specifies that the -p \fIport\fR port is a system-wide port number. Default is 0. - -.TP 10 --p/--port \fIport\fR -.NL -Specifies the port, numbered 1..n. Using 0 specifies the first active port. Default is 0. - -.TP 10 ---timeout -.NL -Specifies the timeout (wait time for response) in ms. Default is 1000 ms. - -.TP 10 --o/--output \fIreport\fR -.NL -Specifies the report type for output. Refer to -\fIopareport Report Types\fR -for details. - -.TP 10 --d/--detail \fIlevel\fR -.NL -Specifies the level of detail 0-n for output. Default is 2. - -.TP 10 --P/--persist -.NL -Only includes data persistent across reboots. - -.TP 10 --H/--hard -.NL -Only includes permanent hardware data. - -.TP 10 --N/--noname -.NL -Omits node and IOC names. - -.TP 10 --x/--xml -.NL -Produces output in XML. - -.TP 10 --X/--infile \fIsnapshot\(ulinput\fR -.NL -Generates a report using the data in the snapshot\(ulinput file. snapshot\(ulinput must have been generated during a previous -o \fIsnapshot\fR run. When used, the -s, -i, -C, and -a options are ignored. \[aq]-\[aq] may be used as the snapshot\(ulinput to specify stdin. - -.TP 10 --T/--topology \fItopology\(ulinput\fR -.NL -Uses topology\(ulinput file to augment and verify fabric information. When used, various reports can be augmented with information not available electronically (such as cable labels). \[aq]-\[aq] may be used to specify stdin. - -.TP 10 --s/--stats -.NL -Gets performance statistics for all ports. - -.TP 10 --i/--interval \fIseconds\fR -.NL -Obtains performance statistics over interval \fIseconds\fR. Clears all statistics, waits interval \fIseconds\fR, then generates report. Implies -s option. - -.TP 10 --b/--begin \fIdate\(ultime\fR -.NL -Obtains performance stats beginning at \fIdate\(ultime\fR. Implies -s option. -.RS - -.IP \(bu -If -b/--begin and -e/--end are specified, the performance stats are provided over the specified interval. -.IP \(bu -If only -b/--begin is specified, the absolute value of the performance stats at the specified time is provided. - -.RE -\fIdate\(ultime\fR may be a time entered as HH:MM[:SS] or date as mm/dd/YYYY, dd.mm.YYYY, YYYY-mm-dd or date followed by time; for example, "2016-07-04 14:40". Relative times are taken as "x [second|minute|hour|day](s) ago. - -.TP 10 --e/--end \fIdate\(ultime\fR -.NL -Obtains performance stats over an interval ending at \fIdate\(ultime\fR. Implies -s option. - -.RS - -.IP \(bu -If -b/--begin and -e/--end are specified, the performance stats are provided over the specified interval. -.IP \(bu -If only -e/--end is specified, the absolute value of the performance stats at the specified time is provided. - -.RE - -.IP -\fIdate\(ultime\fR may be a time entered as HH:MM[:SS] or date as mm/dd/YYYY, dd.mm.YYYY, YYYY-mm-dd or date followed by time; for example, "2016-07-04 14:40". Relative times are taken as "x [second|minute|hour|day](s) ago. -.TP 10 --C/--clear -.NL -Clears performance statistics for all ports. Only statistics with error thresholds are cleared. A clear occurs after generating the report. - -.TP 10 --a/--clearall -.NL -Clears all performance statistics for all ports. - -.TP 10 --m/--smadirect -.NL -Accesses fabric information directly from SMA. - -.TP 10 --M/--pmadirect -.NL -Accesses performance statistics using direct PMA. - -.TP 10 --A/--allports -.NL -Gets PortInfo for down switch ports. Uses direct SMA to get this data. If used with -M, also gets PMA stats for down switch ports. - -.TP 10 --c/--config \fIfile\fR -.NL -Specifies the error thresholds configuration file. Default is /etc/opa/opamon.conf file. - -.TP 10 --L/--limit -.NL -Limits operation to exact specified focus with -F for port error counters check (-o \fIerrors\fR) and port counters clear (-C or -i). Normally, the neighbor of each selected port is also checked/cleared. Does not affect other reports. - -.TP 10 --F/--focus \fIpoint\fR -.NL -Specifies the focus area for report. - -.IP -Limits output to reflect a subsection of the fabric. May not work with all reports. (For example, route, mcgroups, and the verify* reports may ignore the option or not generate useful results.) -.TP 10 --S/--src \fIpoint\fR -.NL -Specifies the source for trace route. Default is local port. - -.TP 10 --D/--dest \fIpoint\fR -.NL -Specifies the destination for trace route. - -.TP 10 --Q/--quietfocus -.NL -Excludes focus description from report. - -.NL - -.SH opareport Snapshot-Specific Options -.NL - -.PP -For reference: -.TP 10 --r/--routes -.NL -Gets routing tables for all switches. - -.TP 10 --V/--vltables -.NL -Gets the P-Key tables for all nodes and the QoS VL-related tables for all ports. - -.NL - -.SH opareport Report Types -.NL - -.PP -For reference: -.TP 10 -comps -.NL -Summary of all systems and SMs in fabric. - -.TP 10 -brcomps -.NL -Brief summary of all systems and SMs in fabric. - -.TP 10 -nodes -.NL -Summary of all node types and SMs in fabric. - -.TP 10 -brnodes -.NL -Brief summary of all node types and SMs in fabric. - -.TP 10 -ious -.NL -Summary of all IO units in the fabric. - -.TP 10 -lids -.NL -Summary of all LIDs in the fabric. - -.TP 10 -links -.NL -Summary of all links. - -.TP 10 -linkinfo -.NL -Summary of all links with LIDs in the fabric. - -.TP 10 -extlinks -.NL -Summary of links external to systems. - -.TP 10 -filinks -.NL -Summary of links to FIs. - -.TP 10 -islinks -.NL -Summary of inter-switch links. - -.TP 10 -extislinks -.NL -Summary of inter-switch links external to systems. - -.TP 10 -slowlinks -.NL -Summary of links running slower than expected. - -.TP 10 -slowconfiglinks -.NL -Summary of links configured to run slower than supported, includes slowlinks. - -.TP 10 -slowconnlinks -.NL -Summary of links connected with mismatched speed potential, includes slowconfiglinks. - -.TP 10 -misconfiglinks -.NL -Summary of links configured to run slower than supported. - -.TP 10 -misconnlinks -.NL -Summary of links connected with mismatched speed potential. - -.TP 10 -errors -.NL -Summary of links whose errors exceed counts in the configuration file. - -.TP 10 -otherports -.NL -Summary of ports not connected to the fabric. - -.TP 10 -linear -.NL -Summary of linear forwarding data base (FDB) for each switch. - -.TP 10 -mcast -.NL -Summary of multicast FDB for each switch in the fabric. - -.TP 10 -mcgroups -.NL -Summary of multicast groups. - -.IP -When used in conjunction with -d, the following report details are possible: -.RS - -.IP \(bu --d0 : Shows the number of multicast groups -.IP \(bu --d1 : Shows a list of multicast groups -.IP \(bu --d2 : Shows a list of members per multicast group - -.RE - -.IP -This report can be used with option -X. -.TP 10 -portusage -.NL -Summary of ports referenced in linear FDB for each switch, broken down by NodeType of DLID. - -.TP 10 -pathusage -.NL -Summary of number of FI to FI paths routed through each switch port. - -.TP 10 -treepathusage -.NL -Analysis of number of FI to FI paths routed through each switch port for a FAT tree. - -.TP 10 -portgroups -.NL -Summary of adaptive routing port groups for each switch. - -.TP 10 -quarantinednodes -.NL -Summary of quarantined nodes. - -.TP 10 -validateroutes -.NL -Validates all routes in the fabric. - -.TP 10 -validatevlroutes -.NL -Validates all routes in the fabric using SLSC, SCSC, and SCVL tables. - -.TP 10 -validatepgs -.NL -Validates all port groups in the fabric. - -.TP 10 -validatecreditloops -.NL -Validates topology configuration of the fabric to identify any existing credit loops. - -.TP 10 -validatevlcreditloops -.NL -Validates topology configuration of the fabric including SLSC, SCSC, and SCVL tables to identify any existing credit loops. - -.TP 10 -validatemcroutes -.NL -Validates multicast routes of the fabric to identify loops in multicast forwarding tables and detect MFT-multicast membership inconsistencies. - -.TP 10 -vfinfo -.NL -Summary of virtual fabric (vFabric) information. - -.TP 10 -vfmember -.NL -Summary of vFabric membership information. - -.TP 10 -dgmember -.NL -Summary of DeviceGroup membership information. - -.TP 10 -verifyfis -.NL -Compares fabric (or snapshot) FIs to supplied topology and identifies differences and omissions. - -.TP 10 -verifysws -.NL -Compares fabric (or snapshot) switches to supplied topology and identifies differences and omissions. - -.TP 10 -verifynodes -.NL -Returns verifyfis and verifysws reports. - -.TP 10 -verifysms -.NL -Compares fabric (or snapshot) SMs to supplied topology and identifies differences and omissions. - -.TP 10 -verifylinks -.NL -Compares fabric (or snapshot) links to supplied topology and identifies differences and omissions. - -.TP 10 -verifyextlinks -.NL -Compares fabric (or snapshot) links to supplied topology and identifies differences and omissions. Limits analysis to links external to systems. - -.TP 10 -verifyfilinks -.NL -Compares fabric (or snapshot) links to supplied topology and identify differences and omissions. Limits analysis to links to FIs. - -.TP 10 -verifyislinks -.NL -Compares fabric (or snapshot) links to supplied topology and identify differences and omissions. Limits analysis to inter-switch links. - -.TP 10 -verifyextislinks -.NL -Compares fabric (or snapshot) links to supplied topology and identify differences and omissions. Limits analysis to inter-switch links external to systems. - -.TP 10 -verifyall -.NL -Returns verifyfis, verifysws, verifysms, and verifylinks reports. - -.TP 10 -all -.NL -Returns comps, nodes, ious, links, extlinks, slowconnlinks, and errors reports. - -.TP 10 -route -.NL -Traces route between -S and -D points. - -.TP 10 -bfrctrl -.NL -Reports Buffer Control Tables for all ports. - -.TP 10 -snapshot -.NL -Outputs snapshot of the fabric state for later use as \fIsnapshot\(ulinput\fR. This implies -x. May not be combined with other reports. When selected, -F, -P, -H, and -N options are ignored. - -.TP 10 -topology -.NL -Outputs the topology of the fabric for later use as \fItopology\(ulinput\fR. This implies -x. May not be combined with other reports. Use with detail level 3 or more to get Port element under Node in output xml. - -.TP 10 -none -.NL -No report, useful to clear statistics. - -.NL - -.SH opareport Point Syntax -.NL - -.PP -For reference: -.TP 10 -gid:value -.NL -\fIvalue\fR is numeric port GID of form: subnet:guid. - -.TP 10 -lid:value -.NL -\fIvalue\fR is numeric LID. - -.TP 10 -lid:value:node -.NL -\fIvalue\fR is numeric LID, selects entire node with given LID. - -.TP 10 -lid:value:port:value2 -.NL -\fIvalue\fR is numeric LID of node, \fIvalue2\fR is port number. - -.TP 10 -portguid:value -.NL -\fIvalue\fR is numeric port GUID. - -.TP 10 -nodeguid:value -.NL -\fIvalue\fR is numeric node GUID. - -.TP 10 -nodeguid:value1:port:value2 -.NL -\fIvalue1\fR is numeric node GUID, \fIvalue2\fR is port number. - -.TP 10 -iocguid:value -.NL -\fIvalue\fR is numeric IOC GUID. - -.TP 10 -iocguid:value1:port:value2 -.NL -\fIvalue1\fR is numeric IOC GUID, \fIvalue2\fR is port number. - -.TP 10 -systemguid:value -.NL -\fIvalue\fR is numeric system image GUID. - -.TP 10 -systemguid:value1:port:value2 -.NL -\fIvalue1\fR is the numeric system image GUID, \fIvalue2\fR is port number. - -.TP 10 -ioc:value -.NL -\fIvalue\fR is IOC Profile ID String (IOC Name). - -.TP 10 -ioc:value1:port:value2 -.NL -\fIvalue1\fR is IOC Profile ID String (IOC Name), \fIvalue2\fR is port number. - -.TP 10 -iocpat:value -.NL -\fIvalue\fR is glob pattern for IOC Profile ID String (IOC Name). - -.TP 10 -iocpat:value1:port:value2 -.NL -\fIvalue1\fR is glob pattern for IOC Profile ID String (IOC Name), \fIvalue2\fR is port number. - -.TP 10 -ioctype:value -.NL -\fIvalue\fR is IOC type (SRP or OTHER). - -.TP 10 -ioctype:value1:port:value2 -.NL -\fIvalue1\fR is IOC type (SRP or OTHER); \fIvalue2\fR is port number. - -.TP 10 -node:value -.NL -\fIvalue\fR is node description (node name). - -.TP 10 -node:value1:port:value2 -.NL -\fIvalue1\fR is node description (node name), \fIvalue2\fR is port number. - -.TP 10 -nodepat:value -.NL -\fIvalue\fR is glob pattern for node description (node name). - -.TP 10 -nodepat:value1:port:value2 -.NL -\fIvalue1\fR is the glob pattern for the node description (node name), \fIvalue2\fR is port number. - -.TP 10 -nodedetpat:value -.NL -\fIvalue\fR is glob pattern for node details. - -.TP 10 -nodedetpat:value1:port:value2 -.NL -\fIvalue1\fR is the glob pattern for the node details, \fIvalue2\fR is port number. - -.TP 10 -nodetype:value -.NL -\fIvalue\fR is node type (SW or FI). - -.TP 10 -nodetype:value1:port:value2 -.NL -\fIvalue1\fR is node type (SW or FI), \fIvalue2\fR is port number. - -.TP 10 -rate:value -.NL -\fIvalue\fR is string for rate (25g, 50g, 75g, 100g), omits switch mgmt port 0. - -.TP 10 -portstate:value -.NL -\fIvalue\fR is a string for state (down, init, armed, active, notactive, initarmed). - -.TP 10 -portphysstate:value -.NL -\fIvalue\fR is a string for PHYs state (polling, disabled, training, linkup, recovery, offline, test) - -.TP 10 -mtucap:value -.NL -\fIvalue\fR is MTU size (2048, 4096, 8192, 10240), omits switch mgmt port 0. - -.TP 10 -labelpat:value -.NL -\fIvalue\fR is glob pattern for cable label. - -.TP 10 -lengthpat:value -.NL -\fIvalue\fR is glob pattern for cable length. - -.TP 10 -cabledetpat:value -.NL -\fIvalue\fR is glob pattern for cable details. - -.TP 10 -cabinflenpat:value -.NL -\fIvalue\fR is glob pattern for cable info length. - -.TP 10 -cabinfvendnamepat:value -.NL -\fIvalue\fR is glob pattern for cable info vendor name. - -.TP 10 -cabinfvendpnpat:value -.NL -\fIvalue\fR is glob pattern for cable info vendor part number. - -.TP 10 -cabinfvendrevpat:value -.NL -\fIvalue\fR is glob pattern for cable info vendor revision. - -.TP 10 -cabinfvendsnpat:value -.NL -\fIvalue\fR is glob pattern for cable info vendor serial number. - -.TP 10 -cabinftype:value -.NL -\fIvalue\fR is either optical, passive\(ulcopper, active\(ulcopper, or unknown. - -.TP 10 -linkdetpat:value -.NL -\fIvalue\fR is glob pattern for link details. - -.TP 10 -portdetpat:value -.NL -\fIvalue\fR is glob pattern for port details. - -.TP 10 -sm -.NL -Specifies the master subnet manager (SM). - -.TP 10 -smdetpat:value -.NL -\fIvalue\fR is glob pattern for SM details. - -.TP 10 -route:point1:point2 -.NL -Specifies all ports along the routes between the two given points. - -.TP 10 -led:value -.NL -\fIvalue\fR is either on or off for LED port beacon. - -.TP 10 -linkqual:value -.NL -Specifies the ports with a link quality equal to \fIvalue\fR. - -.TP 10 -linkqualLE:value -.NL -Specifies the ports with a link quality less than or equal to \fIvalue\fR. - -.TP 10 -linkqualGE:value -.NL -Specifies the ports with a link quality greater than or equal to \fIvalue\fR. - -.TP 10 -nodepatfile:\fIFILENAME\fR -.NL -Specifies the name of file with the list of nodes. - -.TP 10 -nodepairpatfile:\fIFILENAME\fR -.NL -Specifies the name of file with the list of node pairs, separated by a colon. - -.NL - -.SH opareport Examples -.NL - -.PP -For reference: -.PP -opareport can generate hundreds of different reports. Commonly generated reports include the following:opareport -o comps -d 3 -.br -opareport -o errors -o slowlinks -.br -opareport -o nodes -F portguid:0x00117500a000447b -.br -opareport -o nodes -F nodeguid:0x001175009800447b:port:1 -.br -opareport -o nodes -F nodeguid:0x001175009800447b -.br -opareport -o nodes -F \[aq]node:duster hfi1\(ul0\[aq] -.br -opareport -o nodes -F \[aq]node:duster hfi1\(ul0:port:1\[aq] -.br -opareport -o nodes -F \[aq]nodepat:d*\[aq] -.br -opareport -o nodes -F \[aq]nodepat:d*:port:1\[aq] -.br -opareport -o nodes -F \[aq]nodedetpat:compute*\[aq] -.br -opareport -o nodes -F \[aq]nodedetpat:compute*:port:1\[aq] -.br -opareport -o nodes -F nodetype:FI -.br -opareport -o nodes -F nodetype:FI:port:1 -.br -opareport -o nodes -F lid:1 -.br -opareport -o nodes -F led:on opareport -o nodes -F led:off opareport -o nodes -F lid:1:node -.br -opareport -o nodes -F lid:1:port:2 -.br -opareport -o nodes -F gid:0xfe80000000000000:0x00117500a000447b -.br -opareport -o nodes -F systemguid:0x001175009800447b -.br -opareport -o nodes -F systemguid:0x001175009800447b:port:1 -.br -opareport -o nodes -F iocguid:0x00117501300001e0 -.br -opareport -o nodes -F iocguid:0x00117501300001e0:port:2 -.br -opareport -o nodes -F \[aq]ioc:Chassis 0x001175005000010C, Slot 2, IOC 1\[aq] -.br -opareport -o nodes -F \[aq]ioc:Chassis 0x001175005000010C, Slot 2, IOC 1:port:2\[aq] -.br -opareport -o nodes -F \[aq]iocpat:*Slot 2*\[aq] -.br -opareport -o nodes -F \[aq]iocpat:*Slot 2*:port:2\[aq] -.br -opareport -o nodes -F ioctype:SRP opareport -o nodes -F ioctype:SRP:port:2 -.br -opareport -o extlinks -F rate:100g -.br -opareport -o extlinks -F portstate:armed -.br -opareport -o extlinks -F portphysstate:linkup -.br -opareport -o extlinks -F \[aq]labelpat:S1345*\[aq] -.br -opareport -o extlinks -F \[aq]lengthpat:11m\[aq] -.br -opareport -o extlinks -F \[aq]cabledetpat:*hitachi*\[aq] -.br -opareport -o extlinks -F \[aq]linkdetpat:*core ISL*\[aq] -.br -opareport -o extlinks -F \[aq]portdetpat:*mgmt*\[aq] -.br -opareport -o links -F mtucap:2048 -.br -opareport -o nodes -F sm -.br -opareport -o nodes -F \[aq]smdetpat:primary*\[aq] -.br -opareport -o nodes -F \[aq]route:node:duster hfi1\(ul0:node:cuda hfi1\(ul0\[aq] -.br -opareport -o nodes -F \[aq]route:node:duster hfi1\(ul0:port:1:node:cuda hfi1\(ul0:port:2\[aq] -.br -opareport -o treepathusage -F nodepairpatfile:FILENAME -.br -opareport -o pathusage -F nodepatfile:FILENAME -.br -opareport -s -o snapshot > file -.br -opareport -o topology > topology.xml -.br -opareport -o errors -X file -.br -opareport -s --begin "2 days ago" -.br -opareport -s --begin "12:30" --end "14:00" -.SH Details -.NL - -.PP -For simple fabrics, the Intel(R) Omni-Path Fabric Suite FastFabric Toolset host is connected to a single fabric. By default, the first active port on the FastFabric Toolset host is used to analyze the fabric. -.PP -However, in more complex fabrics, the FastFabric Toolset host may be connected to more than one fabric or subnet. In this case, you can specify the ports or HFIs to use with one of the following methods: -.IP \(bu -On the command line using the -p option. -.IP \(bu -In a file specified using the -t option. -.IP \(bu -Through the environment variables \fBPORTS\fR or \fBPORTS\(ulFILE\fR. -.IP \(bu -Using the ports\(ulfile configuration option in /etc/opa/opafastfabric.conf. -.PP -If the specified port does not exist or is empty, the first active port on the local system is used. In more complex configurations, you must specify the exact ports to use for all fabrics to be analyzed. -.PP -You can specify the topology\(ulinput file to be used with one of the following methods: -.IP \(bu -On the command line using the -T option. -.IP \(bu -In a file specified through the environment variable \fBFF\(ulTOPOLOGY\(ulFILE\fR. -.IP \(bu -Using the ff\(ultopology\(ulfile configuration option in opafastfabric.conf. -.PP -If the specified file does not exist, no topology\(ulinput file is used. Alternately the filename can be specified as NONE to prevent use of an input file. +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opareports 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opareports + + +.PP + +\fB(All)\fR +opareports is a front end to opareport that provides many of the same options and capabilities. It can also run a report against multiple fabrics or subnets (for example, local host HFI ports). opareports can use an input file to augment the reports using additional details from the topology\(ulinput file. +.SH Syntax +opareports [-t \fIportsfile\fR] [-p \fIports\fR] [-T \fItopology\(ulinput\fR] [opareport \fIarguments\fR] +.SH Options + +.TP 10 +--help + +Produces full help text. +.TP 10 +-t \fIportsfile\fR + +Specifies the file with list of local HFI ports used to access fabric for analysis. Default is /etc/opa/ports file. +.TP 10 +-p \fIports\fR + +Specifies the list of local HFI ports used to access fabric for counter clear. + +.IP +Default is first active port. The first HFI in the system is 1. The first port on an HFI is 1. Uses the format hfi:port, +.br +for example: +.RS +.TP 10 + +.sp +0:0 +First active port in system. + +.RE + +.RS +.TP 10 + +.sp +0:y +Port \fIy\fR within system. + +.RE + +.RS +.TP 10 + +.sp +x:0 +First active port on HFI \fIx\fR. + +.RE + +.RS +.TP 10 + +.sp +x:y +HFI \fIx\fR, port \fIy\fR. + +.RE + +.TP 10 +-T \fItopology\(ulinput\fR + +Specifies the name of a topology input file to use. The filename may have %P as a marker which is replaced with the hfi:port being operated on, such as 0:0 or 1:2. The default filename is specified by \fBFF\(ulTOPOLOGY\(ulFILE\fR as /etc/opa/topology.%P.xml. If -T NONE is specified, no topology input file is used. +.TP 10 +opareport \fIarguments\fR + +Options are passed to opareport. + +.IP +Specifies any of the other opareport arguments listed below (see +\fIopareport Options\fR +):opareport [-v][-q] [-h \fIhfi\fR] [-p \fIport\fR] [--timeout] +.br + +[-o \fIreport\fR][-d \fIdetail\fR] [-P|-H] [-N] [-x] +.br + +[-X \fIsnapshot\(ulinput\fR][-T \fItopology\(ulinput\fR] [-s] [-r] [-V] +.br + +[-i \fIseconds\fR][-b \fIdate\(ultime\fR] [-e \fIdate\(ultime\fR] [-C] [-a] +.br + +[-m] [-M] [-A][-c \fIfile\fR] [-L] [-F \fIpoint\fR] [-S \fIpoint\fR] +.br + +[-D \fIpoint\fR] [-Q] +.TP 10 +.BR + +.PP + +.B NOTE: +When using opareport arguments, regard the following: +.RS + +.IP \(bu +The -h and -X options are not available. +.IP \(bu +The meaning of -p is different for opareports than opareport. +.IP \(bu +When run against multiple fabrics, the -x and -o snapshot options are not available. +.IP \(bu +When run against multiple fabrics, the -F option is applied to all fabrics. + +.RE + + +.SH Examples +opareports +.br + +opareports -p \[aq]1:1 2:1\[aq] +.SH Environment Variables + +.PP +The following environment variables are also used by this command: +.TP 10 +\fBPORTS\fR + +List of ports, used in absence of -t and -p. +.TP 10 +\fBPORTS\(ulFILE\fR + +File containing list of ports, used in absence of -t and -p. +.TP 10 +\fBFF\(ulTOPOLOGY\(ulFILE\fR + +File containing topology\(ulinput (may have %P marker in filename), used in absence of -T. + +.SH opareport Options + +.PP +For reference: +.TP 10 +--help + +Produces full help text. + +.TP 10 +-v/--verbose + +Returns verbose output. + +.TP 10 +-q/--quiet + +Disables progress reports. + +.TP 10 +-h/--hfi \fIhfi\fR + +Specifies the HFI, numbered 1..n. Using 0 specifies that the -p \fIport\fR port is a system-wide port number. Default is 0. + +.TP 10 +-p/--port \fIport\fR + +Specifies the port, numbered 1..n. Using 0 specifies the first active port. Default is 0. + +.TP 10 +--timeout + +Specifies the timeout (wait time for response) in ms. Default is 1000 ms. + +.TP 10 +-o/--output \fIreport\fR + +Specifies the report type for output. Refer to +\fIopareport Report Types\fR +for details. + +.TP 10 +-d/--detail \fIlevel\fR + +Specifies the level of detail 0-n for output. Default is 2. + +.TP 10 +-P/--persist + +Only includes data persistent across reboots. + +.TP 10 +-H/--hard + +Only includes permanent hardware data. + +.TP 10 +-N/--noname + +Omits node and IOC names. + +.TP 10 +-x/--xml + +Produces output in XML. + +.TP 10 +-X/--infile \fIsnapshot\(ulinput\fR + +Generates a report using the data in the snapshot\(ulinput file. snapshot\(ulinput must have been generated during a previous -o \fIsnapshot\fR run. When used, the -s, -i, -C, and -a options are ignored. \[aq]-\[aq] may be used as the snapshot\(ulinput to specify stdin. + +.TP 10 +-T/--topology \fItopology\(ulinput\fR + +Uses topology\(ulinput file to augment and verify fabric information. When used, various reports can be augmented with information not available electronically (such as cable labels). \[aq]-\[aq] may be used to specify stdin. + +.TP 10 +-s/--stats + +Gets performance statistics for all ports. + +.TP 10 +-i/--interval \fIseconds\fR + +Obtains performance statistics over interval \fIseconds\fR. Clears all statistics, waits interval \fIseconds\fR, then generates report. Implies -s option. + +.TP 10 +-b/--begin \fIdate\(ultime\fR + +Obtains performance stats beginning at \fIdate\(ultime\fR. Implies -s option. +.RS + +.IP \(bu +If -b/--begin and -e/--end are specified, the performance stats are provided over the specified interval. +.IP \(bu +If only -b/--begin is specified, the absolute value of the performance stats at the specified time is provided. + +.RE +\fIdate\(ultime\fR may be a time entered as HH:MM[:SS] or date as mm/dd/YYYY, dd.mm.YYYY, YYYY-mm-dd or date followed by time; for example, "2016-07-04 14:40". Relative times are taken as "x [second|minute|hour|day](s) ago. + +.TP 10 +-e/--end \fIdate\(ultime\fR + +Obtains performance stats ending at \fIdate\(ultime\fR. Implies -s option. + +.RS + +.IP \(bu +If -b/--begin and -e/--end are specified, the performance stats are provided over the specified interval. +.IP \(bu +If only -e/--end is specified, the absolute value of the performance stats at the specified time is provided. + +.RE + +.IP +\fIdate\(ultime\fR may be a time entered as HH:MM[:SS] or date as mm/dd/YYYY, dd.mm.YYYY, YYYY-mm-dd or date followed by time; for example, "2016-07-04 14:40". Relative times are taken as "x [second|minute|hour|day](s) ago. +.TP 10 +-C/--clear + +Clears performance statistics for all ports. Only statistics with error thresholds are cleared. A clear occurs after generating the report. + +.TP 10 +-a/--clearall + +Clears all performance statistics for all ports. + +.TP 10 +-m/--smadirect + +Accesses fabric information directly from SMA. + +.TP 10 +-M/--pmadirect + +Accesses performance statistics using direct PMA. + +.TP 10 +-A/--allports + +Gets PortInfo for down switch ports. Uses direct SMA to get this data. If used with -M, also gets PMA stats for down switch ports. + +.TP 10 +-c/--config \fIfile\fR + +Specifies the error thresholds configuration file. Default is /etc/opa/opamon.conf file. + +.TP 10 +-L/--limit + +Limits operation to exact specified focus with -F for port error counters check (-o \fIerrors\fR) and port counters clear (-C or -i). Normally, the neighbor of each selected port is also checked/cleared. Does not affect other reports. + +.TP 10 +-F/--focus \fIpoint\fR + +Specifies the focus area for report. + +.IP +Limits output to reflect a subsection of the fabric. May not work with all reports. (For example, route, mcgroups, and the verify* reports may ignore the option or not generate useful results.) +.TP 10 +-S/--src \fIpoint\fR + +Specifies the source for trace route. Default is local port. + +.TP 10 +-D/--dest \fIpoint\fR + +Specifies the destination for trace route. + +.TP 10 +-Q/--quietfocus + +Excludes focus description from report. + + +.SH opareport Snapshot-Specific Options + +.PP +For reference: +.TP 10 +-r/--routes + +Gets routing tables for all switches. + +.TP 10 +-V/--vltables + +Gets the P-Key tables for all nodes and the QoS VL-related tables for all ports. + + +.SH opareport Report Types + +.PP +For reference: +.TP 10 +comps + +Summary of all systems and SMs in fabric. + +.TP 10 +brcomps + +Brief summary of all systems and SMs in fabric. + +.TP 10 +nodes + +Summary of all node types and SMs in fabric. + +.TP 10 +brnodes + +Brief summary of all node types and SMs in fabric. + +.TP 10 +ious + +Summary of all IO units in the fabric. + +.TP 10 +lids + +Summary of all LIDs in the fabric. + +.TP 10 +linkinfo + +Summary of all links with LIDs in the fabric. + +.TP 10 +links + +Summary of all links. + +.TP 10 +extlinks + +Summary of links external to systems. + +.TP 10 +filinks + +Summary of links to FIs. + +.TP 10 +islinks + +Summary of inter-switch links. + +.TP 10 +extislinks + +Summary of inter-switch links external to systems. + +.TP 10 +slowlinks + +Summary of links running slower than expected. + +.TP 10 +slowconfiglinks + +Summary of links configured to run slower than supported, includes slowlinks. + +.TP 10 +slowconnlinks + +Summary of links connected with mismatched speed potential, includes slowconfiglinks. + +.TP 10 +misconfiglinks + +Summary of links configured to run slower than supported. + +.TP 10 +misconnlinks + +Summary of links connected with mismatched speed potential. + +.TP 10 +errors + +Summary of links whose errors exceed counts in the configuration file. + +.TP 10 +otherports + +Summary of ports not connected to the fabric. + +.TP 10 +linear + +Summary of linear forwarding data base (FDB) for each switch. + +.TP 10 +mcast + +Summary of multicast FDB for each switch in the fabric. + +.TP 10 +mcgroups + +Summary of multicast groups. + +.IP +When used in conjunction with -d, the following report details are possible: +.RS + +.IP \(bu +-d0 : Shows the number of multicast groups +.IP \(bu +-d1 : Shows a list of multicast groups +.IP \(bu +-d2 : Shows a list of members per multicast group + +.RE + +.IP +This report can be used with option -X. +.TP 10 +portusage + +Summary of ports referenced in linear FDB for each switch, broken down by NodeType of DLID. + +.TP 10 +pathusage + +Summary of number of FI to FI paths routed through each switch port. + +.TP 10 +treepathusage + +Analysis of number of FI to FI paths routed through each switch port for a FAT tree. + +.TP 10 +portgroups + +Summary of adaptive routing port groups for each switch. + +.TP 10 +quarantinednodes + +Summary of quarantined nodes. + +.TP 10 +validateroutes + +Validates all routes in the fabric. + +.TP 10 +validatevlroutes + +Validates all routes in the fabric using SLSC, SCSC, and SCVL tables. + +.TP 10 +validatepgs + +Validates all port groups in the fabric. + +.TP 10 +validatecreditloops + +Validates topology configuration of the fabric to identify any existing credit loops. + +.TP 10 +validatevlcreditloops + +Validates topology configuration of the fabric including SLSC, SCSC, and SCVL tables to identify any existing credit loops. + +.TP 10 +validatemcroutes + +Validates multicast routes of the fabric to identify loops in multicast forwarding tables and detect MFT-multicast membership inconsistencies. + +.TP 10 +vfinfo + +Summary of virtual fabric (vFabric) information. + +.TP 10 +vfmember + +Summary of vFabric membership information. + +.TP 10 +dgmember + +Summary of DeviceGroup membership information. + +.TP 10 +verifyfis + +Compares fabric (or snapshot) FIs to supplied topology and identifies differences and omissions. + +.TP 10 +verifysws + +Compares fabric (or snapshot) switches to supplied topology and identifies differences and omissions. + +.TP 10 +verifynodes + +Returns verifyfis and verifysws reports. + +.TP 10 +verifysms + +Compares fabric (or snapshot) SMs to supplied topology and identifies differences and omissions. + +.TP 10 +verifylinks + +Compares fabric (or snapshot) links to supplied topology and identifies differences and omissions. + +.TP 10 +verifyextlinks + +Compares fabric (or snapshot) links to supplied topology and identifies differences and omissions. Limits analysis to links external to systems. + +.TP 10 +verifyfilinks + +Compares fabric (or snapshot) links to supplied topology and identify differences and omissions. Limits analysis to links to FIs. + +.TP 10 +verifyislinks + +Compares fabric (or snapshot) links to supplied topology and identify differences and omissions. Limits analysis to inter-switch links. + +.TP 10 +verifyextislinks + +Compares fabric (or snapshot) links to supplied topology and identify differences and omissions. Limits analysis to inter-switch links external to systems. + +.TP 10 +verifyall + +Returns verifyfis, verifysws, verifysms, and verifylinks reports. + +.TP 10 +all + +Returns comps, nodes, ious, links, extlinks, slowconnlinks, and errors reports. + +.TP 10 +route + +Traces route between -S and -D points. + +.TP 10 +bfrctrl + +Reports Buffer Control Tables for all ports. + +.TP 10 +snapshot + +Outputs snapshot of the fabric state for later use as \fIsnapshot\(ulinput\fR. This implies -x. May not be combined with other reports. When selected, -F, -P, -H, and -N options are ignored. + +.TP 10 +topology + +Outputs the topology of the fabric for later use as \fItopology\(ulinput\fR. This implies -x. May not be combined with other reports. Use with detail level 3 or more to get Port element under Node in output xml. + +.TP 10 +none + +No report, useful to clear statistics. + + +.SH opareport Point Syntax + +.PP +For reference: +.TP 10 +gid:value + +\fIvalue\fR is numeric port GID of form: subnet:guid. + +.TP 10 +lid:value + +\fIvalue\fR is numeric LID. + +.TP 10 +lid:value:node + +\fIvalue\fR is numeric LID, selects entire node with given LID. + +.TP 10 +lid:value:port:value2 + +\fIvalue\fR is numeric LID of node, \fIvalue2\fR is port number. + +.TP 10 +portguid:value + +\fIvalue\fR is numeric port GUID. + +.TP 10 +nodeguid:value + +\fIvalue\fR is numeric node GUID. + +.TP 10 +nodeguid:value1:port:value2 + +\fIvalue1\fR is numeric node GUID, \fIvalue2\fR is port number. + +.TP 10 +iocguid:value + +\fIvalue\fR is numeric IOC GUID. + +.TP 10 +iocguid:value1:port:value2 + +\fIvalue1\fR is numeric IOC GUID, \fIvalue2\fR is port number. + +.TP 10 +systemguid:value + +\fIvalue\fR is numeric system image GUID. + +.TP 10 +systemguid:value1:port:value2 + +\fIvalue1\fR is the numeric system image GUID, \fIvalue2\fR is port number. + +.TP 10 +ioc:value + +\fIvalue\fR is IOC Profile ID String (IOC Name). + +.TP 10 +ioc:value1:port:value2 + +\fIvalue1\fR is IOC Profile ID String (IOC Name), \fIvalue2\fR is port number. + +.TP 10 +iocpat:value + +\fIvalue\fR is glob pattern for IOC Profile ID String (IOC Name). + +.TP 10 +iocpat:value1:port:value2 + +\fIvalue1\fR is glob pattern for IOC Profile ID String (IOC Name), \fIvalue2\fR is port number. + +.TP 10 +ioctype:value + +\fIvalue\fR is IOC type (SRP or OTHER). + +.TP 10 +ioctype:value1:port:value2 + +\fIvalue1\fR is IOC type (SRP or OTHER); \fIvalue2\fR is port number. + +.TP 10 +node:value + +\fIvalue\fR is node description (node name). + +.TP 10 +node:value1:port:value2 + +\fIvalue1\fR is node description (node name), \fIvalue2\fR is port number. + +.TP 10 +nodepat:value + +\fIvalue\fR is glob pattern for node description (node name). + +.TP 10 +nodepat:value1:port:value2 + +\fIvalue1\fR is the glob pattern for the node description (node name), \fIvalue2\fR is port number. + +.TP 10 +nodedetpat:value + +\fIvalue\fR is glob pattern for node details. + +.TP 10 +nodedetpat:value1:port:value2 + +\fIvalue1\fR is the glob pattern for the node details, \fIvalue2\fR is port number. + +.TP 10 +nodetype:value + +\fIvalue\fR is node type (SW or FI). + +.TP 10 +nodetype:value1:port:value2 + +\fIvalue1\fR is node type (SW or FI), \fIvalue2\fR is port number. + +.TP 10 +rate:value + +\fIvalue\fR is string for rate (25g, 50g, 75g, 100g), omits switch mgmt port 0. + +.TP 10 +portstate:value + +\fIvalue\fR is a string for state (down, init, armed, active, notactive, initarmed). + +.TP 10 +portphysstate:value + +\fIvalue\fR is a string for PHYs state (polling, disabled, training, linkup, recovery, offline, test) + +.TP 10 +mtucap:value + +\fIvalue\fR is MTU size (2048, 4096, 8192, 10240), omits switch mgmt port 0. + +.TP 10 +labelpat:value + +\fIvalue\fR is glob pattern for cable label. + +.TP 10 +lengthpat:value + +\fIvalue\fR is glob pattern for cable length. + +.TP 10 +cabledetpat:value + +\fIvalue\fR is glob pattern for cable details. + +.TP 10 +cabinflenpat:value + +\fIvalue\fR is glob pattern for cable info length. + +.TP 10 +cabinfvendnamepat:value + +\fIvalue\fR is glob pattern for cable info vendor name. + +.TP 10 +cabinfvendpnpat:value + +\fIvalue\fR is glob pattern for cable info vendor part number. + +.TP 10 +cabinfvendrevpat:value + +\fIvalue\fR is glob pattern for cable info vendor revision. + +.TP 10 +cabinfvendsnpat:value + +\fIvalue\fR is glob pattern for cable info vendor serial number. + +.TP 10 +cabinftype:value + +\fIvalue\fR is either optical, passive\(ulcopper, active\(ulcopper, or unknown. + +.TP 10 +linkdetpat:value + +\fIvalue\fR is glob pattern for link details. + +.TP 10 +portdetpat:value + +\fIvalue\fR is glob pattern for port details. + +.TP 10 +sm + +Specifies the master subnet manager (SM). + +.TP 10 +smdetpat:value + +\fIvalue\fR is glob pattern for SM details. + +.TP 10 +route:point1:point2 + +Specifies all ports along the routes between the two given points. + +.TP 10 +led:value + +\fIvalue\fR is either on or off for LED port beacon. + +.TP 10 +linkqual:value + +Specifies the ports with a link quality equal to \fIvalue\fR. + +.TP 10 +linkqualLE:value + +Specifies the ports with a link quality less than or equal to \fIvalue\fR. + +.TP 10 +linkqualGE:value + +Specifies the ports with a link quality greater than or equal to \fIvalue\fR. + +.TP 10 +nodepatfile:\fIFILENAME\fR + +Specifies the name of file with the list of nodepats or node descriptions. + +.TP 10 +nodepairpatfile:\fIFILENAME\fR + +Specifies the name of file with the list of node pairs, separated by a colon. + +.TP 10 +ldr + +Specifies the ports with a non-zero link down reason or neighbor link down reason. + +.TP 10 +ldr:\fIvalue\fR + +Specifies the ports with a link down reason or neighbor link down reason equal to \fIvalue\fR. + + +.SH opareport Examples + +.PP +For reference: +.PP +opareport can generate hundreds of different reports. Commonly generated reports include the following: opareport -o comps -d 3 +.br + + opareport -o errors -o slowlinks +.br + + opareport -o nodes -F portguid:0x00117500a000447b +.br + + opareport -o nodes -F nodeguid:0x001175009800447b:port:1 +.br + + opareport -o nodes -F nodeguid:0x001175009800447b +.br + + opareport -o nodes -F \[aq]node:duster hfi1\(ul0\[aq] +.br + + opareport -o nodes -F \[aq]node:duster hfi1\(ul0:port:1\[aq] +.br + + opareport -o nodes -F \[aq]nodepat:d*\[aq] +.br + + opareport -o nodes -F \[aq]nodepat:d*:port:1\[aq] +.br + + opareport -o nodes -F \[aq]nodedetpat:compute*\[aq] +.br + + opareport -o nodes -F \[aq]nodedetpat:compute*:port:1\[aq] +.br + + opareport -o nodes -F nodetype:FI +.br + + opareport -o nodes -F nodetype:FI:port:1 +.br + + opareport -o nodes -F lid:1 +.br + + opareport -o nodes -F led:on + opareport -o nodes -F led:off + opareport -o nodes -F lid:1:node +.br + + opareport -o nodes -F lid:1:port:2 +.br + + opareport -o nodes -F gid:0xfe80000000000000:0x00117500a000447b +.br + + opareport -o nodes -F systemguid:0x001175009800447b +.br + + opareport -o nodes -F systemguid:0x001175009800447b:port:1 +.br + + opareport -o nodes -F iocguid:0x00117501300001e0 +.br + + opareport -o nodes -F iocguid:0x00117501300001e0:port:2 +.br + + opareport -o nodes -F \[aq]ioc:Chassis 0x001175005000010C, Slot 2, IOC 1\[aq] +.br + + opareport -o nodes -F \[aq]ioc:Chassis 0x001175005000010C, Slot 2, IOC 1:port:2\[aq] +.br + + opareport -o nodes -F \[aq]iocpat:*Slot 2*\[aq] +.br + + opareport -o nodes -F \[aq]iocpat:*Slot 2*:port:2\[aq] +.br + + opareport -o nodes -F ioctype:SRP + opareport -o nodes -F ioctype:SRP:port:2 +.br + + opareport -o extlinks -F rate:100g +.br + + opareport -o extlinks -F portstate:armed +.br + + opareport -o extlinks -F portphysstate:linkup +.br + + opareport -o extlinks -F \[aq]labelpat:S1345*\[aq] +.br + + opareport -o extlinks -F \[aq]lengthpat:11m\[aq] +.br + + opareport -o extlinks -F \[aq]cabledetpat:*hitachi*\[aq] +.br + + opareport -o extlinks -F \[aq]linkdetpat:*core ISL*\[aq] +.br + + opareport -o extlinks -F \[aq]portdetpat:*mgmt*\[aq] +.br + + opareport -o links -F mtucap:2048 +.br + + opareport -o nodes -F sm +.br + + opareport -o nodes -F \[aq]smdetpat:primary*\[aq] +.br + + opareport -o nodes -F \[aq]route:node:duster hfi1\(ul0:node:cuda hfi1\(ul0\[aq] +.br + + opareport -o nodes -F \[aq]route:node:duster hfi1\(ul0:port:1:node:cuda hfi1\(ul0:port:2\[aq] +.br + + opareport -o treepathusage -F nodepairpatfile:FILENAME +.br + + opareport -o pathusage -F nodepatfile:FILENAME +.br + + opareport -s -o snapshot > file +.br + + opareport -o topology > topology.xml +.br + + opareport -o errors -X file +.br + + opareport -s --begin "2 days ago" +.br + + opareport -s --begin "12:30" --end "14:00" +.br + + opareport -o linkinfo -x > file +.SH Details + +.PP +For simple fabrics, the Intel(R) Omni-Path Fabric Suite FastFabric Toolset host is connected to a single fabric. By default, the first active port on the FastFabric Toolset host is used to analyze the fabric. +.PP +However, in more complex fabrics, the FastFabric Toolset host may be connected to more than one fabric or subnet. In this case, you can specify the ports or HFIs to use with one of the following methods: +.IP \(bu +On the command line using the -p option. +.IP \(bu +In a file specified using the -t option. +.IP \(bu +Through the environment variables \fBPORTS\fR or \fBPORTS\(ulFILE\fR. +.IP \(bu +Using the ports\(ulfile configuration option in /etc/opa/opafastfabric.conf. +.PP +If the specified port does not exist or is empty, the first active port on the local system is used. In more complex configurations, you must specify the exact ports to use for all fabrics to be analyzed. +.PP +You can specify the topology\(ulinput file to be used with one of the following methods: +.IP \(bu +On the command line using the -T option. +.IP \(bu +In a file specified through the environment variable \fBFF\(ulTOPOLOGY\(ulFILE\fR. +.IP \(bu +Using the ff\(ultopology\(ulfile configuration option in opafastfabric.conf. +.PP +If the specified file does not exist, no topology\(ulinput file is used. Alternately the filename can be specified as NONE to prevent use of an input file. diff --git a/IbaTools/man/oparesolvehfiport.manPage b/IbaTools/man/oparesolvehfiport.manPage index 29cc84d..bd9d53d 100644 --- a/IbaTools/man/oparesolvehfiport.manPage +++ b/IbaTools/man/oparesolvehfiport.manPage @@ -1,107 +1,105 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH oparesolvehfiport 1 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -oparesolvehfiport - -.NL - -.PP - -\fB(Host)\fR -Permits the Intel(R) Omni-Path Fabric Host Software style Intel(R) Omni-Path Host Fabric Interface (HFI) number and port number arguments to be converted to a Host Software style HFI name and physical port number. -.SH Syntax -.NL -oparesolvehfiport [-o \fIoutput\fR] [ \fIhfi\fR] [ \fIport\fR] -.SH Options -.NL - -.TP 10 ---help -.NL -Produces full help text. - -.TP 10 --o \fIoutput\fR -.NL -Specifies the output type. - -.RS -.TP 10 - -.sp -devname -Prints the device name, in the format hfiname:portnum (Default). - -.RE - -.RS -.TP 10 - -.sp -hfinum -Prints the hfi number. - -.RE - -.TP 10 -\fIhfi\fR -.NL -Specifies the HFI, numbered 1..n. Using 0 specifies that the -p port port is a system-wide port number. Default is 0. - -.TP 10 -\fIport\fR -.NL -Specifies the port, numbered 1..n. Using 0 specifies the first active port. Default is 0. - -.IP -The HFI and port permit a variety of selections: -.RS -.TP 10 - -.sp -0 0 -First active port in system. - -.RE - -.RS -.TP 10 - -.sp -\fIx\fR 0 -First active port on HFI \fIx\fR. - -.RE - -.RS -.TP 10 - -.sp -0 \fIy\fR -Port \fIy\fR within system (no matter which ports are active). - -.RE - -.RS -.TP 10 - -.sp -\fIx y\fR -HFI \fIx\fR, port \fIy\fR - -.RE - -.SH Examples -.NL -oparesolvehfiport 0 1 #Output: hfi1\(ul0:1 -.br -oparesolvehfiport -o devname 0 1 #Output: hfi1\(ul0:1 -.br -oparesolvehfiport -o hfinum 0 1 #Output: 1 +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH oparesolvehfiport 1 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +oparesolvehfiport + + +.PP + +\fB(Host)\fR +Permits the Intel(R) Omni-Path Fabric Host Software style Intel(R) Omni-Path Host Fabric Interface (HFI) number and port number arguments to be converted to a Host Software style HFI name and physical port number. +.SH Syntax +oparesolvehfiport [-o \fIoutput\fR] [ \fIhfi\fR] [ \fIport\fR] +.SH Options + +.TP 10 +--help + +Produces full help text. + +.TP 10 +-o \fIoutput\fR + +Specifies the output type. + +.RS +.TP 10 + +.sp +devname +Prints the device name, in the format hfiname:portnum (Default). + +.RE + +.RS +.TP 10 + +.sp +hfinum +Prints the hfi number. + +.RE + +.TP 10 +\fIhfi\fR + +Specifies the HFI, numbered 1..n. Using 0 specifies that the -p port port is a system-wide port number. Default is 0. + +.TP 10 +\fIport\fR + +Specifies the port, numbered 1..n. Using 0 specifies the first active port. Default is 0. + +.IP +The HFI and port permit a variety of selections: +.RS +.TP 10 + +.sp +0 0 +First active port in system. + +.RE + +.RS +.TP 10 + +.sp +\fIx\fR 0 +First active port on HFI \fIx\fR. + +.RE + +.RS +.TP 10 + +.sp +0 \fIy\fR +Port \fIy\fR within system (no matter which ports are active). + +.RE + +.RS +.TP 10 + +.sp +\fIx y\fR +HFI \fIx\fR, port \fIy\fR + +.RE + +.SH Examples +oparesolvehfiport 0 1 #Output: hfi1\(ul0:1 +.br + +oparesolvehfiport -o devname 0 1 #Output: hfi1\(ul0:1 +.br + +oparesolvehfiport -o hfinum 0 1 #Output: 1 diff --git a/IbaTools/man/opasaquery.manPage b/IbaTools/man/opasaquery.manPage index 6895b5b..e4ef4b8 100644 --- a/IbaTools/man/opasaquery.manPage +++ b/IbaTools/man/opasaquery.manPage @@ -1,916 +1,911 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opasaquery 1 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opasaquery - -.NL - -.PP - -\fB(All)\fR -Performs various queries of the subnet manager/subnet agent and provides detailed fabric information. -.PP -opareport and opareports from the Intel(R) Omni-Path Fabric Suite can provide a more powerful tool. In some cases, opasaquery is preferred, especially when dealing with virtual fabrics, service records, and multicast. -.PP -By default, opasaquery uses the first active port on the local system. However, if the node is connected to more than one fabric (for example, a subnet), the Intel(R) Omni-Path Host Fabric Interface (HFI) and port may be specified to select the fabric whose SA is to be queried. -.SH Syntax -.NL -opasaquery [-v [-v] [-v]] [-I] [-h \fIhfi\fR|-b \fIaddr\fR] [-p \fIport\fR] [--timeout] -.br -[-x \fIgid\fR] [-E] [-T \fIssl\(ulparams\fR] [-o \fItype\fR] [-l \fIlid\fR] [-t \fItype\fR] [-s \fIguid\fR] -.br -[-n \fIguid\fR] [-g \fIguid\fR] [-k \fIpkey\fR] [-i \fIvfIndex\fR] [-S \fIserviceId\fR] [-L \fIsl\fR] -.br -[-u \fIgid\fR] [-m \fIgid\fR] [-d \fInodeDescription\fR] [-D \fIdg\(ulname\fR] [-P \[aq]\fIguid guid\fR\[aq]] -.br -[-G \[aq]\fIgid gid\fR\[aq]] [-H \fImask\fR] -.SH Options -.NL - -.TP 10 ---help -.NL -Produces full help text. - -.TP 10 --v/--verbose -.NL -Returns verbose output. A second invocation activates openib debugging, a third invocation activates libibumad debugging. - -.TP 10 --I/--IB -.NL -Issues query in legacy InfiniBand* format. - -.TP 10 --h/--hfi \fIhfi\fR -.NL -Specifies the HFI, numbered 1..n. Using 0 specifies that the -p \fIport\fR port is a system-wide port number. Default is 0. - -.TP 10 --b/--oob \fIaddress\fR -.NL -Specifies Out-of-Band address of node running the FE. Can be either hostname, IPv4, or IPv6 address. Default is "127.0.0.1". - -.TP 10 --p/--port \fIport\fR -.NL -Specifies the port. -.RS - -.IP \(bu -In-band: numbered 1..n. Using 0 specifies first active port. Default is 0. -.IP \(bu -Out-of-band: Port FE is listening on. Default is 3245. - -.RE - - -.TP 10 ---timeout -.NL -Specifies the timeout (wait time for response) in ms. Default is 1000 ms. - -.TP 10 --x/--source-gid \fIsrc\(ulgid\fR -.NL -Specifies the source GID of the local GID (This is required for most Path and Trace Record Queries when Out-of-Band.) - -.TP 10 --E/--feEsm -.NL -Specifies the ESM FE. - -.TP 10 --T/--ssl-params \fIfile\fR -.NL -Specifies the SSL/TLS parameters XML file. Default is /etc/opa/opamgt\(ultls.xml. - -.TP 10 --o \fItype\fR -.NL -Output type for query. Default is node. See -\fIOutput Types\fR -for details. - -.TP 10 --l/--lid \fIlid\fR -.NL -Query a specific LID. - -.TP 10 --t/--type \fInode\(ultype\fR -.NL -Queries by node type. See -\fINode Types\fR -for details. - -.TP 10 --s/--sysguid \fIsystem\(ulimage\(ulguid\fR -.NL -Queries by system image GUID. - -.TP 10 --n/--nodeguid \fInode\(ulguid\fR -.NL -Queries by node GUID. - -.TP 10 --g/--portguid \fIport\(ulguid\fR -.NL -Queries by port GUID. - -.TP 10 --k/--pkey \fIpkey\fR -.NL -Queries a specific PKey. - -.TP 10 --i/--vfindex \fIvfIndex\fR -.NL -Queries a specific vfindex. - -.TP 10 --S/--serviceId \fIserviceId\fR -.NL -Queries a specific service ID. - -.TP 10 --L/--SL \fISL\fR -.NL -Queries by service level. - -.TP 10 --u/--portgid \fIport\(ulgid\fR -.NL -Queries by port GID. See -\fIGIDs\fR -for details. - -.TP 10 --m/--mcgid \fImulticast\(ulgid\fR -.NL -Queries by multicast GID. See -\fIGIDs\fR -for details. - -.TP 10 --d/--desc \fInode\(uldescription\fR -.NL -Queries by node name/description. - -.TP 10 --D/--dgname \fIdg\(ulname\fR -.NL -Queries by device group name/description - -.TP 10 --P/--guidpair \fIguid guid\fR -.NL -Queries by a pair of port GUIDs. - -.TP 10 --G/--gidpair \fIgid gid\fR -.NL -Queries by a pair of GIDs. See -\fIGIDs\fR -for details. - -.NL - -.SH -h and -p options permit a variety of selections: -.NL - -.TP 10 --h 0 -.NL -First active port in system (Default). - -.TP 10 --h 0 -p 0 -.NL -First active port in system. - -.TP 10 --h \fIx\fR -.NL -First active port on HFI \fIx\fR. - -.TP 10 --h \fIx\fR \fI\fR-p 0 -.NL -First active port on HFI \fIx\fR. - -.TP 10 --h 0 -p \fIy\fR -.NL -Port \fIy\fR within system (no matter which ports are active). - -.TP 10 --h \fIx\fR \fI\fR-p \fIy\fR -.NL -HFI \fIx\fR, port \fIy\fR. - -.SH Node Types -.NL - -.TP 10 -fi -.NL -Fabric Interface - -.TP 10 -sw -.NL -Switch - -.SH GIDs -.NL - -.PP -Specifies a 64-bit subnet and 64-bit interface ID in the form: -.PP -subnet:interface -.PP - -.B NOTE: -In the following example, the GID corresponds to a PortGID. In this case, the interface ID coincides with the lower 64-bits of the GUID of the card. The interface ID will be different if the GID is a MGID (that is, multicast GID). See opafm.xml for MGID examples. - -.PP - -.br -0xfe80000000000000:0x00117500a0000380 - -.br - -.SH Output Types -.NL - -.PP -Default is node. -.TP 10 -classportinfo -.NL -Specifies the classportinfo of the SA. - -.TP 10 -systemguid -.NL -Lists the system image GUIDs. - -.TP 10 -nodeguid -.NL -Lists the node GUIDs. - -.TP 10 -portguid -.NL -Lists the port GUIDs. - -.TP 10 -lid -.NL -Lists the LIDs. - -.TP 10 -desc -.NL -Lists the node descriptions/names. - -.TP 10 -path -.NL -Lists the path records. - -.TP 10 -node -.NL -Lists the node records. - -.TP 10 -portinfo -.NL -Lists the port info records. - -.TP 10 -sminfo -.NL -Lists the SM info records. - -.TP 10 -swinfo -.NL -Lists the switch info records. - -.TP 10 -link -.NL -Lists the link records. - -.TP 10 -scsc -.NL -Lists the SC to SC mapping table records. - -.TP 10 -slsc -.NL -Lists the SL to SC mapping table records. - -.TP 10 -scsl -.NL -Lists the SC to SL mapping table records. - -.TP 10 -scvlt -.NL -Lists the SC to VLt table records. - -.TP 10 -scvlr -.NL -Lists the SC to VLr table records. - -.TP 10 -scvlnt -.NL -Lists the SC to VLnt table records. - -.TP 10 -vlarb -.NL -Lists the VL arbitration table records. - -.TP 10 -pkey -.NL -Lists the PKey table records. - -.TP 10 -service -.NL -Lists the service records. - -.TP 10 -mcmember -.NL -Lists the multicast member records. - -.TP 10 -inform -.NL -Lists the inform info records. - -.TP 10 -linfdb -.NL -Lists the switch linear forwarding database (FDB) records. - -.TP 10 -mcfdb -.NL -Lists the switch multicast FDB records. - -.TP 10 -trace -.NL -Lists the trace records. - -.TP 10 -vfinfo -.NL -Lists the vFabrics. - -.TP 10 -vfinfocsv -.NL -Lists the vFabrics in CSV format. - -.TP 10 -vfinfocsv2 -.NL -Lists the vFabrics in CSV format with enums. - -.TP 10 -fabricinfo -.NL -Specifies the summary of fabric devices. - -.TP 10 -quarantine -.NL -Lists the quarantined nodes. - -.TP 10 -conginfo -.NL -Lists the Congestion Info Records. - -.TP 10 -swcongset -.NL -Lists the Switch Congestion Settings. - -.TP 10 -swportcong -.NL -Lists the Switch Port Congestion Settings. - -.TP 10 -hficongset -.NL -Lists the HFI Congestion Settings. - -.TP 10 -hficongcon -.NL -Lists the HFI Congestion Control Settings. - -.TP 10 -bfrctrl -.NL -Lists the buffer control tables. - -.TP 10 -cableinfo -.NL -Lists the Cable Info records. - -.TP 10 -portgroup -.NL -Lists the AR Port Group records. - -.TP 10 -portgroupfdb -.NL -Lists the AR Port Group FWD records. - -.TP 10 -dglist -.NL -Lists the Device Group Names. - -.TP 10 -dgmember -.NL -Lists the Device Group records. - -.TP 10 -dtree -.NL -Lists the Device Tree records. - -.TP 10 -swcost -.NL -Lists the switch cost records. - -.PP -The vfinfocsv and vfinfocsv2 output formats are designed to make it easier to script vfinfo queries. One line is output per vFabric of the form: -.PP - -.br - -.br -name:index:pkey:sl:mtu:rate:optionflag::mcastSl - -.br - -.PP -The only difference between these two formats is how the MTU and rate are output. vfinfocsv outputs MTU and rate in human/text readable format. vfinfocsv2 outputs MTU and rate as enumerations defined for the SMA protocol. The opagetvf command is based on this capability of opasaquery. For more information, see -\fIopagetvf\fR -. -.SH Example -.NL -opasaquery -o desc -t fi -.SH Input Options vs. Output Permitted -.NL - -.PP -The following list shows the input (assorted query by options) and outputs (-o) that are permitted. -.TP 10 -None -.NL - -.RS -.TP 10 - -.sp --o output permitted -systemguid, nodeguid, portguid, lid, desc, path, node, portinfo, sminfo, swinfo, link, vlarb, pkey, service, mcmember, inform, linfdb, mcfdb, vfinfo, vfinfocsv, vfinfocsv2, scsc, slsc, scvlt, scnlmt, linfdb, classportinfo, fabricinfo, quarantine, conginfo, swcongset, swportcong, hficongset, hficongcon, bfrctl, cableinfo, portgroup, portgroupfdb, dglist, dgmember, dtree - -.RE - -.RS -.TP 10 - -.sp --o output not permitted -trace - -.RE - - -.TP 10 --t \fInode\(ultype\fR -.NL - -.RS -.TP 10 - -.sp --o output permitted -systemguid, nodeguid, portguid, lid, desc, node, dglist, dgmember, dtree - -.RE - -.RS -.TP 10 - -.sp --o output not permitted -portinfo, sminfo, swinfo, vlarb, pkey, service, mcmember, inform, linfdb, mcfdb, trace, vfinfo, vfinfocsv, vfinfocsv2 - -.RE - - -.TP 10 --l \fIlid\fR -.NL - -.RS -.TP 10 - -.sp --o output permitted -systemguid, nodeguid, portguid, lid, desc, path, node, portinfo, swinfo, slvl, vlarb, pkey, mcmember, linfdb, mcfdb, dgmember, dtree - -.RE - -.RS -.TP 10 - -.sp --o output not permitted -sminfo, link, inform, service, trace, vfinfo, vfinfocsv, vfinfocsv2, dglist - -.RE - - -.TP 10 --k \fIpkey\fR -.NL - -.RS -.TP 10 - -.sp --o output permitted -mcmember, path, vfinfo, vfinfocsv, vfinfocsv2 - -.RE - -.RS -.TP 10 - -.sp --o output not permitted -systemimageguid, nodeguid, portguid, lid, desc, node, portinfo, sminfo, swinfo, link, vlarb, pkey, service, mcmember, inform, linfdb, mcfdb, dglist, dgmember, dtree - -.RE - - -.TP 10 --i -\fIvfindex\fR - - -.NL - -.RS -.TP 10 - -.sp --o output permitted -vfinfo, vfinfocsv, vfinfocsv2 - -.RE - -.RS -.TP 10 - -.sp --o output not permitted -systemimageguid, nodeguid, portguid, lid, desc, node, portinfo, sminfo, swinfo, link, vlarb, pkey, service, mcmember, inform, linfdb, mcfdb, dglist, dgmember, dtree - -.RE - - -.TP 10 --s \fIsystem\(ulimage\(ulguid\fR -.NL - -.RS -.TP 10 - -.sp --o output permitted -systemguid, nodeguid, portguid, lid, desc, node - -.RE - -.RS -.TP 10 - -.sp --o output not permitted -portinfo, sminfo, swinfo, link, vlarb, pkey, service, mcmember, inform, linfdb, mcfdb, trace, vfinfo, vfinfocsv, vfinfocsv2, dglist, dgmember, dtree - -.RE - - -.TP 10 --n \fInode\(ulguid\fR -.NL - -.RS -.TP 10 - -.sp --o output permitted -systemguid, nodeguid, portguid, lid, desc, node - -.RE - -.RS -.TP 10 - -.sp --o output not permitted -portinfo, sminfo, swinfo, link, vlarb, pkey, service, mcmember, inform, linfdb, mcfdb, trace, vfinfo, vfinfocsv, vfinfocsv2, dglist, dgmember, dtree - -.RE - - -.TP 10 --g \fIport\(ulguid\fR -.NL - -.RS -.TP 10 - -.sp --o output permitted -systemguid, nodeguid, portguid, lid, desc, path, node, trace, dgmember - -.RE - -.RS -.TP 10 - -.sp --o output not permitted -portinfo, sminfo, swinfo, link, vlarb, pkey, linfdb, mcfdb, vfinfo, vfinfocsv, vfinfocsv2, dglist, dtree, service, mcmember, inform - -.RE - - -.TP 10 --u \fIport\(ulgid\fR -.NL - -.RS -.TP 10 - -.sp --o output permitted -path, service, mcmember, inform, trace - -.RE - -.RS -.TP 10 - -.sp --o output not permitted -systemguid, nodeguid, portguid, lid, desc, node, portinfo, sminfo, swinfo, link, vlarb, pkey, linfdb, mcfdb, vfinfo, vfinfocsv, vfinfocsv2, dglist, dgmember, dtree - -.RE - - -.TP 10 --m \fImulticast\(ulgid\fR -.NL - -.RS -.TP 10 - -.sp --o output permitted -mcmember, vfinfo, vfinfocsv, vfinfocsv2 - -.RE - -.RS -.TP 10 - -.sp --o output not permitted -systemguid, nodeguid, portguid, lid, desc, path, node, portinfo, sminfo, swinfo, link, vlarb, pkey, service, inform, linfdb, mcfdb, trace, dglist, dgmember, dtree - -.RE - - -.TP 10 --d \fInode\(uldescription\fR -.NL - -.RS -.TP 10 - -.sp --o output permitted -systemguid, nodeguid, portguid, lid, desc, node, dgmember - -.RE - -.RS -.TP 10 - -.sp --o output not permitted -trace, dglist, dtree - -.RE - - -.TP 10 --D \fIdg\(ulname\fR -.NL - -.RS -.TP 10 - -.sp --o output permitted -dgmember - -.RE - -.RS -.TP 10 - -.sp --o output not permitted -systemguid, nodeguid, portguid, lid, desc, path, node, portinfo, sminfo, swinfo, link, vlarb, pkey, service, inform, linfdb, mcfdb, trace, dglist, dtree - -.RE - - -.TP 10 --P \fIport\(ulguid\(ulpair\fR -.NL - -.RS -.TP 10 - -.sp --o output permitted -path, trace - -.RE - -.RS -.TP 10 - -.sp --o output not permitted -systemguid, nodeguid, portguid, lid, desc, node, portinfo, sminfo, swinfo, link, vlarb, pkey, service, mcmember, inform, linfdb, mcfdb, dglist, dgmember, dtree - -.RE - - -.TP 10 --S \fIserviceId\fR -.NL - -.RS -.TP 10 - -.sp --o output permitted -path, vfinfo, vfinfocsv, vfinfocsv2, service - -.RE - -.RS -.TP 10 - -.sp --o output not permitted -systemimageguid, nodeguid, portguid, lid, desc, node, portinfo, sminfo, swinfo, link, vlarb, pkey, mcmember, inform, linfdb, mcfdb, dglist, dgmember, dtree - -.RE - - -.TP 10 --L \fISL\fR -.NL - -.RS -.TP 10 - -.sp --o output permitted -path, vfinfo, vfinfocsv, vfinfocsv2 - -.RE - -.RS -.TP 10 - -.sp --o output not permitted -systemimageguid, nodeguid, portguid, lid, desc, node, portinfo, sminfo, swinfo, link, vlarb, pkey, service, mcmember, inform, linfdb, mcfdb, dglist, dgmember, dtree - -.RE - - -.TP 10 --G \fIgid\(ulpair\fR -.NL - -.RS -.TP 10 - -.sp --o output permitted -path, trace - -.RE - -.RS -.TP 10 - -.sp --o output not permitted -systemguid, nodeguid, portguid, lid, desc, node, portinfo, sminfo, swinfo, link, vlarb, pkey, service, mcmember, inform, linfdb, mcfdb, dglist, dgmember, dtree - -.RE - - -.TP 10 --a \fIport\(ulguid\(ullist\fR -.NL - -.RS -.TP 10 - -.sp --o output permitted -path - -.RE - -.RS -.TP 10 - -.sp --o output not permitted -systemguid, nodeguid, portguid, lid, desc, node, portinfo, sminfo, swinfo, link, vlarb, pkey, service, mcmember, inform, linfdb, mcfdb, trace, dglist, dgmember, dtree - -.RE - - -.TP 10 --A \fIgid\(ullist\fR -.NL - -.RS -.TP 10 - -.sp --o output permitted -path - -.RE - -.RS -.TP 10 - -.sp --o output not permitted -systemguid, nodeguid, portguid, lid, desc, node, portinfo, sminfo, swinfo, link, vlarb, pkey, service, mcmember, inform, linfdb, mcfdb, trace, dglist, dgmember, dtree - -.RE - +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opasaquery 1 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opasaquery + + +.PP + +\fB(All)\fR +Performs various queries of the subnet manager/subnet agent and provides detailed fabric information. +.PP +opareport and opareports from the Intel(R) Omni-Path Fabric Suite can provide a more powerful tool. In some cases, opasaquery is preferred, especially when dealing with virtual fabrics, service records, and multicast. +.PP +By default, opasaquery uses the first active port on the local system. However, if the node is connected to more than one fabric (for example, a subnet), the Intel(R) Omni-Path Host Fabric Interface (HFI) and port may be specified to select the fabric whose SA is to be queried. +.SH Syntax +opasaquery [-v [-v] [-v]] [-I] [-h \fIhfi\fR|-b \fIaddr\fR] [-p \fIport\fR] [--timeout] +.br +[-x \fIgid\fR] [-E] +[-T \fIssl\(ulparams\fR] [-o \fItype\fR] [-l \fIlid\fR] [-t \fItype\fR] [-s \fIguid\fR] +.br +[-n \fIguid\fR] +[-g \fIguid\fR] [-k \fIpkey\fR] [-i \fIvfIndex\fR] [-S \fIserviceId\fR] [-L \fIsl\fR] +.br +[-u \fIgid\fR] +[-m \fIgid\fR] [-d \fInodeDescription\fR] [-D \fIdg\(ulname\fR] [-P \[aq]\fIguid guid\fR\[aq]] +.br +[-G \[aq]\fIgid gid\fR\[aq]] +[-H \fImask\fR] +.SH Options + +.TP 10 +--help + +Produces full help text. + +.TP 10 +-v/--verbose + +Returns verbose output. A second invocation activates openib debugging, a third invocation activates libibumad debugging. + +.TP 10 +-I/--IB + +Issues query in legacy InfiniBand* format. + +.TP 10 +-h/--hfi \fIhfi\fR + +Specifies the HFI, numbered 1..n. Using 0 specifies that the -p \fIport\fR port is a system-wide port number. Default is 0. + +.TP 10 +-b/--oob \fIaddress\fR + +Specifies Out-of-Band address of node running the FE. Can be either hostname, IPv4, or IPv6 address. Default is "127.0.0.1". + +.TP 10 +-p/--port \fIport\fR + +Specifies the port. +.RS + +.IP \(bu +In-band: numbered 1..n. Using 0 specifies first active port. Default is 0. +.IP \(bu +Out-of-band: Port FE is listening on. Default is 3245. + +.RE + + +.TP 10 +--timeout + +Specifies the timeout (wait time for response) in ms. Default is 1000 ms. + +.TP 10 +-x/--source-gid \fIsrc\(ulgid\fR + +Specifies the source GID of the local GID (This is required for most Path and Trace Record Queries when Out-of-Band.) + +.TP 10 +-E/--feEsm + +Specifies the ESM FE. + +.TP 10 +-T/--ssl-params \fIfile\fR + +Specifies the SSL/TLS parameters XML file. Default is /etc/opa/opamgt\(ultls.xml. + +.TP 10 +-o \fItype\fR + +Output type for query. Default is node. See +\fIOutput Types\fR +for details. + +.TP 10 +-l/--lid \fIlid\fR + +Query a specific LID. + +.TP 10 +-t/--type \fInode\(ultype\fR + +Queries by node type. See +\fINode Types\fR +for details. + +.TP 10 +-s/--sysguid \fIsystem\(ulimage\(ulguid\fR + +Queries by system image GUID. + +.TP 10 +-n/--nodeguid \fInode\(ulguid\fR + +Queries by node GUID. + +.TP 10 +-g/--portguid \fIport\(ulguid\fR + +Queries by port GUID. + +.TP 10 +-k/--pkey \fIpkey\fR + +Queries a specific PKey. + +.TP 10 +-i/--vfindex \fIvfIndex\fR + +Queries a specific vfindex. + +.TP 10 +-S/--serviceId \fIserviceId\fR + +Queries a specific service ID. + +.TP 10 +-L/--SL \fISL\fR + +Queries by service level. + +.TP 10 +-u/--portgid \fIport\(ulgid\fR + +Queries by port GID. See +\fIGIDs\fR +for details. + +.TP 10 +-m/--mcgid \fImulticast\(ulgid\fR + +Queries by multicast GID. See +\fIGIDs\fR +for details. + +.TP 10 +-d/--desc \fInode\(uldescription\fR + +Queries by node name/description. + +.TP 10 +-D/--dgname \fIdg\(ulname\fR + +Queries by device group name/description + +.TP 10 +-P/--guidpair \fIguid guid\fR + +Queries by a pair of port GUIDs. + +.TP 10 +-G/--gidpair \fIgid gid\fR + +Queries by a pair of GIDs. See +\fIGIDs\fR +for details. + + +.SH -h and -p options permit a variety of selections: + +.TP 10 +-h 0 + +First active port in system (Default). + +.TP 10 +-h 0 -p 0 + +First active port in system. + +.TP 10 +-h \fIx\fR + +First active port on HFI \fIx\fR. + +.TP 10 +-h \fIx\fR \fI\fR-p 0 + +First active port on HFI \fIx\fR. + +.TP 10 +-h 0 -p \fIy\fR + +Port \fIy\fR within system (no matter which ports are active). + +.TP 10 +-h \fIx\fR \fI\fR-p \fIy\fR + +HFI \fIx\fR, port \fIy\fR. + +.SH Node Types + +.TP 10 +fi + +Fabric Interface + +.TP 10 +sw + +Switch + +.SH GIDs + +.PP +Specifies a 64-bit subnet and 64-bit interface ID in the form: +.PP +subnet:interface +.PP + +.B NOTE: +In the following example, the GID corresponds to a PortGID. In this case, the interface ID coincides with the lower 64-bits of the GUID of the card. The interface ID will be different if the GID is a MGID (that is, multicast GID). See opafm.xml for MGID examples. + +.PP + +.br +0xfe80000000000000:0x00117500a0000380 + +.br + +.SH Output Types + +.PP +Default is node. +.TP 10 +classportinfo + +Specifies the classportinfo of the SA. + +.TP 10 +systemguid + +Lists the system image GUIDs. + +.TP 10 +nodeguid + +Lists the node GUIDs. + +.TP 10 +portguid + +Lists the port GUIDs. + +.TP 10 +lid + +Lists the LIDs. + +.TP 10 +desc + +Lists the node descriptions/names. + +.TP 10 +path + +Lists the path records. + +.TP 10 +node + +Lists the node records. + +.TP 10 +portinfo + +Lists the port info records. + +.TP 10 +sminfo + +Lists the SM info records. + +.TP 10 +swinfo + +Lists the switch info records. + +.TP 10 +link + +Lists the link records. + +.TP 10 +scsc + +Lists the SC to SC mapping table records. + +.TP 10 +slsc + +Lists the SL to SC mapping table records. + +.TP 10 +scsl + +Lists the SC to SL mapping table records. + +.TP 10 +scvlt + +Lists the SC to VLt table records. + +.TP 10 +scvlr + +Lists the SC to VLr table records. + +.TP 10 +scvlnt + +Lists the SC to VLnt table records. + +.TP 10 +vlarb + +Lists the VL arbitration table records. + +.TP 10 +pkey + +Lists the PKey table records. + +.TP 10 +service + +Lists the service records. + +.TP 10 +mcmember + +Lists the multicast member records. + +.TP 10 +inform + +Lists the inform info records. + +.TP 10 +linfdb + +Lists the switch linear forwarding database (FDB) records. + +.TP 10 +mcfdb + +Lists the switch multicast FDB records. + +.TP 10 +trace + +Lists the trace records. + +.TP 10 +vfinfo + +Lists the vFabrics. + +.TP 10 +vfinfocsv + +Lists the vFabrics in CSV format. + +.TP 10 +vfinfocsv2 + +Lists the vFabrics in CSV format with enums. + +.TP 10 +fabricinfo + +Specifies the summary of fabric devices. + +.TP 10 +quarantine + +Lists the quarantined nodes. + +.TP 10 +conginfo + +Lists the Congestion Info Records. + +.TP 10 +swcongset + +Lists the Switch Congestion Settings. + +.TP 10 +swportcong + +Lists the Switch Port Congestion Settings. + +.TP 10 +hficongset + +Lists the HFI Congestion Settings. + +.TP 10 +hficongcon + +Lists the HFI Congestion Control Settings. + +.TP 10 +bfrctrl + +Lists the buffer control tables. + +.TP 10 +cableinfo + +Lists the Cable Info records. + +.TP 10 +portgroup + +Lists the AR Port Group records. + +.TP 10 +portgroupfdb + +Lists the AR Port Group FWD records. + +.TP 10 +dglist + +Lists the Device Group Names. + +.TP 10 +dgmember + +Lists the Device Group records. + +.TP 10 +dtree + +Lists the Device Tree records. + +.TP 10 +swcost + +Lists the switch cost records. + +.PP +The vfinfocsv and vfinfocsv2 output formats are designed to make it easier to script vfinfo queries. One line is output per vFabric of the form: +.PP + +.br + +.br +name:index:pkey:sl:mtu:rate:optionflag::mcastSl + +.br + +.PP +The only difference between these two formats is how the MTU and rate are output. vfinfocsv outputs MTU and rate in human/text readable format. vfinfocsv2 outputs MTU and rate as enumerations defined for the SMA protocol. The opagetvf command is based on this capability of opasaquery. For more information, see +\fIopagetvf\fR +. +.SH Example +opasaquery -o desc -t fi + +.SH Input Options vs. Output Permitted + +.PP +The following list shows the input (assorted query by options) and outputs (-o) that are permitted. +.TP 10 +None + + +.RS +.TP 10 + +.sp +-o output permitted +systemguid, nodeguid, portguid, lid, desc, path, node, portinfo, sminfo, swinfo, link, vlarb, pkey, service, mcmember, inform, linfdb, mcfdb, vfinfo, vfinfocsv, vfinfocsv2, scsc, slsc, scvlt, scnlmt, linfdb, classportinfo, fabricinfo, quarantine, conginfo, swcongset, swportcong, hficongset, hficongcon, bfrctl, cableinfo, portgroup, portgroupfdb, dglist, dgmember, dtree + +.RE + +.RS +.TP 10 + +.sp +-o output not permitted +trace + +.RE + + +.TP 10 +-t \fInode\(ultype\fR + + +.RS +.TP 10 + +.sp +-o output permitted +systemguid, nodeguid, portguid, lid, desc, node, dglist, dgmember, dtree + +.RE + +.RS +.TP 10 + +.sp +-o output not permitted +portinfo, sminfo, swinfo, vlarb, pkey, service, mcmember, inform, linfdb, mcfdb, trace, vfinfo, vfinfocsv, vfinfocsv2 + +.RE + + +.TP 10 +-l \fIlid\fR + + +.RS +.TP 10 + +.sp +-o output permitted +systemguid, nodeguid, portguid, lid, desc, path, node, portinfo, swinfo, slvl, vlarb, pkey, mcmember, linfdb, mcfdb, dgmember, dtree + +.RE + +.RS +.TP 10 + +.sp +-o output not permitted +sminfo, link, inform, service, trace, vfinfo, vfinfocsv, vfinfocsv2, dglist + +.RE + + +.TP 10 +-k \fIpkey\fR + + +.RS +.TP 10 + +.sp +-o output permitted +mcmember, path, vfinfo, vfinfocsv, vfinfocsv2 + +.RE + +.RS +.TP 10 + +.sp +-o output not permitted +systemimageguid, nodeguid, portguid, lid, desc, node, portinfo, sminfo, swinfo, link, vlarb, pkey, service, mcmember, inform, linfdb, mcfdb, dglist, dgmember, dtree + +.RE + + +.TP 10 +-i +\fIvfindex\fR + + + + +.RS +.TP 10 + +.sp +-o output permitted +vfinfo, vfinfocsv, vfinfocsv2 + +.RE + +.RS +.TP 10 + +.sp +-o output not permitted +systemimageguid, nodeguid, portguid, lid, desc, node, portinfo, sminfo, swinfo, link, vlarb, pkey, service, mcmember, inform, linfdb, mcfdb, dglist, dgmember, dtree + +.RE + + +.TP 10 +-s \fIsystem\(ulimage\(ulguid\fR + + +.RS +.TP 10 + +.sp +-o output permitted +systemguid, nodeguid, portguid, lid, desc, node + +.RE + +.RS +.TP 10 + +.sp +-o output not permitted +portinfo, sminfo, swinfo, link, vlarb, pkey, service, mcmember, inform, linfdb, mcfdb, trace, vfinfo, vfinfocsv, vfinfocsv2, dglist, dgmember, dtree + +.RE + + +.TP 10 +-n \fInode\(ulguid\fR + + +.RS +.TP 10 + +.sp +-o output permitted +systemguid, nodeguid, portguid, lid, desc, node + +.RE + +.RS +.TP 10 + +.sp +-o output not permitted +portinfo, sminfo, swinfo, link, vlarb, pkey, service, mcmember, inform, linfdb, mcfdb, trace, vfinfo, vfinfocsv, vfinfocsv2, dglist, dgmember, dtree + +.RE + + +.TP 10 +-g \fIport\(ulguid\fR + + +.RS +.TP 10 + +.sp +-o output permitted +systemguid, nodeguid, portguid, lid, desc, path, node, trace, dgmember + +.RE + +.RS +.TP 10 + +.sp +-o output not permitted +portinfo, sminfo, swinfo, link, vlarb, pkey, linfdb, mcfdb, vfinfo, vfinfocsv, vfinfocsv2, dglist, dtree, service, mcmember, inform + +.RE + + +.TP 10 +-u \fIport\(ulgid\fR + + +.RS +.TP 10 + +.sp +-o output permitted +path, service, mcmember, inform, trace + +.RE + +.RS +.TP 10 + +.sp +-o output not permitted +systemguid, nodeguid, portguid, lid, desc, node, portinfo, sminfo, swinfo, link, vlarb, pkey, linfdb, mcfdb, vfinfo, vfinfocsv, vfinfocsv2, dglist, dgmember, dtree + +.RE + + +.TP 10 +-m \fImulticast\(ulgid\fR + + +.RS +.TP 10 + +.sp +-o output permitted +mcmember, vfinfo, vfinfocsv, vfinfocsv2 + +.RE + +.RS +.TP 10 + +.sp +-o output not permitted +systemguid, nodeguid, portguid, lid, desc, path, node, portinfo, sminfo, swinfo, link, vlarb, pkey, service, inform, linfdb, mcfdb, trace, dglist, dgmember, dtree + +.RE + + +.TP 10 +-d \fInode\(uldescription\fR + + +.RS +.TP 10 + +.sp +-o output permitted +systemguid, nodeguid, portguid, lid, desc, node, dgmember + +.RE + +.RS +.TP 10 + +.sp +-o output not permitted +trace, dglist, dtree + +.RE + + +.TP 10 +-D \fIdg\(ulname\fR + + +.RS +.TP 10 + +.sp +-o output permitted +dgmember + +.RE + +.RS +.TP 10 + +.sp +-o output not permitted +systemguid, nodeguid, portguid, lid, desc, path, node, portinfo, sminfo, swinfo, link, vlarb, pkey, service, inform, linfdb, mcfdb, trace, dglist, dtree + +.RE + + +.TP 10 +-P \fIport\(ulguid\(ulpair\fR + + +.RS +.TP 10 + +.sp +-o output permitted +path, trace + +.RE + +.RS +.TP 10 + +.sp +-o output not permitted +systemguid, nodeguid, portguid, lid, desc, node, portinfo, sminfo, swinfo, link, vlarb, pkey, service, mcmember, inform, linfdb, mcfdb, dglist, dgmember, dtree + +.RE + + +.TP 10 +-S \fIserviceId\fR + + +.RS +.TP 10 + +.sp +-o output permitted +path, vfinfo, vfinfocsv, vfinfocsv2, service + +.RE + +.RS +.TP 10 + +.sp +-o output not permitted +systemimageguid, nodeguid, portguid, lid, desc, node, portinfo, sminfo, swinfo, link, vlarb, pkey, mcmember, inform, linfdb, mcfdb, dglist, dgmember, dtree + +.RE + + +.TP 10 +-L \fISL\fR + + +.RS +.TP 10 + +.sp +-o output permitted +path, vfinfo, vfinfocsv, vfinfocsv2 + +.RE + +.RS +.TP 10 + +.sp +-o output not permitted +systemimageguid, nodeguid, portguid, lid, desc, node, portinfo, sminfo, swinfo, link, vlarb, pkey, service, mcmember, inform, linfdb, mcfdb, dglist, dgmember, dtree + +.RE + + +.TP 10 +-G \fIgid\(ulpair\fR + + +.RS +.TP 10 + +.sp +-o output permitted +path, trace + +.RE + +.RS +.TP 10 + +.sp +-o output not permitted +systemguid, nodeguid, portguid, lid, desc, node, portinfo, sminfo, swinfo, link, vlarb, pkey, service, mcmember, inform, linfdb, mcfdb, dglist, dgmember, dtree + +.RE + + +.TP 10 +-a \fIport\(ulguid\(ullist\fR + + +.RS +.TP 10 + +.sp +-o output permitted +path + +.RE + +.RS +.TP 10 + +.sp +-o output not permitted +systemguid, nodeguid, portguid, lid, desc, node, portinfo, sminfo, swinfo, link, vlarb, pkey, service, mcmember, inform, linfdb, mcfdb, trace, dglist, dgmember, dtree + +.RE + + +.TP 10 +-A \fIgid\(ullist\fR + + +.RS +.TP 10 + +.sp +-o output permitted +path + +.RE + +.RS +.TP 10 + +.sp +-o output not permitted +systemguid, nodeguid, portguid, lid, desc, node, portinfo, sminfo, swinfo, link, vlarb, pkey, service, mcmember, inform, linfdb, mcfdb, trace, dglist, dgmember, dtree + +.RE + diff --git a/IbaTools/man/opascpall.manPage b/IbaTools/man/opascpall.manPage index c1beb3f..c412f96 100644 --- a/IbaTools/man/opascpall.manPage +++ b/IbaTools/man/opascpall.manPage @@ -1,135 +1,138 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opascpall 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opascpall - -.NL - -.PP - -\fB(Linux)\fR -Copies files or directories from the current system to multiple hosts in the fabric. When copying large directory trees, use the -t option to improve performance. This option tars and compresses the tree, transfers the resulting compressed tarball to each node, and untars it on each node. -.PP -Use this tool for copying data files, operating system files, or applications to all the hosts (or a subset of hosts) within the fabric. -.PP - -.B NOTE: - -.IP \(bu -This tool can only copy from this system to a group of systems in the cluster. To copy from hosts in the cluster to this host, use opauploadall. -.IP \(bu -user@ style syntax cannot be used when specifying filenames. - -.SH Syntax -.NL - -.PP - -.br -opascpall [-p] [-r] [-f \fIhostfile\fR] [-h \[aq]\fIhosts\fR\[aq]] [-u \fIuser\fR] -.br -source\(ulfile ... dest\(ulfile - -.br - -.PP - -.br -opascpall [-t] [-p] [-f \fIhostfile\fR] [-h \[aq]\fIhosts\fR\[aq]] [-u \fIuser\fR] -.br -[ \fIsource\(uldir\fR[ \fIdest\(uldir\fR]] - -.br - -.SH Options -.NL - -.TP 10 ---help -.NL -Produces full help text. -.TP 10 --p -.NL -Performs copy in parallel on all hosts. -.TP 10 --r -.NL -Performs recursive copy of directories. -.TP 10 --t -.NL -Performs optimized recursive copy of directories using tar. \fIdest\(uldir\fR is optional. If \fIdest\(uldir\fR is not specified, it defaults to the current directory name. If both \fIsource\(uldir\fR and \fIdest\(uldir\fR are omitted, they both default to the current directory name. - -.TP 10 --h \fIhosts\fR -.NL -Specifies the list of hosts to copy to. -.TP 10 --f \fIhostfile\fR -.NL -Specifies the file with hosts in cluster. Default is /etc/opa/hosts file. -.TP 10 --u \fIuser\fR -.NL -Specifies the user to perform copy to. Default is current user code. -.TP 10 -\fIsource\(ulfile\fR -.NL -Specifies the a file or list of source files to copy. - -.TP 10 -\fIsource\(uldir\fR -.NL -Specifies the name of the source directory to copy. If omitted. is used. - -.TP 10 -\fIdest\(ulfile\fR or \fIdest\(uldir\fR -.NL -Specifies the name of the destination file or directory to copy to. If more than one source file, this must be a directory. If omitted current directory name is used. - -.SH Example -.NL -# efficiently copy an entire directory tree -.br -opascpall -t -p /usr/src/opa/mpi\(ulapps /usr/src/opa/mpi\(ulapps -.br - -.br -# copy a group of files -.br -opascpall a b c /root/tools/ -.br - -.br -# copy to an explitly specified set of hosts -.br -opascpall -h \[aq]arwen elrond\[aq] a b c /root/tools -.br -HOSTS=\[aq]arwen elrond\[aq] opascpall a b c /root/tools -.SH Environment Variables -.NL - -.PP -The following environment variables are also used by this command: -.TP 10 -\fBHOSTS\fR -.NL -List of hosts; used if -h option not supplied. - -.TP 10 -\fBHOSTS\(ulFILE\fR -.NL -File containing list of hosts; used in absence of -f and -h. - -.TP 10 -\fBFF\(ulMAX\(ulPARALLEL\fR -.NL -When the -p option is used, maximum concurrent operations are performed. +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opascpall 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opascpall + + +.PP + +\fB(Linux)\fR +Copies files or directories from the current system to multiple hosts in the fabric. When copying large directory trees, use the -t option to improve performance. This option tars and compresses the tree, transfers the resulting compressed tarball to each node, and untars it on each node. +.PP +Use this tool for copying data files, operating system files, or applications to all the hosts (or a subset of hosts) within the fabric. +.PP + +.B NOTE: + +.IP \(bu +This tool can only copy from this system to a group of systems in the cluster. To copy from hosts in the cluster to this host, use opauploadall. +.IP \(bu +user@ style syntax cannot be used when specifying filenames. + +.SH Syntax + +.PP + +.br +opascpall [-p] [-r] [-f \fIhostfile\fR] [-h \[aq]\fIhosts\fR\[aq]] [-u \fIuser\fR] +.br +source\(ulfile ... dest\(ulfile + +.br + +.PP + +.br +opascpall [-t] [-p] [-f \fIhostfile\fR] [-h \[aq]\fIhosts\fR\[aq]] [-u \fIuser\fR] +.br +[ \fIsource\(uldir\fR [ \fIdest\(uldir\fR]] + +.br + +.SH Options + +.TP 10 +--help + +Produces full help text. +.TP 10 +-p + +Performs copy in parallel on all hosts. +.TP 10 +-r + +Performs recursive copy of directories. +.TP 10 +-t + +Performs optimized recursive copy of directories using tar. \fIdest\(uldir\fR is optional. If \fIdest\(uldir\fR is not specified, it defaults to the current directory name. If both \fIsource\(uldir\fR and \fIdest\(uldir\fR are omitted, they both default to the current directory name. + +.TP 10 +-h \fIhosts\fR + +Specifies the list of hosts to copy to. +.TP 10 +-f \fIhostfile\fR + +Specifies the file with hosts in cluster. Default is /etc/opa/hosts file. +.TP 10 +-u \fIuser\fR + +Specifies the user to perform copy to. Default is current user code. +.TP 10 +\fIsource\(ulfile\fR + +Specifies the a file or list of source files to copy. + +.TP 10 +\fIsource\(uldir\fR + +Specifies the name of the source directory to copy. If omitted. is used. + +.TP 10 +\fIdest\(ulfile\fR or \fIdest\(uldir\fR + +Specifies the name of the destination file or directory to copy to. If more than one source file, this must be a directory. If omitted current directory name is used. + +.SH Example +# efficiently copy an entire directory tree +.br + +opascpall -t -p /usr/src/opa/mpi\(ulapps /usr/src/opa/mpi\(ulapps +.br + + +.br + +# copy a group of files +.br + +opascpall a b c /root/tools/ +.br + + +.br + +# copy to an explitly specified set of hosts +.br + +opascpall -h \[aq]arwen elrond\[aq] a b c /root/tools +.br + +HOSTS=\[aq]arwen elrond\[aq] opascpall a b c /root/tools +.SH Environment Variables + +.PP +The following environment variables are also used by this command: +.TP 10 +\fBHOSTS\fR + +List of hosts; used if -h option not supplied. + +.TP 10 +\fBHOSTS\(ulFILE\fR + +File containing list of hosts; used in absence of -f and -h. + +.TP 10 +\fBFF\(ulMAX\(ulPARALLEL\fR + +When the -p option is used, maximum concurrent operations are performed. diff --git a/IbaTools/man/opasetupssh.manPage b/IbaTools/man/opasetupssh.manPage index 51a092d..efb6edb 100644 --- a/IbaTools/man/opasetupssh.manPage +++ b/IbaTools/man/opasetupssh.manPage @@ -1,215 +1,207 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opasetupssh 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opasetupssh - -.NL - -.PP - -\fB(Linux or Switch)\fR -Creates SSH keys and configures them on all hosts or chassis so the system can use SSH and SCP into all other hosts or chassis without a password prompt. Typically, during cluster setup this tool enables the root user on the Management Node to log into the other hosts (as root) or chassis (as admin) using password-less SSH. -.SH Syntax -.NL -opasetupssh [-C|p|U] [-f \fIhostfile\fR] [-F \fIchassisfile\fR] [-h \[aq]\fIhosts\fR\[aq]] -.br -[-H \[aq]\fIchassis\fR\[aq]] [-i \fIipoib\(ulsuffix\fR] [-u \fIuser\fR] [-S] [-R|P] -.SH Options -.NL - -.TP 10 ---help -.NL -Produces full help text. - -.TP 10 --C -.NL -Performs operation against chassis. Default is hosts. - -.TP 10 --p -.NL -Performs operation against all chassis or hosts in parallel. - -.TP 10 --U -.NL -Performs connect only (to enter in local hosts, known hosts). When run in this mode, the -S option is ignored. - -.TP 10 --f \fIhostfile\fR -.NL -Specifies the file with hosts in cluster. -.br -Default is /etc/opa/hosts file. - -.TP 10 --F \fIchassisfile\fR -.NL -Specifies the file with chassis in cluster. -.br -Default is /etc/opa/chassis file. - -.TP 10 --h \fIhosts\fR -.NL -Specifies the list of hosts to set up. - -.TP 10 --H \fIchassis\fR -.NL -Specifies the list of chassis to set up. - -.TP 10 --i \fIipoib\(ulsuffix\fR -.NL -Specifies the suffix to apply to host names to create IPoIB host names. Default is -opa. - -.TP 10 --u \fIuser\fR -.NL -Specifies the user on remote system to allow this user to SSH to. Default is current user code for host(s) and admin for chassis. - -.TP 10 --S -.NL -Securely prompts for password for user on remote system. - -.TP 10 --R -.NL -Skips setup of SSH to local host. - -.TP 10 --P -.NL -Skips ping of host (for SSH to devices on Internet with ping -.br -firewalled). - -.SH Examples -.NL - -.NL - -.SH Operations on Hosts -.NL -opasetupssh -S -i \[aq]\[aq] -.br -opasetupssh -U -.br -opasetupssh -h \[aq]arwen elrond\[aq] -U -.br -HOSTS=\[aq]arwen elrond\[aq] opasetupssh -U -.NL - -.SH Operations on Chassis -.NL -opasetupssh -C -.br -opasetupssh -C -H \[aq]chassis1 chassis2\[aq] -.br -CHASSIS=\[aq]chassis1 chassis2\[aq] opasetupssh -C -.SH Environment Variables -.NL - -.PP -The following environment variables are also used by this command: -.TP 10 -\fBHOSTS\(ulFILE\fR -.NL -File containing list of hosts, used in absence of -f and -h. - -.TP 10 -\fBCHASSIS\(ulFILE\fR -.NL -File containing list of chassis, used in absence of -F and -H. - -.TP 10 -\fBHOSTS\fR -.NL -List of hosts, used if -h option not supplied. - -.TP 10 -\fBCHASSIS\fR -.NL -List of chassis, used if -C is used and -H and -F options not supplied. - -.TP 10 -\fBFF\(ulMAX\(ulPARALLEL\fR -.NL -When -p option is used, maximum concurrent operations. - -.TP 10 -\fBFF\(ulIPOIB\(ulSUFFIX\fR -.NL -Suffix to append to hostname to create IPoIB hostname. Used in absence of -i. - -.TP 10 -\fBFF\(ulCHASSIS\(ulLOGIN\(ulMETHOD\fR -.NL -How to log into chassis. Can be Telnet or SSH. - -.TP 10 -\fBFF\(ulCHASSIS\(ulADMIN\(ulPASSWORD\fR -.NL -Password for admin on all chassis. Used in absence of -S option. - -.SH Description -.NL - -.PP -The Intel(R) Omni-Path Fabric Suite FastFabric Toolset provides additional flexibility in the translation between IPoIB and management network hostnames. -.PP -opasetupssh provides an easy way to create SSH keys and distribute them to the hosts or chassis in the cluster. Many of the FastFabric tools (as well as many versions of MPI) require that SSH is set up for password-less operation. Therefore, opasetupssh is an important setup step. -.PP -This tool also sets up SSH to the local host and the local host\[aq]s IPoIB name. This capability is required by selected FastFabric Toolset commands and may be used by some applications (such as MPI). -.PP -opasetupssh has two modes of operation. The mode is selected by the presence or absence of the -U option. Typically, opasetupssh is first run without the -U option, then it may later be run with the -U option. -.SH Host Initial Key Exchange -.NL - -.PP -When run without the -U option, opasetupssh performs the initial key exchange and enables password-less SSH and SCP. The preferred way to use opasetupssh for initial key exchange is with the -S option. This requires that all hosts are configured with the same password for the specified "user" (typically root). In this mode, the password is prompted for once and then SSH and SCP are used in conjunction with that password to complete the setup for the hosts. This mode also avoids the need to set up rsh/rcp/rlogin (which can be a security risk). -.PP -opasetupssh configures password-less SSH/SCP for both the management network and IPoIB. Typically, the management network is used for FastFabric Toolset operations while IPoIB is used for MPI and other applications. -.PP -During initial cluster installation, where the Intel(R) Omni-Path Fabric software is not yet installed on all the hosts, IPoIB is not yet running. In this situation, use the -i option with an empty string as follows: -.PP - -.br -opasetupssh -i \[aq]\[aq] - -.br - -.PP -This causes the last part of the setup of SSH for IPoIB to be skipped. -.SH Refreshing Local Systems Known Hosts -.NL - -.PP -If aspects of the host have changed, such as IP addresses, MAC addresses, software installation, or server OS reinstallation, you can refresh the local host\[aq]s SSH known\(ulhosts file by running opasetupssh with the -U option. This option does not transfer the keys, but instead connects to each host (management network and IPoIB) to refresh the SSH keys. Existing entries for the specified hosts are replaced within the local known\(ulhosts file. When run in this mode, the -S option is ignored. This mode assumes SSH has previously been set up for the hosts, as such no files are transferred to the specified hosts and no passwords should be required. -.PP -Typically after completing the installation and booting of Intel(R) Omni-Path Fabric software, opasetupssh must be rerun with the -U option to update the known\(ulhosts file. -.SH Chassis Initial Key Exchange -.NL - -.PP -When run without the -U option, opasetupssh performs the initial key exchange and enables password-less SSH and SCP. For chassis, the key exchange uses SCP and the chassis CLI. During this command you log into the chassis using the configured mechanism for chassis login. -.PP -The preferred way to use opasetupssh for initial key exchange is with the -S option. This requires that all chassis are configured with the same password for admin. In this mode, you are prompted for the password once and then the \fBFF\(ulCHASSIS\(ulLOGIN\(ulMETHOD\fR and SCP are used in conjunction with that password to complete the setup for the chassis. This method also avoids the need to setup the chassis password in /etc/opa/opafastfabric.conf (which can be a security risk). -.PP -For chassis, the -i option is ignored. -.SH Chassis Refreshing Local Systems Known Hosts -.NL - -.PP -If aspects of the chassis have changed, such as IP addresses or MAC addresses, you can refresh the local host\[aq]s SSH known\(ulhosts file by running opasetupssh with the -U option. This option does not transfer the keys, but instead connects to each chassis to refresh the SSH keys. Existing entries for the specified chassis are replaced within the local known\(ulhosts file. When run in this mode, the -S option is ignored. This mode assumes SSH has previously been set up for the chassis, because no files are transferred to the specified hosts and no passwords are required. +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opasetupssh 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opasetupssh + + +.PP + +\fB(Linux or Switch)\fR +Creates SSH keys and configures them on all hosts or chassis so the system can use SSH and SCP into all other hosts or chassis without a password prompt. Typically, during cluster setup this tool enables the root user on the Management Node to log into the other hosts (as root) or chassis (as admin) using password-less SSH. +.SH Syntax +opasetupssh [-C|p|U] [-f \fIhostfile\fR] [-F \fIchassisfile\fR] [-h \[aq]\fIhosts\fR\[aq]] +.br + +[-H \[aq]\fIchassis\fR\[aq]] [-i \fIipoib\(ulsuffix\fR] [-u \fIuser\fR] [-S] [-R|P] +.SH Options + +.TP 10 +--help + +Produces full help text. + +.TP 10 +-C + +Performs operation against chassis. Default is hosts. + +.TP 10 +-p + +Performs operation against all chassis or hosts in parallel. + +.TP 10 +-U + +Performs connect only (to enter in local hosts, known hosts). When run in this mode, the -S option is ignored. + +.TP 10 +-f \fIhostfile\fR + +Specifies the file with hosts in cluster. +.br +Default is /etc/opa/hosts file. + +.TP 10 +-F \fIchassisfile\fR + +Specifies the file with chassis in cluster. +.br +Default is /etc/opa/chassis file. + +.TP 10 +-h \fIhosts\fR + +Specifies the list of hosts to set up. + +.TP 10 +-H \fIchassis\fR + +Specifies the list of chassis to set up. + +.TP 10 +-i \fIipoib\(ulsuffix\fR + +Specifies the suffix to apply to host names to create IPoIB host names. Default is -opa. + +.TP 10 +-u \fIuser\fR + +Specifies the user on remote system to allow this user to SSH to. Default is current user code for host(s) and admin for chassis. + +.TP 10 +-S + +Securely prompts for password for user on remote system. + +.TP 10 +-R + +Skips setup of SSH to local host. + +.TP 10 +-P + +Skips ping of host (for SSH to devices on Internet with ping +.br +firewalled). + +.SH Examples + + +.SH Operations on Hosts +opasetupssh -S -i \[aq]\[aq] +.br + +opasetupssh -U +.br + +opasetupssh -h \[aq]arwen elrond\[aq] -U +.br + +HOSTS=\[aq]arwen elrond\[aq] opasetupssh -U + +.SH Operations on Chassis +opasetupssh -C +.br + +opasetupssh -C -H \[aq]chassis1 chassis2\[aq] +.br + +CHASSIS=\[aq]chassis1 chassis2\[aq] opasetupssh -C +.SH Environment Variables + +.PP +The following environment variables are also used by this command: +.TP 10 +\fBHOSTS\(ulFILE\fR + +File containing list of hosts, used in absence of -f and -h. + +.TP 10 +\fBCHASSIS\(ulFILE\fR + +File containing list of chassis, used in absence of -F and -H. + +.TP 10 +\fBHOSTS\fR + +List of hosts, used if -h option not supplied. + +.TP 10 +\fBCHASSIS\fR + +List of chassis, used if -C is used and -H and -F options not supplied. + +.TP 10 +\fBFF\(ulMAX\(ulPARALLEL\fR + +When -p option is used, maximum concurrent operations. + +.TP 10 +\fBFF\(ulIPOIB\(ulSUFFIX\fR + +Suffix to append to hostname to create IPoIB hostname. Used in absence of -i. + +.TP 10 +\fBFF\(ulCHASSIS\(ulLOGIN\(ulMETHOD\fR + +How to log into chassis. Can be Telnet or SSH. + +.TP 10 +\fBFF\(ulCHASSIS\(ulADMIN\(ulPASSWORD\fR + +Password for admin on all chassis. Used in absence of -S option. + +.SH Description + +.PP +The Intel(R) Omni-Path Fabric Suite FastFabric Toolset provides additional flexibility in the translation between IPoIB and management network hostnames. +.PP +opasetupssh provides an easy way to create SSH keys and distribute them to the hosts or chassis in the cluster. Many of the FastFabric tools (as well as many versions of MPI) require that SSH is set up for password-less operation. Therefore, opasetupssh is an important setup step. +.PP +This tool also sets up SSH to the local host and the local host\[aq]s IPoIB name. This capability is required by selected FastFabric Toolset commands and may be used by some applications (such as MPI). +.PP +opasetupssh has two modes of operation. The mode is selected by the presence or absence of the -U option. Typically, opasetupssh is first run without the -U option, then it may later be run with the -U option. +.SH Host Initial Key Exchange + +.PP +When run without the -U option, opasetupssh performs the initial key exchange and enables password-less SSH and SCP. The preferred way to use opasetupssh for initial key exchange is with the -S option. This requires that all hosts are configured with the same password for the specified "user" (typically root). In this mode, the password is prompted for once and then SSH and SCP are used in conjunction with that password to complete the setup for the hosts. This mode also avoids the need to set up rsh/rcp/rlogin (which can be a security risk). +.PP +opasetupssh configures password-less SSH/SCP for both the management network and IPoIB. Typically, the management network is used for FastFabric Toolset operations while IPoIB is used for MPI and other applications. +.PP +During initial cluster installation, where the Intel(R) Omni-Path Fabric software is not yet installed on all the hosts, IPoIB is not yet running. In this situation, use the -i option with an empty string as follows: +.PP + +.br +opasetupssh -i \[aq]\[aq] + +.br + +.PP +This causes the last part of the setup of SSH for IPoIB to be skipped. +.SH Refreshing Local Systems Known Hosts + +.PP +If aspects of the host have changed, such as IP addresses, MAC addresses, software installation, or server OS reinstallation, you can refresh the local host\[aq]s SSH known\(ulhosts file by running opasetupssh with the -U option. This option does not transfer the keys, but instead connects to each host (management network and IPoIB) to refresh the SSH keys. Existing entries for the specified hosts are replaced within the local known\(ulhosts file. When run in this mode, the -S option is ignored. This mode assumes SSH has previously been set up for the hosts, as such no files are transferred to the specified hosts and no passwords should be required. +.PP +Typically after completing the installation and booting of Intel(R) Omni-Path Fabric software, opasetupssh must be rerun with the -U option to update the known\(ulhosts file. +.SH Chassis Initial Key Exchange + +.PP +When run without the -U option, opasetupssh performs the initial key exchange and enables password-less SSH and SCP. For chassis, the key exchange uses SCP and the chassis CLI. During this command you log into the chassis using the configured mechanism for chassis login. +.PP +The preferred way to use opasetupssh for initial key exchange is with the -S option. This requires that all chassis are configured with the same password for admin. In this mode, you are prompted for the password once and then the \fBFF\(ulCHASSIS\(ulLOGIN\(ulMETHOD\fR and SCP are used in conjunction with that password to complete the setup for the chassis. This method also avoids the need to setup the chassis password in /etc/opa/opafastfabric.conf (which can be a security risk). +.PP +For chassis, the -i option is ignored. +.SH Chassis Refreshing Local Systems Known Hosts + +.PP +If aspects of the chassis have changed, such as IP addresses or MAC addresses, you can refresh the local host\[aq]s SSH known\(ulhosts file by running opasetupssh with the -U option. This option does not transfer the keys, but instead connects to each chassis to refresh the SSH keys. Existing entries for the specified chassis are replaced within the local known\(ulhosts file. When run in this mode, the -S option is ignored. This mode assumes SSH has previously been set up for the chassis, because no files are transferred to the specified hosts and no passwords are required. diff --git a/IbaTools/man/opashowallports.manPage b/IbaTools/man/opashowallports.manPage index dd52a12..f765e76 100644 --- a/IbaTools/man/opashowallports.manPage +++ b/IbaTools/man/opashowallports.manPage @@ -1,119 +1,119 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opashowallports 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opashowallports - -.NL - -.PP - -\fB(Switch and Host)\fR -Displays basic port state and statistics for all host nodes, chassis, or externally-managed switches. -.PP - -.B NOTE: -opareport and opareports are more powerful Intel(R) Omni-Path Fabric Suite FastFabric commands. For general fabric analysis, use opareport or opareports with options such as -o errors and -o slowlinks to perform an efficient analysis of link speeds and errors. - - -.SH Syntax -.NL -opashowallports [-C] [-f \fIhostfile\fR] [-F \fIchassisfile\fR] [-h \[aq]\fIhosts\fR\[aq]] -.br -[-H \[aq]\fIchassis\fR\[aq]] [-S] -.SH Options -.NL - -.TP 10 ---help -.NL -Produces full help text. -.TP 10 --C -.NL -Performs operation against chassis. Default is host. -.TP 10 --f \fIhostfile\fR -.NL -Specifies the file containing the list of hosts in cluster. Default is /etc/opa/hosts file. -.TP 10 --F \fIchassisfile\fR -.NL -Specifies the file containing the list of chassis in cluster. Default is /etc/opa/chassis file. -.TP 10 --h \fIhosts\fR -.NL -Specifies the list of hosts for which to show ports. -.TP 10 --H \fIchassis\fR -.NL -Specifies the list of chassis for which to show ports. -.TP 10 --S -.NL -Securely prompts for password for admin on chassis. -.SH Environment Variables -.NL - -.PP -The following environment variables are also used by this command: -.TP 10 -\fBHOSTS\fR -.NL -List of hosts, used if -h option not supplied. - -.TP 10 -\fBCHASSIS\fR -.NL -List of chassis, used if -C is used and -H and -F options not supplied. - -.TP 10 -\fBHOSTS\(ulFILE\fR -.NL -File containing list of hosts, used in absence of -f and -h. - -.TP 10 -\fBCHASSIS\(ulFILE\fR -.NL -File containing list of chassis, used in absence of -F and -H. - -.TP 10 -\fBFF\(ulCHASSIS\(ulLOGIN\(ulMETHOD\fR -.NL -How to log into chassis. Can be Telnet or SSH. - -.TP 10 -\fBFF\(ulCHASSIS\(ulADMIN\(ulPASSWORD\fR -.NL -Password for admin on all chassis. Used in absence of -S option. - -.SH Example -.NL -opashowallports -.br -opashowallports -h \[aq]elrond arwen\[aq] -.br -HOSTS=\[aq]elrond arwen\[aq] opashowallports -.br -opashowallports -C -.br -opashowallports -H \[aq]chassis1 chassis2\[aq] -.br -CHASSIS=\[aq]chassis1 chassis2\[aq] opashowallports -C -.SH Notes -.NL - -.PP -When performing opashowallports against hosts, internally SSH is used. The command opashowallports requires that password-less SSH be set up between the host running the Intel(R) Omni-Path Fabric Suite FastFabric Toolset and the hosts opashowallports is operating against. The opasetupssh FastFabric tool can aid in setting up password-less SSH. -.PP -When performing operations against chassis, Intel recommends that you set up SSH keys (see -\fIopasetupssh\fR -). If SSH keys are not set up, Intel recommends that you use the -S option, to avoid keeping the password in configuration files. -.PP -When performing opashowallports against externally-managed switches, a node with Intel(R) Omni-Path Fabric Suite FastFabric Toolset installed is required. Typically, this is the node from which opashowallports is being run. +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opashowallports 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opashowallports + + +.PP + +\fB(Switch and Host)\fR +Displays basic port state and statistics for all host nodes, chassis, or externally-managed switches. +.PP + +.B NOTE: +opareport and opareports are more powerful Intel(R) Omni-Path Fabric Suite FastFabric commands. For general fabric analysis, use opareport or opareports with options such as -o errors and -o slowlinks to perform an efficient analysis of link speeds and errors. + + +.SH Syntax +opashowallports [-C] [-f \fIhostfile\fR] [-F \fIchassisfile\fR] [-h \[aq]\fIhosts\fR\[aq]] +.br + +[-H \[aq]\fIchassis\fR\[aq]] [-S] +.SH Options + +.TP 10 +--help + +Produces full help text. +.TP 10 +-C + +Performs operation against chassis. Default is host. +.TP 10 +-f \fIhostfile\fR + +Specifies the file containing the list of hosts in cluster. Default is /etc/opa/hosts file. +.TP 10 +-F \fIchassisfile\fR + +Specifies the file containing the list of chassis in cluster. Default is /etc/opa/chassis file. +.TP 10 +-h \fIhosts\fR + +Specifies the list of hosts for which to show ports. +.TP 10 +-H \fIchassis\fR + +Specifies the list of chassis for which to show ports. +.TP 10 +-S + +Securely prompts for password for admin on chassis. +.SH Environment Variables + +.PP +The following environment variables are also used by this command: +.TP 10 +\fBHOSTS\fR + +List of hosts, used if -h option not supplied. + +.TP 10 +\fBCHASSIS\fR + +List of chassis, used if -C is used and -H and -F options not supplied. + +.TP 10 +\fBHOSTS\(ulFILE\fR + +File containing list of hosts, used in absence of -f and -h. + +.TP 10 +\fBCHASSIS\(ulFILE\fR + +File containing list of chassis, used in absence of -F and -H. + +.TP 10 +\fBFF\(ulCHASSIS\(ulLOGIN\(ulMETHOD\fR + +How to log into chassis. Can be Telnet or SSH. + +.TP 10 +\fBFF\(ulCHASSIS\(ulADMIN\(ulPASSWORD\fR + +Password for admin on all chassis. Used in absence of -S option. + +.SH Example +opashowallports +.br + +opashowallports -h \[aq]elrond arwen\[aq] +.br + +HOSTS=\[aq]elrond arwen\[aq] opashowallports +.br + +opashowallports -C +.br + +opashowallports -H \[aq]chassis1 chassis2\[aq] +.br + +CHASSIS=\[aq]chassis1 chassis2\[aq] opashowallports -C +.SH Notes + +.PP +When performing opashowallports against hosts, internally SSH is used. The command opashowallports requires that password-less SSH be set up between the host running the Intel(R) Omni-Path Fabric Suite FastFabric Toolset and the hosts opashowallports is operating against. The opasetupssh FastFabric tool can aid in setting up password-less SSH. +.PP +When performing operations against chassis, Intel recommends that you set up SSH keys (see +\fIopasetupssh\fR +). If SSH keys are not set up, Intel recommends that you use the -S option, to avoid keeping the password in configuration files. +.PP +When performing opashowallports against externally-managed switches, a node with Intel(R) Omni-Path Fabric Suite FastFabric Toolset installed is required. Typically, this is the node from which opashowallports is being run. diff --git a/IbaTools/man/opashowmc.manPage b/IbaTools/man/opashowmc.manPage index 589e7e1..de7f226 100644 --- a/IbaTools/man/opashowmc.manPage +++ b/IbaTools/man/opashowmc.manPage @@ -1,108 +1,105 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opashowmc 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opashowmc - -.NL - -.PP - -\fB(Linux)\fR -Displays the Intel(R) Omni-Path Multicast groups created for the fabric along with the Intel(R) Omni-Path Host Fabric Interface (HFI) ports which are a member of each multicast group. This command can be helpful when attempting to analyze or debug Intel(R) Omni-Path multicast usage by applications or ULPs such as IPoIB. -.SH Syntax -.NL -opashowmc [-v] [-m \fImgid\fR] [-t \fIportsfile\fR] [-p \fIports\fR] -.SH Options -.NL - -.TP 10 ---help -.NL -Produces full help text. - -.TP 10 --v -.NL -Returns verbose output and shows name of each member. - -.TP 10 --m \fImgid\fR -.NL -Shows the membership of the group only. - -.TP 10 --t \fIportsfile\fR -.NL -Specifies the file with list of local HFI ports used to access fabric(s) for analysis. Default is /etc/opa/ports file. - -.TP 10 --p \fIports\fR -.NL -Specifies the list of local HFI ports used to access fabric(s) for analysis. - -.IP -Default is first active port. The first HFI in the system is 1. The first port on an HFI is 1. Uses the format hfi:port, -.br -for example: -.RS -.TP 10 - -.sp -0:0 -First active port in system. - -.RE - -.RS -.TP 10 - -.sp -0:y -Port \fIy\fR within system. - -.RE - -.RS -.TP 10 - -.sp -x:0 -First active port on HFI \fIx\fR. - -.RE - -.RS -.TP 10 - -.sp -x:y -HFI \fIx\fR, port \fIy\fR. - -.RE - -.SH Examples -.NL -opashowmc -.br -opashowmc -p \[aq]1:1 1:2 2:1 2:2\[aq] opashowmc -m 0xff12401b80010000:0x00000000ffffffff -.SH Environment Variables -.NL - -.PP -The following environment variables are also used by this command: -.TP 10 -\fBPORTS\fR -.NL -List of ports, used in absence of -t and -p. - -.TP 10 -\fBPORTS\(ulFILE\fR -.NL -File containing list of ports, used in absence of -t and -p. +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opashowmc 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opashowmc + + +.PP + +\fB(Linux)\fR +Displays the Intel(R) Omni-Path Multicast groups created for the fabric along with the Intel(R) Omni-Path Host Fabric Interface (HFI) ports which are a member of each multicast group. This command can be helpful when attempting to analyze or debug Intel(R) Omni-Path multicast usage by applications or ULPs such as IPoIB. +.SH Syntax +opashowmc [-v] [-m \fImgid\fR] [-t \fIportsfile\fR] [-p \fIports\fR] +.SH Options + +.TP 10 +--help + +Produces full help text. + +.TP 10 +-v + +Returns verbose output and shows name of each member. + +.TP 10 +-m \fImgid\fR + +Shows the membership of the group only. + +.TP 10 +-t \fIportsfile\fR + +Specifies the file with list of local HFI ports used to access fabric(s) for analysis. Default is /etc/opa/ports file. + +.TP 10 +-p \fIports\fR + +Specifies the list of local HFI ports used to access fabric(s) for analysis. + +.IP +Default is first active port. The first HFI in the system is 1. The first port on an HFI is 1. Uses the format hfi:port, +.br +for example: +.RS +.TP 10 + +.sp +0:0 +First active port in system. + +.RE + +.RS +.TP 10 + +.sp +0:y +Port \fIy\fR within system. + +.RE + +.RS +.TP 10 + +.sp +x:0 +First active port on HFI \fIx\fR. + +.RE + +.RS +.TP 10 + +.sp +x:y +HFI \fIx\fR, port \fIy\fR. + +.RE + +.SH Examples +opashowmc +.br + +opashowmc -p \[aq]1:1 1:2 2:1 2:2\[aq] +opashowmc -m 0xff12401b80010000:0x00000000ffffffff +.SH Environment Variables + +.PP +The following environment variables are also used by this command: +.TP 10 +\fBPORTS\fR + +List of ports, used in absence of -t and -p. + +.TP 10 +\fBPORTS\(ulFILE\fR + +File containing list of ports, used in absence of -t and -p. diff --git a/IbaTools/man/opasmaquery.manPage b/IbaTools/man/opasmaquery.manPage index a3d3b6b..68ed7df 100644 --- a/IbaTools/man/opasmaquery.manPage +++ b/IbaTools/man/opasmaquery.manPage @@ -1,549 +1,575 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opasmaquery 1 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opasmaquery - -.NL - -.PP - -\fB(All)\fR -Performs Intel(R) Omni-Path Architecture-defined SMA queries and displays the resulting response. Each query is issued directly to the SMA and does not involve SM interaction. -.SH Syntax -.NL -opasmaquery [-v] [-d \fIdetail\fR][-g] [-l \fIlid\fR] [-h \fIhfi\fR] [-p \fIport\fR] [-o \fIotype\fR] -.br -[-m \fIport\fR| \fIport1,port2\fR] [-f \fIflid\fR] [-b \fIblock[,count]\fR] [hop hop ...] -.SH Options -.NL - -.TP 10 ---help -.NL -Produces full help text. - -.TP 10 --v -.NL -Returns verbose output. Can be specified more than once for additional openib and libibumad debugging. - -.TP 10 --d \fIdetail\fR -.NL -Specifies the output detail level for cableinfo only. Range is 0 - n. Default is 2. An upper limit for detail level is not enforced. After a maximum amount of output is reached, a larger detail value has no effect. - -.TP 10 --g -.NL -Displays line-by-line format. Default is summary format. - -.TP 10 --l \fIlid\fR -.NL -Specifies the destination LID. Default is local port. - -.TP 10 --h/--hfi \fIhfi\fR -.NL -Specifies the HFI, numbered 1..n. Using 0 specifies that the -p \fIport\fR port is a system-wide port number. Default is 0. - -.TP 10 --p/--port \fIport\fR -.NL -Specifies the port, numbered 1..n. Using 0 specifies the first active port. Default is 0. - -.TP 10 --o \fIotype\fR -.NL -Specifies the output type. Default is nodeinfo. Refer to -\fIotype Options Vary by Report\fR -for supported options. - -.IP -Valid output types are: -.RS -.TP 10 - -.sp -bfrctrl -Specifies buffer control tables. - -.IP -[-m dest\(ulport] [-m port1,port2] -.RE - -.RS -.TP 10 - -.sp -cableinfo -Specifies cable information. - -.IP -[-d detail] [-m dest\(ulport] [-b block[,count]] -.RE - -.RS -.TP 10 - -.sp -conginfo -Specifies congestion information. - -.RE - -.RS -.TP 10 - -.sp -desc or nodedesc -Specifies node descriptions/names. - -.RE - -.RS -.TP 10 - -.sp -hficongcon -Specifies HFI congestion control settings. - -.IP -[-b block[,count]] [-f flid] -.RE - -.RS -.TP 10 - -.sp -hficonglog -Specifies HFI congestion logs. - -.IP -[-b block[,count]] -.RE - -.RS -.TP 10 - -.sp -hficongset -Specifies HFI congestion settings. - -.RE - -.RS -.TP 10 - -.sp -linfdb -Specifies switch linear forwarding database (FDB) tables. - -.IP -[-b block[,count]] [-f flid] -.RE - -.RS -.TP 10 - -.sp -mcfdb -Specifies switch multicast FDB tables. - -.IP -[-m dest\(ulport] [-b block[,count]] [-f flid] -.RE - -.RS -.TP 10 - -.sp -portgroup -Specifies Adaptive Routing port groups. - -.IP -[-b block[,count]] -.RE - -.RS -.TP 10 - -.sp -portgroupfdb -Specifies Adaptive Routing port group FWD tables. - -.IP -[-b block[,count]] [-f flid] -.RE - -.RS -.TP 10 - -.sp -nodeaggr -Specifies node information and node descriptions. - -.RE - -.RS -.TP 10 - -.sp -node or nodeinfo -Specifies node information. - -.IP -[-m dest\(ulport] -.RE - -.RS -.TP 10 - -.sp -portinfo -Specifies port information. - -.IP -[-m dest\(ulport] -.RE - -.RS -.TP 10 - -.sp -pstateinfo -Specifies switch port state information. - -.IP -[-m dest\(ulport] [-m port1,port2] -.RE - -.RS -.TP 10 - -.sp -pkey -Specifies P-Key tables. - -.IP -[-m dest\(ulport] [-b block[,count]] -.RE - -.RS -.TP 10 - -.sp -slsc -Specifies SL to SC mapping tables. - -.RE - -.RS -.TP 10 - -.sp -scsl -Specifies SC to SL mapping tables. - -.RE - -.RS -.TP 10 - -.sp -scsc -Specifies SC to SC mapping tables. - -.IP -[-m dest\(ulport] [-m port1,port2] -.RE - -.RS -.TP 10 - -.sp -scvlt -Specifies SC to VLt tables. - -.IP -[-m dest\(ulport] [-m port1,port2] -.RE - -.RS -.TP 10 - -.sp -scvlnt -Specifies SC to VLnt tables. - -.IP -[-m dest\(ulport] [-m port1,port2] -.RE - -.RS -.TP 10 - -.sp -scvlr -Specifies SC to VLr tables - -.IP -[-m dest\(ulport] [-m port1,port2] -.RE - -.RS -.TP 10 - -.sp -sminfo -Specifies SM information. - -.RE - -.RS -.TP 10 - -.sp -swaggr -Specifies node information and switch information. - -.RE - -.RS -.TP 10 - -.sp -swconglog -Specifies switch congestion logs. - -.IP -[-b block[,count]] -.RE - -.RS -.TP 10 - -.sp -swcongset -Specifies switch congestion settings. - -.RE - -.RS -.TP 10 - -.sp -swinfo -Specifies switch information. - -.RE - -.RS -.TP 10 - -.sp -swportcong -Specifies switch congestion settings. - -.IP -[-b block[,count]] -.RE - -.RS -.TP 10 - -.sp -vlarb -Specifies VL arbitration tables. - -.IP -[-m dest\(ulport] -.RE - -.RS -.TP 10 - -.sp -ibnodeinfo -Specifies IB node information. - -.RE - -.RS -.TP 10 - -.sp -ledinfo -Specifies LED information. - -.IP -[-m dest\(ulport] -.RE - -.NL - -.SH -h and -p options permit a variety of selections: -.NL - -.TP 10 --h 0 -.NL -First active port in system (Default). - -.TP 10 --h 0 -p 0 -.NL -First active port in system. - -.TP 10 --h \fIx\fR -.NL -First active port on HFI \fIx\fR. - -.TP 10 --h \fIx\fR \fI\fR-p 0 -.NL -First active port on HFI \fIx\fR. - -.TP 10 --h 0 -p \fIy\fR -.NL -Port \fIy\fR within system (no matter which ports are active). - -.TP 10 --h \fIx\fR \fI\fR-p \fIy\fR -.NL -HFI \fIx\fR, port \fIy\fR. - -.NL - -.SH otype Options Vary by Report -.NL -[-m port|port1,port2] [-f lid] [-b block[,count]] -.TP 10 --m \fIport\fR -.NL -Specifies the port in destination device to query. - -.TP 10 --m \fIport1,port2\fR -.NL -For some reports, specifies a range of ports between \fIport1\fR and \fIport2\fR. For others, this describes an inport/outport pair. - -.TP 10 --f \fIlid\fR -.NL -Specifies the LID to look up in forwarding table to select which LFT or MFT block to display. Default is to show entire table. - -.TP 10 --b \fIblock[,count]\fR -.NL -Specifies the block number of either GUIDs or pkey, and the number of blocks to display. Default is to show entire table. - -.IP -For example: -.IP - -.RS -.TP 10 - -.sp --b \fIblock\fR -Displays all of block \fIblock\fR of a larger table. - -.RE - -.RS -.TP 10 - -.sp --b \fIblock,count\fR -Displays \fIcount\fR blocks of data starting with block \fIblock\fR. - -.RE - -.RS -.TP 10 - -.sp --b, \fIcount\fR -Displays \fIcount\fR blocks of data starting with block 0. - -.RE - -.SH Examples -.NL - -.PP -opasmaquery -o desc -l 6 -.br -# get nodedesc via lid routed -.br - -.br -opasmaquery -o nodedesc 1 3 -.br -# get nodedesc via directed route (2 dr hops) -.br - -.br -opasmaquery -o nodeinfo -l 2 3 -.br -# get nodeinfo via a combination of lid routed and # directed route (1 dr hop) -.br - -.br -opasmaquery -o portinfo -.br -# get local port info -.br - -.br -opasmaquery -o portinfo -l 6 -m 1 -.br -# get port info of port 1 of lid 6 -.br - -.br -opasmaquery -o pkey -l 2 3 -.br -# get pkey table entries starting (lid routed to lid 2, -.br -# then 1 dr hop to port 3) -.br - -.br -opasmaquery -o vlarb -l 6 -.br -# get vlarb table entries from lid 6 -.br - -.br -opasmaquery -o swinfo -l 2 -.br -# get switch info -.br - -.br -opasmaquery -o sminfo -l 1 -.br -# get SM info -.br - -.br -opasmaquery -o slsc -l 3 -.br -# get sl2sc table entries from lid 3 -.br - -.br -opasmaquery -o scsl -l 3 -.br -# get sc2sl table entries from lid 3 +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opasmaquery 1 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opasmaquery + + +.PP + +\fB(All)\fR +Performs Intel(R) Omni-Path Architecture-defined SMA queries and displays the resulting response. Each query is issued directly to the SMA and does not involve SM interaction. +.SH Syntax +opasmaquery [-v] [-d \fIdetail\fR][-g] [-l \fIlid\fR] [-h \fIhfi\fR] [-p \fIport\fR] +[-o \fIotype\fR] +.br +[-m \fIport\fR| \fIport1,port2\fR] [-f \fIflid\fR] [-b \fIblock[,count]\fR] [hop hop ...] +.SH Options + +.TP 10 +--help + +Produces full help text. + +.TP 10 +-v + +Returns verbose output. Can be specified more than once for additional openib and libibumad debugging. + +.TP 10 +-d \fIdetail\fR + +Specifies the output detail level for cableinfo only. Range is 0 - n. Default is 2. An upper limit for detail level is not enforced. After a maximum amount of output is reached, a larger detail value has no effect. + +.TP 10 +-g + +Displays line-by-line format. Default is summary format. + +.TP 10 +-l \fIlid\fR + +Specifies the destination LID. Default is local port. + +.TP 10 +-h/--hfi \fIhfi\fR + +Specifies the HFI, numbered 1..n. Using 0 specifies that the -p \fIport\fR port is a system-wide port number. Default is 0. + +.TP 10 +-p/--port \fIport\fR + +Specifies the port, numbered 1..n. Using 0 specifies the first active port. Default is 0. + +.TP 10 +-o \fIotype\fR + +Specifies the output type. Default is nodeinfo. Refer to +\fIotype Options Vary by Report\fR +for supported options. + +.IP +Valid output types are: +.RS +.TP 10 + +.sp +bfrctrl +Specifies buffer control tables. + +.IP +[-m dest\(ulport] [-m port1,port2] +.RE + +.RS +.TP 10 + +.sp +cableinfo +Specifies cable information. + +.IP +[-d detail] [-m dest\(ulport] [-b block[,count]] +.RE + +.RS +.TP 10 + +.sp +conginfo +Specifies congestion information. + +.RE + +.RS +.TP 10 + +.sp +desc or nodedesc +Specifies node descriptions/names. + +.RE + +.RS +.TP 10 + +.sp +hficongcon +Specifies HFI congestion control settings. + +.IP +[-b block[,count]] [-f flid] +.RE + +.RS +.TP 10 + +.sp +hficonglog +Specifies HFI congestion logs. + +.IP +[-b block[,count]] +.RE + +.RS +.TP 10 + +.sp +hficongset +Specifies HFI congestion settings. + +.RE + +.RS +.TP 10 + +.sp +linfdb +Specifies switch linear forwarding database (FDB) tables. + +.IP +[-b block[,count]] [-f flid] +.RE + +.RS +.TP 10 + +.sp +mcfdb +Specifies switch multicast FDB tables. + +.IP +[-m dest\(ulport] [-b block[,count]] [-f flid] +.RE + +.RS +.TP 10 + +.sp +portgroup +Specifies Adaptive Routing port groups. + +.IP +[-b block[,count]] +.RE + +.RS +.TP 10 + +.sp +portgroupfdb +Specifies Adaptive Routing port group FWD tables. + +.IP +[-b block[,count]] [-f flid] +.RE + +.RS +.TP 10 + +.sp +nodeaggr +Specifies node information and node descriptions. + +.RE + +.RS +.TP 10 + +.sp +node or nodeinfo +Specifies node information. + +.IP +[-m dest\(ulport] +.RE + +.RS +.TP 10 + +.sp +portinfo +Specifies port information. + +.IP +[-m dest\(ulport] +.RE + +.RS +.TP 10 + +.sp +pstateinfo +Specifies switch port state information. + +.IP +[-m dest\(ulport] [-m port1,port2] +.RE + +.RS +.TP 10 + +.sp +pkey +Specifies P-Key tables. + +.IP +[-m dest\(ulport] [-b block[,count]] +.RE + +.RS +.TP 10 + +.sp +slsc +Specifies SL to SC mapping tables. + +.RE + +.RS +.TP 10 + +.sp +scsl +Specifies SC to SL mapping tables. + +.RE + +.RS +.TP 10 + +.sp +scsc +Specifies SC to SC mapping tables. + +.IP +[-m dest\(ulport] [-m port1,port2] +.RE + +.RS +.TP 10 + +.sp +scvlt +Specifies SC to VLt tables. + +.IP +[-m dest\(ulport] [-m port1,port2] +.RE + +.RS +.TP 10 + +.sp +scvlnt +Specifies SC to VLnt tables. + +.IP +[-m dest\(ulport] [-m port1,port2] +.RE + +.RS +.TP 10 + +.sp +scvlr +Specifies SC to VLr tables + +.IP +[-m dest\(ulport] [-m port1,port2] +.RE + +.RS +.TP 10 + +.sp +sminfo +Specifies SM information. + +.RE + +.RS +.TP 10 + +.sp +swaggr +Specifies node information and switch information. + +.RE + +.RS +.TP 10 + +.sp +swconglog +Specifies switch congestion logs. + +.IP +[-b block[,count]] +.RE + +.RS +.TP 10 + +.sp +swcongset +Specifies switch congestion settings. + +.RE + +.RS +.TP 10 + +.sp +swinfo +Specifies switch information. + +.RE + +.RS +.TP 10 + +.sp +swportcong +Specifies switch congestion settings. + +.IP +[-b block[,count]] +.RE + +.RS +.TP 10 + +.sp +vlarb +Specifies VL arbitration tables. + +.IP +[-m dest\(ulport] +.RE + +.RS +.TP 10 + +.sp +ibnodeinfo +Specifies IB node information. + +.RE + +.RS +.TP 10 + +.sp +ledinfo +Specifies LED information. + +.IP +[-m dest\(ulport] +.RE + + +.SH -h and -p options permit a variety of selections: + +.TP 10 +-h 0 + +First active port in system (Default). + +.TP 10 +-h 0 -p 0 + +First active port in system. + +.TP 10 +-h \fIx\fR + +First active port on HFI \fIx\fR. + +.TP 10 +-h \fIx\fR \fI\fR-p 0 + +First active port on HFI \fIx\fR. + +.TP 10 +-h 0 -p \fIy\fR + +Port \fIy\fR within system (no matter which ports are active). + +.TP 10 +-h \fIx\fR \fI\fR-p \fIy\fR + +HFI \fIx\fR, port \fIy\fR. + + +.SH otype Options Vary by Report +[-m port|port1,port2] [-f lid] [-b block[,count]] +.TP 10 +-m \fIport\fR + +Specifies the port in destination device to query. + +.TP 10 +-m \fIport1,port2\fR + +For some reports, specifies a range of ports between \fIport1\fR and \fIport2\fR. For others, this describes an inport/outport pair. + +.TP 10 +-f \fIlid\fR + +Specifies the LID to look up in forwarding table to select which LFT or MFT block to display. Default is to show entire table. + +.TP 10 +-b \fIblock[,count]\fR + +Specifies the block number of either GUIDs or pkey, and the number of blocks to display. Default is to show entire table. + +.IP +For example: +.IP + +.RS +.TP 10 + +.sp +-b \fIblock\fR +Displays all of block \fIblock\fR of a larger table. + +.RE + +.RS +.TP 10 + +.sp +-b \fIblock,count\fR +Displays \fIcount\fR blocks of data starting with block \fIblock\fR. + +.RE + +.RS +.TP 10 + +.sp +-b, \fIcount\fR +Displays \fIcount\fR blocks of data starting with block 0. + +.RE + +.SH Examples + +.PP +opasmaquery -o desc -l 6 +.br + +# get nodedesc via lid routed +.br + + +.br + +opasmaquery -o nodedesc 1 3 +.br + +# get nodedesc via directed route (2 dr hops) +.br + + +.br + +opasmaquery -o nodeinfo -l 2 3 +.br + +# get nodeinfo via a combination of lid routed and +# directed route (1 dr hop) +.br + + +.br + +opasmaquery -o portinfo +.br + +# get local port info +.br + + +.br + +opasmaquery -o portinfo -l 6 -m 1 +.br + +# get port info of port 1 of lid 6 +.br + + +.br + +opasmaquery -o pkey -l 2 3 +.br + +# get pkey table entries starting (lid routed to lid 2, +.br + +# then 1 dr hop to port 3) +.br + + +.br + +opasmaquery -o vlarb -l 6 +.br + +# get vlarb table entries from lid 6 +.br + + +.br + +opasmaquery -o swinfo -l 2 +.br + +# get switch info +.br + + +.br + +opasmaquery -o sminfo -l 1 +.br + +# get SM info +.br + + +.br + +opasmaquery -o slsc -l 3 +.br + +# get sl2sc table entries from lid 3 +.br + + +.br + +opasmaquery -o scsl -l 3 +.br + +# get sc2sl table entries from lid 3 diff --git a/IbaTools/man/opasorthosts.manPage b/IbaTools/man/opasorthosts.manPage index 56455ba..2f82e68 100644 --- a/IbaTools/man/opasorthosts.manPage +++ b/IbaTools/man/opasorthosts.manPage @@ -1,82 +1,91 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opasorthosts 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opasorthosts - -.NL - -.PP -Sorts its standard input in a typical host name order and sorts to standard output. Hosts are sorted alphabetically (case-insensitively) by any alpha-numeric prefix, and then sorted numerically by any numeric suffix. Host names may end in a numeric field which may optionally have leading zeros. Unlike a pure alphabetic sort, this command results in intuitive sequencing of host names such as: host1, host2, host10. -.PP -This command does not remove duplicates; any duplicates are listed in adjacent lines. -.PP -Use this command to build mpi\(ulhosts input files for applications or cable tests that place hosts in order by name. -.SH Syntax -.NL -opasorthosts < \fIhostlist\fR> \fIoutput\(ulfile\fR -.SH Options -.NL - -.TP 10 ---help -.NL -Produces full help text. - -.TP 10 -\fIhostlist\fR -.NL -Specifies the list of host names. - -.TP 10 -\fIoutput\(ulfile\fR -.NL -Specifies the sorted list output. - -.SH Examples -.NL -opasorthosts < host.xml > Sorted\(ulhost -.TP 10 -\fBStandard Input\fR -.NL - -.br -opasorthosts -.br -osd04 -.br -osd1 -.br -compute20 -.br -compute3 -.br -mgmt1 -.br -mgmt2 -.br -login -.TP 10 -\fBStandard Output\fR -.NL - -.br -compute3 -.br -compute20 -.br -login -.br -mgmt1 -.br -mgmt2 -.br -osd1 -.br -osd04 +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opasorthosts 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opasorthosts + + +.PP +Sorts its standard input in a typical host name order and sorts to standard output. Hosts are sorted alphabetically (case-insensitively) by any alpha-numeric prefix, and then sorted numerically by any numeric suffix. Host names may end in a numeric field which may optionally have leading zeros. Unlike a pure alphabetic sort, this command results in intuitive sequencing of host names such as: host1, host2, host10. +.PP +This command does not remove duplicates; any duplicates are listed in adjacent lines. +.PP +Use this command to build mpi\(ulhosts input files for applications or cable tests that place hosts in order by name. +.SH Syntax +opasorthosts < \fIhostlist\fR> \fIoutput\(ulfile\fR +.SH Options + +.TP 10 +--help + +Produces full help text. + +.TP 10 +\fIhostlist\fR + +Specifies the list of host names. + +.TP 10 +\fIoutput\(ulfile\fR + +Specifies the sorted list output. + +.SH Examples +opasorthosts < host.xml > Sorted\(ulhost +.TP 10 +\fBStandard Input\fR + + +.br +opasorthosts +.br + +osd04 +.br + +osd1 +.br + +compute20 +.br + +compute3 +.br + +mgmt1 +.br + +mgmt2 +.br + +login +.TP 10 +\fBStandard Output\fR + + +.br +compute3 +.br + +compute20 +.br + +login +.br + +mgmt1 +.br + +mgmt2 +.br + +osd1 +.br + +osd04 diff --git a/IbaTools/man/opaswdisableall.manPage b/IbaTools/man/opaswdisableall.manPage index 2ad0963..c4c6139 100644 --- a/IbaTools/man/opaswdisableall.manPage +++ b/IbaTools/man/opaswdisableall.manPage @@ -1,105 +1,101 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opaswdisableall 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opaswdisableall - -.NL - -.PP - -\fB(Linux)\fR -Disables all unused switch ports. -.SH Syntax -.NL -opaswdisableall [-t \fIportsfile\fR] [-p \fIports\fR] [-F \fIfocus\fR] -.SH Options -.NL - -.TP 10 ---help -.NL -Produces full help text. - -.TP 10 --t \fIportsfile\fR -.NL -Specifies the file with list of local HFI ports used to access fabrics when clearing counters. -.br -Default is /etc/opa/ports file. - -.TP 10 --p \fIports\fR -.NL -Specifies the list of local HFI ports used to access fabrics for counter clear. - -.IP -Default is first active port. The first HFI in the system is 1. The first port on an HFI is 1. Uses the format hfi:port, -.br -for example: -.RS -.TP 10 - -.sp -0:0 -First active port in system. - -.RE - -.RS -.TP 10 - -.sp -0:y -Port \fIy\fR within system. - -.RE - -.RS -.TP 10 - -.sp -x:0 -First active port on HFI \fIx\fR. - -.RE - -.RS -.TP 10 - -.sp -x:y -HFI \fIx\fR, port \fIy\fR. - -.RE - -.TP 10 --F \fIfocus\fR -.NL -Specifies the an opareport -style focus argument to limit the scope of operation. - -.SH Examples -.NL -opaswdisableall -.br -opaswdisableall -p \[aq]1:1 1:2 2:1 2:2\[aq] -.SH Environment Variables -.NL - -.PP -The following environment variables are also used by this command: -.TP 10 -\fBPORTS\fR -.NL -List of ports, used in absence of -t and -p. - -.TP 10 -\fBPORTS\(ulFILE\fR -.NL -File containing list of ports, used in absence of -t and -p. +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opaswdisableall 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opaswdisableall + + +.PP + +\fB(Linux)\fR +Disables all unused switch ports. +.SH Syntax +opaswdisableall [-t \fIportsfile\fR] [-p \fIports\fR] [-F \fIfocus\fR] +.SH Options + +.TP 10 +--help + +Produces full help text. + +.TP 10 +-t \fIportsfile\fR + +Specifies the file with list of local HFI ports used to access fabrics when clearing counters. +.br +Default is /etc/opa/ports file. + +.TP 10 +-p \fIports\fR + +Specifies the list of local HFI ports used to access fabrics for counter clear. + +.IP +Default is first active port. The first HFI in the system is 1. The first port on an HFI is 1. Uses the format hfi:port, +.br +for example: +.RS +.TP 10 + +.sp +0:0 +First active port in system. + +.RE + +.RS +.TP 10 + +.sp +0:y +Port \fIy\fR within system. + +.RE + +.RS +.TP 10 + +.sp +x:0 +First active port on HFI \fIx\fR. + +.RE + +.RS +.TP 10 + +.sp +x:y +HFI \fIx\fR, port \fIy\fR. + +.RE + +.TP 10 +-F \fIfocus\fR + +Specifies the an opareport -style focus argument to limit the scope of operation. + +.SH Examples +opaswdisableall +.br + +opaswdisableall -p \[aq]1:1 1:2 2:1 2:2\[aq] +.SH Environment Variables + +.PP +The following environment variables are also used by this command: +.TP 10 +\fBPORTS\fR + +List of ports, used in absence of -t and -p. + +.TP 10 +\fBPORTS\(ulFILE\fR + +File containing list of ports, used in absence of -t and -p. diff --git a/IbaTools/man/opaswenableall.manPage b/IbaTools/man/opaswenableall.manPage index f6a2b4c..0b3e232 100644 --- a/IbaTools/man/opaswenableall.manPage +++ b/IbaTools/man/opaswenableall.manPage @@ -1,103 +1,99 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opaswenableall 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opaswenableall - -.NL - -.PP - -\fB(Linux)\fR -Re-enables all unused (or disabled) switch ports. -.SH Syntax -.NL -opaswenableall [-t \fIportsfile\fR] [-p \fIports\fR] [-F \fIfocus\fR] -.SH Options -.NL - -.TP 10 ---help -.NL -Produces full help text. - -.TP 10 --t \fIportsfile\fR -.NL -Specifies the file with list of local HFI ports used to access fabrics for operation. Default is /etc/opa/ports file. - -.TP 10 --p \fIports\fR -.NL -Specifies the list of local HFI ports used to access fabrics for operation. - -.IP -Default is first active port. The first HFI in the system is 1. The first port on an HFI is 1. Uses the format hfi:port, -.br -for example: -.RS -.TP 10 - -.sp -0:0 -First active port in system. - -.RE - -.RS -.TP 10 - -.sp -0:y -Port \fIy\fR within system. - -.RE - -.RS -.TP 10 - -.sp -x:0 -First active port on HFI \fIx\fR. - -.RE - -.RS -.TP 10 - -.sp -x:y -HFI \fIx\fR, port \fIy\fR. - -.RE - -.TP 10 --F \fIfocus\fR -.NL -Specifies an opareport -style focus argument to limit the scope of operation. - -.SH Examples -.NL -opaswenableall -.br -opaswenableall -p \[aq]1:1 1:2 2:1 2:2\[aq] -.SH Environment Variables -.NL - -.PP -The following environment variables are also used by this command: -.TP 10 -\fBPORTS\fR -.NL -List of ports, used in absence of -t and -p. - -.TP 10 -\fBPORTS\(ulFILE\fR -.NL -File containing list of ports, used in absence of -t and -p. +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opaswenableall 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opaswenableall + + +.PP + +\fB(Linux)\fR +Re-enables all unused (or disabled) switch ports. +.SH Syntax +opaswenableall [-t \fIportsfile\fR] [-p \fIports\fR] [-F \fIfocus\fR] +.SH Options + +.TP 10 +--help + +Produces full help text. + +.TP 10 +-t \fIportsfile\fR + +Specifies the file with list of local HFI ports used to access fabrics for operation. Default is /etc/opa/ports file. + +.TP 10 +-p \fIports\fR + +Specifies the list of local HFI ports used to access fabrics for operation. + +.IP +Default is first active port. The first HFI in the system is 1. The first port on an HFI is 1. Uses the format hfi:port, +.br +for example: +.RS +.TP 10 + +.sp +0:0 +First active port in system. + +.RE + +.RS +.TP 10 + +.sp +0:y +Port \fIy\fR within system. + +.RE + +.RS +.TP 10 + +.sp +x:0 +First active port on HFI \fIx\fR. + +.RE + +.RS +.TP 10 + +.sp +x:y +HFI \fIx\fR, port \fIy\fR. + +.RE + +.TP 10 +-F \fIfocus\fR + +Specifies an opareport -style focus argument to limit the scope of operation. + +.SH Examples +opaswenableall +.br + +opaswenableall -p \[aq]1:1 1:2 2:1 2:2\[aq] +.SH Environment Variables + +.PP +The following environment variables are also used by this command: +.TP 10 +\fBPORTS\fR + +List of ports, used in absence of -t and -p. + +.TP 10 +\fBPORTS\(ulFILE\fR + +File containing list of ports, used in absence of -t and -p. diff --git a/IbaTools/man/opaswitchadmin.manPage b/IbaTools/man/opaswitchadmin.manPage index e3530c1..e3bd38f 100644 --- a/IbaTools/man/opaswitchadmin.manPage +++ b/IbaTools/man/opaswitchadmin.manPage @@ -1,422 +1,417 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opaswitchadmin 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opaswitchadmin - -.NL - -.PP - -\fB(Switch)\fR -Performs a number of multi-step initialization and verification operations against one or more externally managed Intel(R) Omni-Path switches. The operations include initial switch setup, firmware upgrades, chassis reboot, and others. -.SH Syntax -.NL -opaswitchadmin [-c] [-N \[aq]\fInodes\fR\[aq]] [-L \fInodefile\fR] [-O] [-P \fIpackages\fR] -.br -[-a \fIaction\fR] [-t \fIportsfile\fR] [-p \fIports\fR] \fIoperation\fR... -.SH Options -.NL - -.TP 10 --help -.NL -Produces full help text. - -.TP 10 --c -.NL -Overwrites result files from any previous run before starting this run. - -.TP 10 --N \fInodes\fR -.NL -Specifies the list of nodes to execute the operation against. - -.TP 10 --L \fInodefile\fR -.NL -Specifies the file with nodes in the cluster. Default is /etc/opa/switches file. - -.TP 10 --P \fIpackages\fR -.NL -For upgrades: Specifies the file name or directory where the firmware image is to install. For the directory specified, .emfw file in the directory tree is used. shell wild cards may also be used within quotes. - -.TP 10 --t \fIportsfile\fR -.NL -Specifies the file with list of local HFI ports used to access fabrics for switch access. Default is /etc/opa/ports file. - -.TP 10 --p \fIports\fR -.NL -Specifies the list of local HFI ports used to access fabrics for switch access. - -.IP -Default is first active port. The first HFI in the system is 1. The first port on an HFI is 1. Uses the format hfi:port, -.br -for example: -.RS -.TP 10 - -.sp -0:0 -First active port in system. - -.RE - -.RS -.TP 10 - -.sp -0:y -Port \fIy\fR within system. - -.RE - -.RS -.TP 10 - -.sp -x:0 -First active port on HFI \fIx\fR. - -.RE - -.RS -.TP 10 - -.sp -x:y -HFI \fIx\fR, port \fIy\fR. - -.RE - -.TP 10 --a \fIaction\fR -.NL -Specifies an action for firmware file for switch upgrade. The action argument can be one or more of the following: - -.RS -.TP 10 - -.sp -select -Ensures firmware is in primary (Default). - -.RE - -.RS -.TP 10 - -.sp -run -Ensures firmware is in primary and running. - -.RE - -.TP 10 --O -.NL -Specifies the override for firmware upgrades, bypasses the previous firmware version checks, and forces the update unconditionally. - -.TP 10 -\fIoperation\fR -.NL -Performs the specified \fIoperation\fR, which can be one or more of the following: - -.RS -.TP 10 - -.sp -reboot -Reboots switches, ensures they go down and come back. - -.RE - -.RS -.TP 10 - -.sp -configure -Runs wizard to set up switch configuration. - -.TP 10 -.BR - -.PP - -.B NOTE: -You must reboot the switch for any new settings to be applied. - -.RE - -.RS -.TP 10 - -.sp -upgrade -Upgrades installation of all switches. - -.RE - -.RS -.TP 10 - -.sp -info -Reports firmware and hardware version, part number, and data rate capability of all nodes. - -.RE - -.RS -.TP 10 - -.sp -hwvpd -Completes hardware Vital Product Data (VPD) report of all nodes. - -.RE - -.RS -.TP 10 - -.sp -ping -Pings all nodes and tests for presence. - -.RE - -.RS -.TP 10 - -.sp -fwverify -Reports integrity of failsafe firmware of all nodes. - -.RE - -.RS -.TP 10 - -.sp -getconfig -Gets port configurations of an externally managed switch. - -.RE - -.PP -For more information on operations, see -\fIOperation Details\fR -. -.SH Example -.NL -opaswitchadmin -c reboot -.br -opaswitchadmin -P /root/ChassisFw \fIX.X.X.X.X\fR upgrade -.br -opaswitchadmin -a run -P \[aq]*.emfw\[aq] upgrade -.SH Environment Variables -.NL - -.PP -The following environment variables are also used by this command: -.TP 10 -\fBOPASWITCHES\fR -.NL -List of nodes, used in absence of -N and -L options. - -.TP 10 -\fBOPASWITCHES\(ulFILE\fR -.NL -File containing list of nodes, used in absence of -N and -L options. - -.TP 10 -\fBFF\(ulMAX\(ulPARALLEL\fR -.NL -Maximum concurrent operations. - -.TP 10 -\fBFF\(ulSERIALIZE\(ulOUTPUT\fR -.NL -Serialize output of parallel operations (yes or no). - -.TP 10 -\fBFF\(ulTIMEOUT\(ulMULT\fR -.NL -Multiplier for all timeouts associated with this command. Used if the systems are slow for some reason. - -.SH Details -.NL - -.PP -opaswitchadmin provides detailed logging of its results. During each run, the following files are produced: -.IP \(bu -test.res : Appended with summary results of run. -.IP \(bu -test.log : Appended with detailed results of run. -.IP \(bu -save\(ultmp/ : Contains a directory per failed test with detailed logs. -.IP \(bu -test\(ultmp*/ : Intermediate result files while test is running. -.PP -The -c option removes all log files. -.PP -Results from opaswitchadmin are grouped into test suites, test cases, and test items. A given run of opaswitchadmin represents a single test suite. Within a test suite, multiple test cases occur; typically one test case per chassis being operated on. Some of the more complex operations may have multiple test items per test case. Each test item represents a major step in the overall test case. -.PP -Each opaswitchadmin run appends to test.res and test.log and creates temporary files in test\(ultmp$PID in the current directory. the test.res file provides an overall summary of operations performed and their results. The same information is also displayed while opaswitchadmin is executing. test.log contains detailed information about what was performed, including the specific commands executed and the resulting output. The test\(ultmp directories contain temporary files that reflect tests in progress (or killed). The logs for any failures are logged in the save\(ultemp directory with a directory per failed test case. If the same test case fails more than once, save\(ultemp retains the information from the first failure. Subsequent runs of opaswitchadmin are appended to test.log. Intel recommends reviewing failures and using the -c option to remove old logs before subsequent runs of opaswitchadmin. opaswitchadmin also appends to punchlist.csv for failing switches. -.PP -opaswitchadmin implicitly performs its operations in parallel. However, as for the other tools, \fBFF\(ulMAX\(ulPARALLEL\fR can be exported to change the degree of parallelism. 1000 parallel operations is the default. -.NL - -.SH Operation Details -.NL - -.PP - -\fB(Switch)\fR -All operations against Intel(R) Omni-Path Fabric externally-managed switches (except ping) securely access the selected switches. If a password has been set, the -S option must be used to securely prompt for a password. In this case, the same password is used for all switches. -.TP 10 -reboot -.NL -Reboots the given switches. - -.IP -Use the \fBFF\(ulMAX\(ulPARALLEL\fR value to select either a rolling reboot or a parallel reboot. In most cases, a parallel reboot is recommended for expediency. -.TP 10 -upgrade -.NL -Upgrades the firmware on each specified switch. The -P option selects a directory containing a .emfw file or provides an explicit .emfw file for the switches. If more than one .emfw file is specified, the operation is undefined. The -a option selects the desired minimal state for the new firmware. Only the select and run options are valid for this operation. - -.IP -When the -a option specifies run, switches are rebooted. Use the \fBFF\(ulMAX\(ulPARALLEL\fR value to select a rolling upgrade or a parallel upgrade. In most cases, a parallel upgrade is recommended for expediency. -.IP -The upgrade process also sets the switch name. -.IP -The upgrade process is used to set, clear, or change the password of the switches using the -s option. When this option is specified, you are prompted for a new password to be set on the switches. To reset (clear) the password, press Enter when prompted. This option can be used to configure the switches to not require a password for subsequent operations. A change to the password does not take effect until the next reboot of the switch. -.IP -For more information about switch firmware, refer to the -\fIIntel(R) Omni-Path Fabric Switches GUI User Guide\fR - -and -\fIIntel(R) Omni-Path Fabric Switches Release Notes\fR - -. -.TP 10 -configure -.NL -Runs the switch setup wizard, which asks a series of questions. Once the wizard has finished prompting for configuration information, all the selected switches are configured according to the entered responses. The following items are configurable for all Intel(R) Omni-Path Switch 100 Series : - -.RS - -.IP \(bu -FM Enabled -.IP \(bu -Link CRC Mode -.IP \(bu -Link Width Supported -.IP \(bu -OPA Node Description - -.RE - -.TP 10 -.BR - -.PP - -.B NOTE: -Typically, the Node Description is updated automatically during a firmware upgrade, if it is configured properly in the switches file. Updating the node description is also available using the configure option without performing a firmware upgrade. - -.TP 10 -.BR - -.PP - -.B NOTE: -You must reboot the switch for any new settings to be applied. - -.TP 10 -info -.NL -Queries the switches and displays the following information: - -.RS - -.IP \(bu -Firmware version -.IP \(bu -Hardware version -.IP \(bu -Hardware part number, including revision information -.IP \(bu -Speed capability -.IP \(bu -Fan status -.IP \(bu -Power supply status - -.RE - -.IP -This operation also outputs a summary of various configuration settings for each switch within a fabric. -.TP 10 -hwvpd -.NL -Queries the switches and displays the Vital Product Data (VPD) including: - -.RS - -.IP \(bu -Serial number -.IP \(bu -Part number -.IP \(bu -Model name -.IP \(bu -Hardware version -.IP \(bu -Manufacturer -.IP \(bu -Product description -.IP \(bu -Manufacturer ID -.IP \(bu -Manufacture date -.IP \(bu -Manufacture time - -.RE - -.TP 10 -ping -.NL -Issues an inband packet to the switches to test for presence and reports on presence/non-presence of each selected switch. - -.TP 10 -.BR - -.PP - -.B NOTE: -It is not necessary to supply a password (using -S) for this operation. - -.TP 10 -fwverify -.NL -Verifies the integrity of the firmware images in the EEPROMs of the selected switches. - -.TP 10 -getconfig -.NL -Gets port configurations of an externally managed switch. This operation also outputs a summary of various configuration settings for each switch within a fabric. For example, in a fabric with seven switches, a report similar to the following is displayed. - -.IP -This summary helps determine if all switches have the same configuration, and if not, indicates how many have each value. If some of the values are not as expected, view the test.res file to identify which switches have the undesirable values. +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opaswitchadmin 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opaswitchadmin + + +.PP + +\fB(Switch)\fR +Performs a number of multi-step initialization and verification operations against one or more externally managed Intel(R) Omni-Path switches. The operations include initial switch setup, firmware upgrades, chassis reboot, and others. +.SH Syntax +opaswitchadmin [-c] [-N \[aq]\fInodes\fR\[aq]] [-L \fInodefile\fR] [-O] [-P \fIpackages\fR] +.br +[-a \fIaction\fR] +[-t \fIportsfile\fR] [-p \fIports\fR] \fIoperation\fR ... +.SH Options + +.TP 10 +-help + +Produces full help text. + +.TP 10 +-c + +Overwrites result files from any previous run before starting this run. + +.TP 10 +-N \fInodes\fR + +Specifies the list of nodes to execute the operation against. + +.TP 10 +-L \fInodefile\fR + +Specifies the file with nodes in the cluster. Default is /etc/opa/switches file. + +.TP 10 +-P \fIpackages\fR + +For upgrades: Specifies the file name or directory where the firmware image is to install. For the directory specified, .emfw file in the directory tree is used. shell wild cards may also be used within quotes. + +.TP 10 +-t \fIportsfile\fR + +Specifies the file with list of local HFI ports used to access fabrics for switch access. Default is /etc/opa/ports file. + +.TP 10 +-p \fIports\fR + +Specifies the list of local HFI ports used to access fabrics for switch access. + +.IP +Default is first active port. The first HFI in the system is 1. The first port on an HFI is 1. Uses the format hfi:port, +.br +for example: +.RS +.TP 10 + +.sp +0:0 +First active port in system. + +.RE + +.RS +.TP 10 + +.sp +0:y +Port \fIy\fR within system. + +.RE + +.RS +.TP 10 + +.sp +x:0 +First active port on HFI \fIx\fR. + +.RE + +.RS +.TP 10 + +.sp +x:y +HFI \fIx\fR, port \fIy\fR. + +.RE + +.TP 10 +-a \fIaction\fR + +Specifies an action for firmware file for switch upgrade. The action argument can be one or more of the following: + +.RS +.TP 10 + +.sp +select +Ensures firmware is in primary (Default). + +.RE + +.RS +.TP 10 + +.sp +run +Ensures firmware is in primary and running. + +.RE + +.TP 10 +-O + +Specifies the override for firmware upgrades, bypasses the previous firmware version checks, and forces the update unconditionally. + +.TP 10 +\fIoperation\fR + +Performs the specified \fIoperation\fR, which can be one or more of the following: + +.RS +.TP 10 + +.sp +reboot +Reboots switches, ensures they go down and come back. + +.RE + +.RS +.TP 10 + +.sp +configure +Runs wizard to set up switch configuration. + +.TP 10 +.BR + +.PP + +.B NOTE: +You must reboot the switch for any new settings to be applied. + +.RE + +.RS +.TP 10 + +.sp +upgrade +Upgrades installation of all switches. + +.RE + +.RS +.TP 10 + +.sp +info +Reports firmware and hardware version, part number, and data rate capability of all nodes. + +.RE + +.RS +.TP 10 + +.sp +hwvpd +Completes hardware Vital Product Data (VPD) report of all nodes. + +.RE + +.RS +.TP 10 + +.sp +ping +Pings all nodes and tests for presence. + +.RE + +.RS +.TP 10 + +.sp +fwverify +Reports integrity of failsafe firmware of all nodes. + +.RE + +.RS +.TP 10 + +.sp +getconfig +Gets port configurations of an externally managed switch. + +.RE + +.PP +For more information on operations, see +\fIOperation Details\fR +. +.SH Example +opaswitchadmin -c reboot +.br + +opaswitchadmin -P /root/ChassisFw \fIX.X.X.X.X\fR upgrade +.br + +opaswitchadmin -a run -P \[aq]*.emfw\[aq] upgrade +.SH Environment Variables + +.PP +The following environment variables are also used by this command: +.TP 10 +\fBOPASWITCHES\fR + +List of nodes, used in absence of -N and -L options. + +.TP 10 +\fBOPASWITCHES\(ulFILE\fR + +File containing list of nodes, used in absence of -N and -L options. + +.TP 10 +\fBFF\(ulMAX\(ulPARALLEL\fR + +Maximum concurrent operations. + +.TP 10 +\fBFF\(ulSERIALIZE\(ulOUTPUT\fR + +Serialize output of parallel operations (yes or no). + +.TP 10 +\fBFF\(ulTIMEOUT\(ulMULT\fR + +Multiplier for all timeouts associated with this command. Used if the systems are slow for some reason. + +.SH Details + +.PP +opaswitchadmin provides detailed logging of its results. During each run, the following files are produced: +.IP \(bu +test.res : Appended with summary results of run. +.IP \(bu +test.log : Appended with detailed results of run. +.IP \(bu +save\(ultmp/ : Contains a directory per failed test with detailed logs. +.IP \(bu +test\(ultmp*/ : Intermediate result files while test is running. +.PP +The -c option removes all log files. +.PP +Results from opaswitchadmin are grouped into test suites, test cases, and test items. A given run of opaswitchadmin represents a single test suite. Within a test suite, multiple test cases occur; typically one test case per chassis being operated on. Some of the more complex operations may have multiple test items per test case. Each test item represents a major step in the overall test case. +.PP +Each opaswitchadmin run appends to test.res and test.log and creates temporary files in test\(ultmp$PID in the current directory. the test.res file provides an overall summary of operations performed and their results. The same information is also displayed while opaswitchadmin is executing. test.log contains detailed information about what was performed, including the specific commands executed and the resulting output. The test\(ultmp directories contain temporary files that reflect tests in progress (or killed). The logs for any failures are logged in the save\(ultemp directory with a directory per failed test case. If the same test case fails more than once, save\(ultemp retains the information from the first failure. Subsequent runs of opaswitchadmin are appended to test.log. Intel recommends reviewing failures and using the -c option to remove old logs before subsequent runs of opaswitchadmin. opaswitchadmin also appends to punchlist.csv for failing switches. +.PP +opaswitchadmin implicitly performs its operations in parallel. However, as for the other tools, \fBFF\(ulMAX\(ulPARALLEL\fR can be exported to change the degree of parallelism. 1000 parallel operations is the default. + +.SH Operation Details + +.PP + +\fB(Switch)\fR +All operations against Intel(R) Omni-Path Fabric externally-managed switches (except ping) securely access the selected switches. If a password has been set, the -S option must be used to securely prompt for a password. In this case, the same password is used for all switches. +.TP 10 +reboot + +Reboots the given switches. + +.IP +Use the \fBFF\(ulMAX\(ulPARALLEL\fR value to select either a rolling reboot or a parallel reboot. In most cases, a parallel reboot is recommended for expediency. +.TP 10 +upgrade + +Upgrades the firmware on each specified switch. The -P option selects a directory containing a .emfw file or provides an explicit .emfw file for the switches. If more than one .emfw file is specified, the operation is undefined. The -a option selects the desired minimal state for the new firmware. Only the select and run options are valid for this operation. + +.IP +When the -a option specifies run, switches are rebooted. Use the \fBFF\(ulMAX\(ulPARALLEL\fR value to select a rolling upgrade or a parallel upgrade. In most cases, a parallel upgrade is recommended for expediency. +.IP +The upgrade process also sets the switch name. +.IP +The upgrade process is used to set, clear, or change the password of the switches using the -s option. When this option is specified, you are prompted for a new password to be set on the switches. To reset (clear) the password, press Enter when prompted. This option can be used to configure the switches to not require a password for subsequent operations. A change to the password does not take effect until the next reboot of the switch. +.IP +For more information about switch firmware, refer to the +\fIIntel(R) Omni-Path Fabric Switches GUI User Guide\fR + +and +\fIIntel(R) Omni-Path Fabric Switches Release Notes\fR + +. +.TP 10 +configure + +Runs the switch setup wizard, which asks a series of questions. Once the wizard has finished prompting for configuration information, all the selected switches are configured according to the entered responses. The following items are configurable for all Intel(R) Omni-Path Switch 100 Series : + +.RS + +.IP \(bu +FM Enabled +.IP \(bu +Link CRC Mode +.IP \(bu +Link Width Supported +.IP \(bu +OPA Node Description + +.RE + +.TP 10 +.BR + +.PP + +.B NOTE: +Typically, the Node Description is updated automatically during a firmware upgrade, if it is configured properly in the switches file. Updating the node description is also available using the configure option without performing a firmware upgrade. + +.TP 10 +.BR + +.PP + +.B NOTE: +You must reboot the switch for any new settings to be applied. + +.TP 10 +info + +Queries the switches and displays the following information: + +.RS + +.IP \(bu +Firmware version +.IP \(bu +Hardware version +.IP \(bu +Hardware part number, including revision information +.IP \(bu +Speed capability +.IP \(bu +Fan status +.IP \(bu +Power supply status + +.RE + +.IP +This operation also outputs a summary of various configuration settings for each switch within a fabric. +.TP 10 +hwvpd + +Queries the switches and displays the Vital Product Data (VPD) including: + +.RS + +.IP \(bu +Serial number +.IP \(bu +Part number +.IP \(bu +Model name +.IP \(bu +Hardware version +.IP \(bu +Manufacturer +.IP \(bu +Product description +.IP \(bu +Manufacturer ID +.IP \(bu +Manufacture date +.IP \(bu +Manufacture time + +.RE + +.TP 10 +ping + +Issues an inband packet to the switches to test for presence and reports on presence/non-presence of each selected switch. + +.TP 10 +.BR + +.PP + +.B NOTE: +It is not necessary to supply a password (using -S) for this operation. + +.TP 10 +fwverify + +Verifies the integrity of the firmware images in the EEPROMs of the selected switches. + +.TP 10 +getconfig + +Gets port configurations of an externally managed switch. This operation also outputs a summary of various configuration settings for each switch within a fabric. For example, in a fabric with seven switches, a report similar to the following is displayed. + +.IP +This summary helps determine if all switches have the same configuration, and if not, indicates how many have each value. If some of the values are not as expected, view the test.res file to identify which switches have the undesirable values. diff --git a/IbaTools/man/opatop.manPage b/IbaTools/man/opatop.manPage index 7f8e754..7ba2d4f 100644 --- a/IbaTools/man/opatop.manPage +++ b/IbaTools/man/opatop.manPage @@ -1,113 +1,108 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opatop 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opatop - -.NL - -.PP -Starts the Fabric Performance Monitor (opatop) Text-based User Interface (TUI) menu to display performance, congestion, and error information about a fabric. -.SH Syntax -.NL -opatop [-v] [-q] [-h \fIhfi\fR] [-p \fIport\fR] [--timeout] [-i \fIseconds\fR] -.SH Options -.NL - -.TP 10 ---help -.NL -Produces full help text. - -.TP 10 --v/--verbose level -.NL -Specifies the verbose output level. Value is additive and includes: -.RS -.TP 10 - -.sp -1 -Screen -.RE - -.RS -.TP 10 - -.sp -4 -STDERR opatop -.RE - -.RS -.TP 10 - -.sp -16 -STDERR PaClient -.RE - -.TP 10 --q/--quiet -.NL -Disables progress reports. -.TP 10 --h/--hfi \fIhfi\fR -.NL -Specifies the HFI, numbered 1..n. Using 0 specifies that the -p \fIport\fR port is a system-wide port number. Default is 0. - -.TP 10 --p/--port \fIport\fR -.NL -Specifies the port, numbered 1..n. Using 0 specifies the first active port. Default is 0. - -.TP 10 ---timeout -.NL -Specifies the timeout (response wait time) in ms. Default is 1000 ms. - -.TP 10 --i/--interval \fIseconds\fR -.NL -Interval in \fIseconds\fR at which PA queries are performed to refresh to the latest PA image. Default is 10 seconds. - -.NL - -.SH -h and -p options permit a variety of selections: -.NL - -.TP 10 --h 0 -.NL -First active port in system (Default). - -.TP 10 --h 0 -p 0 -.NL -First active port in system. - -.TP 10 --h \fIx\fR -.NL -First active port on HFI \fIx\fR. - -.TP 10 --h \fIx\fR \fI\fR-p 0 -.NL -First active port on HFI \fIx\fR. - -.TP 10 --h 0 -p \fIy\fR -.NL -Port \fIy\fR within system (no matter which ports are active). - -.TP 10 --h \fIx\fR \fI\fR-p \fIy\fR -.NL -HFI \fIx\fR, port \fIy\fR. +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opatop 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opatop + + +.PP +Starts the Fabric Performance Monitor (opatop) Text-based User Interface (TUI) menu to display performance, congestion, and error information about a fabric. +.SH Syntax +opatop [-v] [-q] [-h \fIhfi\fR] [-p \fIport\fR] [--timeout] [-i \fIseconds\fR] +.SH Options + +.TP 10 +--help + +Produces full help text. + +.TP 10 +-v/--verbose level + +Specifies the verbose output level. Value is additive and includes: +.RS +.TP 10 + +.sp +1 +Screen +.RE + +.RS +.TP 10 + +.sp +4 +STDERR opatop +.RE + +.RS +.TP 10 + +.sp +16 +STDERR PaClient +.RE + +.TP 10 +-q/--quiet + +Disables progress reports. +.TP 10 +-h/--hfi \fIhfi\fR + +Specifies the HFI, numbered 1..n. Using 0 specifies that the -p \fIport\fR port is a system-wide port number. Default is 0. + +.TP 10 +-p/--port \fIport\fR + +Specifies the port, numbered 1..n. Using 0 specifies the first active port. Default is 0. + +.TP 10 +--timeout + +Specifies the timeout (response wait time) in ms. Default is 1000 ms. + +.TP 10 +-i/--interval \fIseconds\fR + +Interval in \fIseconds\fR at which PA queries are performed to refresh to the latest PA image. Default is 10 seconds. + + +.SH -h and -p options permit a variety of selections: + +.TP 10 +-h 0 + +First active port in system (Default). + +.TP 10 +-h 0 -p 0 + +First active port in system. + +.TP 10 +-h \fIx\fR + +First active port on HFI \fIx\fR. + +.TP 10 +-h \fIx\fR \fI\fR-p 0 + +First active port on HFI \fIx\fR. + +.TP 10 +-h 0 -p \fIy\fR + +Port \fIy\fR within system (no matter which ports are active). + +.TP 10 +-h \fIx\fR \fI\fR-p \fIy\fR + +HFI \fIx\fR, port \fIy\fR. diff --git a/IbaTools/man/opauploadall.manPage b/IbaTools/man/opauploadall.manPage index aa3f68f..d731fd0 100644 --- a/IbaTools/man/opauploadall.manPage +++ b/IbaTools/man/opauploadall.manPage @@ -1,113 +1,116 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opauploadall 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opauploadall - -.NL - -.PP - -\fB(Linux)\fR -Copies one or more files from a group of hosts to this system. Since the file name is the same on each host, a separate directory on this system is created for each host and the file is copied to it. This is a convenient way to upload log files or configuration files for review. This tool can also be used in conjunction with opadownloadall to upload a host specific configuration file, edit it for each host, and download the new version to all the hosts. -.PP - -.B NOTE: -To copy files from this host to hosts in the cluster, use opascpall or opadownloadall. user@ style syntax cannot be used when specifying filenames. - -.SH Syntax -.NL -opauploadall [-rp] [-f \fIhostfile\fR] [-d \fIupload\(uldir\fR] [-h \[aq]\fIhosts\fR\[aq]] [-u \fIuser\fR] \fIsource\(ulfile\fR... \fIdest\(ulfile\fR -.SH Options -.NL - -.TP 10 ---help -.NL -Produces full help text. -.TP 10 --p -.NL -Performs copy in parallel on all hosts. -.TP 10 --r -.NL -Performs recursive upload of directories. -.TP 10 --f \fIhostfile\fR -.NL -Specifies the file with hosts in cluster. -.br -Default is /etc/opa/hosts file. -.TP 10 --h \fIhosts\fR -.NL -Specifies the list of hosts to upload from. -.TP 10 --u \fIuser\fR -.NL -Specifies the user to perform copy to. Default is current user code. -.TP 10 --d \fIupload\(uldir\fR -.NL -Specifies the directory to upload to. Default is uploads. If not specified, the environment variable \fBUPLOADS\(ulDIR\fR is used. If that is not exported, the default, /uploads, is used. -.TP 10 -\fIsource\(ulfile\fR -.NL -Specifies the name of files to copy to this system, relative to the current directory. Multiple files may be listed. -.TP 10 -\fIdest\(ulfile\fR -.NL -Specifies the name of the file or directory on this system to copy to. It is relative to \fIupload\(uldir\fR/\fIHOSTNAME\fR .A local directory within \fIupload\(uldir\fR/ is created for each hostname. - -.IP -Each uploaded file is copied to upload\(uldir/\fIHOSTNAME\fR/\fIdest\(ulfile\fR within the local system. -.IP -If more than one source file is specified or dest\(ulfile has a trailing / , a dest\(ulfile directory will be created. -.SH Example -.NL -# upload two files from 2 hosts -.br -opauploadall -h \[aq]arwen elrond\[aq] capture.tgz /etc/init.d/ipoib.cfg. -.br - -.br -# upload two files from all hosts -.br -opauploadall -p capture.tgz /etc/init.d/ipoib.cfg. -.br - -.br -# upload network config files from all hosts -.br -opauploadall capture.tgz /etc/init.d/ipoib.cfg pre-install -.SH Environment Variables -.NL - -.PP -The following environment variables are also used by this command: -.TP 10 -\fBHOSTS\fR -.NL -List of hosts; used if -h option not supplied. - -.TP 10 -\fBHOSTS\(ulFILE\fR -.NL -File containing list of hosts; used in absence of -f and -h. - -.TP 10 -\fBUPLOADS\(ulDIR\fR -.NL -Directory to upload to, used in absence of -d. - -.TP 10 -\fBFF\(ulMAX\(ulPARALLEL\fR -.NL -When the -p option is used, maximum concurrent operations are performed. +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opauploadall 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opauploadall + + +.PP + +\fB(Linux)\fR +Copies one or more files from a group of hosts to this system. Since the file name is the same on each host, a separate directory on this system is created for each host and the file is copied to it. This is a convenient way to upload log files or configuration files for review. This tool can also be used in conjunction with opadownloadall to upload a host specific configuration file, edit it for each host, and download the new version to all the hosts. +.PP + +.B NOTE: +To copy files from this host to hosts in the cluster, use opascpall or opadownloadall. user@ style syntax cannot be used when specifying filenames. + +.SH Syntax +opauploadall [-rp] [-f \fIhostfile\fR] [-d \fIupload\(uldir\fR] [-h \[aq]\fIhosts\fR\[aq]] [-u \fIuser\fR] +\fIsource\(ulfile\fR ... \fIdest\(ulfile\fR +.SH Options + +.TP 10 +--help + +Produces full help text. +.TP 10 +-p + +Performs copy in parallel on all hosts. +.TP 10 +-r + +Performs recursive upload of directories. +.TP 10 +-f \fIhostfile\fR + +Specifies the file with hosts in cluster. +.br +Default is /etc/opa/hosts file. +.TP 10 +-h \fIhosts\fR + +Specifies the list of hosts to upload from. +.TP 10 +-u \fIuser\fR + +Specifies the user to perform copy to. Default is current user code. +.TP 10 +-d \fIupload\(uldir\fR + +Specifies the directory to upload to. Default is uploads. If not specified, the environment variable \fBUPLOADS\(ulDIR\fR is used. If that is not exported, the default, /uploads, is used. +.TP 10 +\fIsource\(ulfile\fR + +Specifies the name of files to copy to this system, relative to the current directory. Multiple files may be listed. +.TP 10 +\fIdest\(ulfile\fR + +Specifies the name of the file or directory on this system to copy to. It is relative to \fIupload\(uldir\fR/\fIHOSTNAME\fR .A local directory within \fIupload\(uldir\fR/ is created for each hostname. + +.IP +Each uploaded file is copied to upload\(uldir/\fIHOSTNAME\fR/\fIdest\(ulfile\fR within the local system. +.IP +If more than one source file is specified or dest\(ulfile has a trailing / , a dest\(ulfile directory will be created. +.SH Example +# upload two files from 2 hosts +.br + +opauploadall -h \[aq]arwen elrond\[aq] capture.tgz /etc/init.d/ipoib.cfg. +.br + + +.br + +# upload two files from all hosts +.br + +opauploadall -p capture.tgz /etc/init.d/ipoib.cfg. +.br + + +.br + +# upload network config files from all hosts +.br + +opauploadall capture.tgz /etc/init.d/ipoib.cfg pre-install +.SH Environment Variables + +.PP +The following environment variables are also used by this command: +.TP 10 +\fBHOSTS\fR + +List of hosts; used if -h option not supplied. + +.TP 10 +\fBHOSTS\(ulFILE\fR + +File containing list of hosts; used in absence of -f and -h. + +.TP 10 +\fBUPLOADS\(ulDIR\fR + +Directory to upload to, used in absence of -d. + +.TP 10 +\fBFF\(ulMAX\(ulPARALLEL\fR + +When the -p option is used, maximum concurrent operations are performed. diff --git a/IbaTools/man/opaverifyhosts.manPage b/IbaTools/man/opaverifyhosts.manPage index a41cc9e..f92f204 100644 --- a/IbaTools/man/opaverifyhosts.manPage +++ b/IbaTools/man/opaverifyhosts.manPage @@ -1,117 +1,115 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opaverifyhosts 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opaverifyhosts - -.NL - -.PP -Verifies basic node configuration and performance by running FF\(ulHOSTVERIFY\(ulDIR/hostverify.sh on all specified hosts. -.PP - -.B NOTE: -Prior to using opaverifyhosts, copy the sample file /usr/share/opa/samples/hostverify.sh to FF\(ulHOSTVERIFY\(ulDIR and edit it to set the appropriate configuration and performance expectations and select which tests to run by default. On the first run for a given node, use the -c option so that hostverify.sh gets copied to each node. - -.PP -FF\(ulHOSTVERIFY\(ulDIR defines both the location of hostverify.sh and the destination of the hostverify.res output file. FF\(ulHOSTVERIFY\(ulDIR is configured in the /etc/opa/opafastfabric.conf file. -.PP -A summary of results is appended to the FF\(ulRESULT\(ulDIR/verifyhosts.res file. A punchlist of failures is also appended to the FF\(ulRESULT\(ulDIR/punchlist.csv file. Only failures are shown on stdout. - -.SH Syntax -.NL -opaverifyhosts [-kc] [-f \fIhostfile\fR] [-u \fIupload\(ulfile\fR] [-d \fIupload\(uldir\fR] -.br -[-h \fIhosts\fR] [-T \fItimelimit\fR] [-F \fIfilename\fR] [ \fItest\fR...] -.SH Options -.NL - -.TP 10 ---help -.NL -Produces full help text. - -.TP 10 --k -.NL -At start and end of verification, kills any existing hostverify or xhpl jobs on the hosts. - -.TP 10 --c -.NL -Copies hostverify.sh to hosts first, useful if you have edited it. - -.TP 10 --f \fIhostfile\fR -.NL -Specifies the file with hosts in cluster. -.br -Default is /etc/opa/hosts. - -.TP 10 --h \fIhosts\fR -.NL -Specifies the list of hosts to ping. - -.TP 10 --u \fIupload\(ulfile\fR -.NL -Specifies the filename to upload hostverify.res to after verification to allow backup and review of the detailed results for each node. The default upload destination file is hostverify.res. If -u \[aq]\[aq] is specified, no upload occurs. - -.TP 10 --d \fIupload\(uldir\fR -.NL -Specifies the directory to upload result from each host to. Default is uploads. - -.TP 10 --T \fItimelimit\fR -.NL -Specifies the time limit in seconds for host to complete tests. Default is 300 seconds (5 minutes). - -.TP 10 --F \fIfilename\fR -.NL -Specifies the filename of hostverify script to use. Default is /root/hostverify.sh. - -.TP 10 -\fItest\fR -.NL -Specifies one or more specific tests to run. See -.br -/usr/share/opa/samples/hostverify.sh for a list of available tests. - -.SH Examples -.NL -opaverifyhosts -c -.br -opaverifyhosts -h \[aq]arwen elrond\[aq] -.br -HOSTS=\[aq]arwen elrond\[aq] opaverifyhosts -.SH Environment Variables -.NL - -.TP 10 -\fBHOSTS\fR -.NL -List of hosts, used if -h option not supplied. - -.TP 10 -\fBHOSTS\(ulFILE\fR -.NL -File containing list of hosts, used in absence of -f and -h. - -.TP 10 -\fBUPLOADS\(ulDIR\fR -.NL -Directory to upload to, used in absence of -d. - -.TP 10 -\fBFF\(ulMAX\(ulPARALLEL\fR -.NL -Maximum concurrent operations. +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opaverifyhosts 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opaverifyhosts + + +.PP +Verifies basic node configuration and performance by running FF\(ulHOSTVERIFY\(ulDIR/hostverify.sh on all specified hosts. +.PP + +.B NOTE: +Prior to using opaverifyhosts, copy the sample file /usr/share/opa/samples/hostverify.sh to FF\(ulHOSTVERIFY\(ulDIR and edit it to set the appropriate configuration and performance expectations and select which tests to run by default. On the first run for a given node, use the -c option so that hostverify.sh gets copied to each node. + +.PP +FF\(ulHOSTVERIFY\(ulDIR defines both the location of hostverify.sh and the destination of the hostverify.res output file. FF\(ulHOSTVERIFY\(ulDIR is configured in the /etc/opa/opafastfabric.conf file. +.PP +A summary of results is appended to the FF\(ulRESULT\(ulDIR/verifyhosts.res file. A punchlist of failures is also appended to the FF\(ulRESULT\(ulDIR/punchlist.csv file. Only failures are shown on stdout. + +.SH Syntax +opaverifyhosts [-kc] [-f \fIhostfile\fR] [-u \fIupload\(ulfile\fR] [-d \fIupload\(uldir\fR] +.br + +[-h \fIhosts\fR] [-T \fItimelimit\fR] [-F \fIfilename\fR] [ \fItest\fR ...] +.SH Options + +.TP 10 +--help + +Produces full help text. + +.TP 10 +-k + +At start and end of verification, kills any existing hostverify or xhpl jobs on the hosts. + +.TP 10 +-c + +Copies hostverify.sh to hosts first, useful if you have edited it. + +.TP 10 +-f \fIhostfile\fR + +Specifies the file with hosts in cluster. +.br +Default is /etc/opa/hosts. + +.TP 10 +-h \fIhosts\fR + +Specifies the list of hosts to ping. + +.TP 10 +-u \fIupload\(ulfile\fR + +Specifies the filename to upload hostverify.res to after verification to allow backup and review of the detailed results for each node. The default upload destination file is hostverify.res. If -u \[aq]\[aq] is specified, no upload occurs. + +.TP 10 +-d \fIupload\(uldir\fR + +Specifies the directory to upload result from each host to. Default is uploads. + +.TP 10 +-T \fItimelimit\fR + +Specifies the time limit in seconds for host to complete tests. Default is 300 seconds (5 minutes). + +.TP 10 +-F \fIfilename\fR + +Specifies the filename of hostverify script to use. Default is /root/hostverify.sh. + +.TP 10 +\fItest\fR + +Specifies one or more specific tests to run. See +.br +/usr/share/opa/samples/hostverify.sh for a list of available tests. + +.SH Examples +opaverifyhosts -c +.br + +opaverifyhosts -h \[aq]arwen elrond\[aq] +.br + +HOSTS=\[aq]arwen elrond\[aq] opaverifyhosts +.SH Environment Variables + +.TP 10 +\fBHOSTS\fR + +List of hosts, used if -h option not supplied. + +.TP 10 +\fBHOSTS\(ulFILE\fR + +File containing list of hosts, used in absence of -f and -h. + +.TP 10 +\fBUPLOADS\(ulDIR\fR + +Directory to upload to, used in absence of -d. + +.TP 10 +\fBFF\(ulMAX\(ulPARALLEL\fR + +Maximum concurrent operations. diff --git a/IbaTools/man/opaxlattopology.manPage b/IbaTools/man/opaxlattopology.manPage index abcadf7..e58b6a7 100644 --- a/IbaTools/man/opaxlattopology.manPage +++ b/IbaTools/man/opaxlattopology.manPage @@ -1,268 +1,266 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opaxlattopology 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opaxlattopology - -.NL - -.PP -Generates a topology XML file of a cluster using your customized .csv, linksum\(ulswd06.csv, and linksum\(ulswd24.csv as input. The output topology XML file can be used to bring up and verify the cluster. -.PP - -.B NOTE: -The .csv input file must be present in the same directory from which the script operates, but the linksum CSV files are read from the /usr/share/opa/samples directory. - -.SH Syntax -.NL -opaxlattopology [-d \fIlevel\fR] [-v \fIlevel\fR] [-i \fIlevel\fR] [-K] [-s \fIhfi\(ulsuffix\fR] -.br -[source [dest]] -.SH Options -.NL - -.TP 10 ---help -.NL -Produces full help text. - -.TP 10 --d \fIlevel\fR -.NL -Specifies the output detail level. Default is 0. Levels are additive. - -.IP -By default, the top level is always produced. Switch, rack, and rack group topology files can be added to the output by choosing the appropriate level. If the output at the group or rack level is specified, then group or rack names must be provided in the spreadsheet. Detailed output can be specified in any combination. A directory for each topology XML file is created hierarchically, with group directories (if specified) at the highest level, followed by rack and switch directories (if specified). -.RS -.TP 10 - -.sp -1 -Intel(R) Omni-Path Edge Switch 100 Series topology files. - -.RE - -.RS -.TP 10 - -.sp -2 -Rack topology files. - -.RE - -.RS -.TP 10 - -.sp -4 -Rack group topology files. - -.RE - -.TP 10 --v \fIlevel\fR -.NL -Specifies the verbose level. Range is 0 - 8. Default is 2. - -.RS -.TP 10 - -.sp -0 -No output. - -.RE - -.RS -.TP 10 - -.sp -1 -Progress output. - -.RE - -.RS -.TP 10 - -.sp -2 -Reserved. - -.RE - -.RS -.TP 10 - -.sp -4 -Time stamps. - -.RE - -.RS -.TP 10 - -.sp -8 -Reserved. - -.RE - -.TP 10 --i \fIlevel\fR -.NL -Specifies the output indent level. Default is 4. - -.TP 10 --K -.NL -Specifies DO NOT clean temporary files. - -.IP -Prevents temporary files in each topology directory from being removed. Temporary files contain CSV formatted lists of links, HFIs, and switches used to create a topology XML file. Temporary files are not typically needed after a topology file is created, however they are used for creating linksum\(ulswd06.csv and linksum\(ulswd24.csv files, or can be retained for subsequent inspection or processing. -.TP 10 --s \fIhfi\(ulsuffix\fR -.NL -Used on Multi-Rail or Multi-Plane fabrics. Can be used to override the default hfi1\(ul0. - -.IP -For Multi-Plane fabric, use the tool multiple times with a different hfi-suffix. -.IP -For Multi-Rail fabric, specify HostName as "HostName HfiName" in the spreadsheet. -.TP 10 --o report -.NL -Specifies the report type for output. By default, all the sections are generated. - -.IP -Report Types: -.RS -.TP 10 - -.sp -brnodes -Creates the section xml for the csv input. - -.RE - -.RS -.TP 10 - -.sp -links -Creates the section xml for the csv input. - -.RE - -.TP 10 -source -.NL -Specifies the source csv file. Default is topology.csv. - -.TP 10 -dest -.NL -Specifies the output xml file. Default is topology.0:0.xml - -.IP -The default output file name may vary if used with -s option. It can also be used to specify destination folder. -.SH Description -.NL - -.PP -The opaxlattopology script reads your customized .csv file from the local directory, and reads the other files from /usr/share/opa/samples/linksum\(ulswd06.csv and /usr/share/opa/samples/linksum\(ulswd24.csv. Two sample topology XLSX files, detailed\(ultopology.xlsx and minimal\(ultopology.xlsx, are located in the /usr/share/opa/samples/ directory. You must create your .csv file by editing one of the sample spreadsheets and saving the Fabric Links tab as a CSV file. Inspect your .csv file to ensure that each row contains the correct and same number of comma separators. Any extraneous entries in the spreadsheet can cause the CSV output to have extra fields. -.PP -The script outputs one or more topology files starting with topology.0:0.xml. Your .csv input file must be present in the same directory from which the script operates, but the linksum CSV files are read from the /usr/share/opa/samples directory. -.SH Example -.NL -opaxlattopology -.br -# reads default input \[aq]topology.csv\[aq] and creates default -.br -# output \[aq]topology.0:0.xml\[aq] -.br - -.br -opaxlattopology fabric\(ul2.csv -.br -# reads input \[aq]fabric\(ul2.csv\[aq] and creates default output -.PP -Both sample files contain examples of links between HFI and Edge SW (rows 4-7), HFI and Core SW (rows 8-11), and Edge SW and Core SW (rows 12-15). -.SH Environment Variables -.NL - -.PP -The following environment variables allow user-specified MTU. -.TP 10 -\fBMTU\(ulSW\(ulSW\fR -.NL -If set, it overrides default MTU on switch-to-switch links. Default is 10240 - -.TP 10 -\fBMTU\(ulSW\(ulHFI\fR -.NL -If set, it overrides default MTU on switch-to-HFI links. Default is 10240 - -.SH Creating linksum Files -.NL - -.PP -The linksum\(ulswd06.csv and linksum\(ulswd24.csv files are provided as stand-alone files in the /usr/share/opa/samples directory. However, they can be recreated (or modified) from the spreadsheet, if needed, by performing the following steps: - -.IP 1) 4n -Save each of the following from your custom .xlsx file as individual .csv files: -.IP \(bu -Internal SWD06 Links tab as linksum\(ulswd06.csv -.IP \(bu -Internal SWD24 Links tab as linksum\(ulswd24.csv -.IP \(bu -Fabric Links tab as .csv - -.IP 2) 4n -For each saved .csv file, run the script with the -K option. - -.IP 3) 4n -Upon completion of the script, save the top level linksum.csv file as linksum\(ulswd06.csv or linksum\(ulswd24.csv as appropriate. - -.SH Multi-Rail and Multi-Plane Fabrics -.NL - -.PP -By default, the opaxlattopology script considers all of the hosts to have a single HFI (hfi1\(ul0). -.PP -For Multi-Rail/Multi-Plane fabrics, you have the following options: -.IP \(bu -For Multi-Rail fabrics or for a Single Plane fabric with some multi-ported hosts, you can edit the Host Name in your customized .csv file to include the HFI Name (for example: HostName HfiName) and then follow the standard procedure to generate .xml. -.IP \(bu -For a Multi-Plane fabric with identical planes, the tool can be run multiple times on the same .csv with different -s hfi\(ulsuffix options. -For example, if there are two identical fabrics (fabric\(ul1 and fabric\(ul2) connected to a single host with two HFIs (hfi1\(ul0 and hfi1\(ul1), the tool can be run twice like this: - -.IP \(bu -For fabric\(ul1: - -.br -opaxlattopology .csv .xml - -.br - - -.IP \(bu -For fabric\(ul2: - -.br -opaxlattopology -s hfi1\(ul1 .csv .xml - -.br - - - -.IP \(bu -For a fabric with both Multi-Rail and Multi-Plane segments, you can use a combination of the above techniques to generate the desired .xml file. +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opaxlattopology 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opaxlattopology + + +.PP +Generates a topology XML file of a cluster using your customized .csv, linksum\(ulswd06.csv, and linksum\(ulswd24.csv as input. The output topology XML file can be used to bring up and verify the cluster. +.PP + +.B NOTE: +The .csv input file must be present in the same directory from which the script operates, but the linksum CSV files are read from the /usr/share/opa/samples directory. + +.SH Syntax +opaxlattopology [-d \fIlevel\fR] [-v \fIlevel\fR] [-i \fIlevel\fR] [-K] [-s \fIhfi\(ulsuffix\fR] +.br + +[source [dest]] +.SH Options + +.TP 10 +--help + +Produces full help text. + +.TP 10 +-d \fIlevel\fR + +Specifies the output detail level. Default is 0. Levels are additive. + +.IP +By default, the top level is always produced. Switch, rack, and rack group topology files can be added to the output by choosing the appropriate level. If the output at the group or rack level is specified, then group or rack names must be provided in the spreadsheet. Detailed output can be specified in any combination. A directory for each topology XML file is created hierarchically, with group directories (if specified) at the highest level, followed by rack and switch directories (if specified). +.RS +.TP 10 + +.sp +1 +Intel(R) Omni-Path Edge Switch 100 Series topology files. + +.RE + +.RS +.TP 10 + +.sp +2 +Rack topology files. + +.RE + +.RS +.TP 10 + +.sp +4 +Rack group topology files. + +.RE + +.TP 10 +-v \fIlevel\fR + +Specifies the verbose level. Range is 0 - 8. Default is 2. + +.RS +.TP 10 + +.sp +0 +No output. + +.RE + +.RS +.TP 10 + +.sp +1 +Progress output. + +.RE + +.RS +.TP 10 + +.sp +2 +Reserved. + +.RE + +.RS +.TP 10 + +.sp +4 +Time stamps. + +.RE + +.RS +.TP 10 + +.sp +8 +Reserved. + +.RE + +.TP 10 +-i \fIlevel\fR + +Specifies the output indent level. Default is 4. + +.TP 10 +-K + +Specifies DO NOT clean temporary files. + +.IP +Prevents temporary files in each topology directory from being removed. Temporary files contain CSV formatted lists of links, HFIs, and switches used to create a topology XML file. Temporary files are not typically needed after a topology file is created, however they are used for creating linksum\(ulswd06.csv and linksum\(ulswd24.csv files, or can be retained for subsequent inspection or processing. +.TP 10 +-s \fIhfi\(ulsuffix\fR + +Used on Multi-Rail or Multi-Plane fabrics. Can be used to override the default hfi1\(ul0. + +.IP +For Multi-Plane fabric, use the tool multiple times with a different hfi-suffix. +.IP +For Multi-Rail fabric, specify HostName as "HostName HfiName" in the spreadsheet. +.TP 10 +-o report + +Specifies the report type for output. By default, all the sections are generated. + +.IP +Report Types: +.RS +.TP 10 + +.sp +brnodes +Creates the section xml for the csv input. + +.RE + +.RS +.TP 10 + +.sp +links +Creates the section xml for the csv input. + +.RE + +.TP 10 +source + +Specifies the source csv file. Default is topology.csv. + +.TP 10 +dest + +Specifies the output xml file. Default is topology.0:0.xml + +.IP +The default output file name may vary if used with -s option. It can also be used to specify destination folder. +.SH Description + +.PP +The opaxlattopology script reads your customized .csv file from the local directory, and reads the other files from /usr/share/opa/samples/linksum\(ulswd06.csv and /usr/share/opa/samples/linksum\(ulswd24.csv. Two sample topology XLSX files, detailed\(ultopology.xlsx and minimal\(ultopology.xlsx, are located in the /usr/share/opa/samples/ directory. You must create your .csv file by editing one of the sample spreadsheets and saving the Fabric Links tab as a CSV file. Inspect your .csv file to ensure that each row contains the correct and same number of comma separators. Any extraneous entries in the spreadsheet can cause the CSV output to have extra fields. +.PP +The script outputs one or more topology files starting with topology.0:0.xml. Your .csv input file must be present in the same directory from which the script operates, but the linksum CSV files are read from the /usr/share/opa/samples directory. +.SH Example +opaxlattopology +.br + +# reads default input \[aq]topology.csv\[aq] and creates default +.br + +# output \[aq]topology.0:0.xml\[aq] +.br + + +.br + +opaxlattopology fabric\(ul2.csv +.br + +# reads input \[aq]fabric\(ul2.csv\[aq] and creates default output +.PP +Both sample files contain examples of links between HFI and Edge SW (rows 4-7), HFI and Core SW (rows 8-11), and Edge SW and Core SW (rows 12-15). +.SH Environment Variables + +.PP +The following environment variables allow user-specified MTU. +.TP 10 +\fBMTU\(ulSW\(ulSW\fR + +If set, it overrides default MTU on switch-to-switch links. Default is 10240 + +.TP 10 +\fBMTU\(ulSW\(ulHFI\fR + +If set, it overrides default MTU on switch-to-HFI links. Default is 10240 + +.SH Creating linksum Files + +.PP +The linksum\(ulswd06.csv and linksum\(ulswd24.csv files are provided as stand-alone files in the /usr/share/opa/samples directory. However, they can be recreated (or modified) from the spreadsheet, if needed, by performing the following steps: + +.IP 1) 4n +Save each of the following from your custom .xlsx file as individual .csv files: +.IP \(bu +Internal SWD06 Links tab as linksum\(ulswd06.csv +.IP \(bu +Internal SWD24 Links tab as linksum\(ulswd24.csv +.IP \(bu +Fabric Links tab as .csv + +.IP 2) 4n +For each saved .csv file, run the script with the -K option. + +.IP 3) 4n +Upon completion of the script, save the top level linksum.csv file as linksum\(ulswd06.csv or linksum\(ulswd24.csv as appropriate. + +.SH Multi-Rail and Multi-Plane Fabrics + +.PP +By default, the opaxlattopology script considers all of the hosts to have a single HFI (hfi1\(ul0). +.PP +For Multi-Rail/Multi-Plane fabrics, you have the following options: +.IP \(bu +For Multi-Rail fabrics or for a Single Plane fabric with some multi-ported hosts, you can edit the Host Name in your customized .csv file to include the HFI Name (for example: HostName HfiName) and then follow the standard procedure to generate .xml. +.IP \(bu +For a Multi-Plane fabric with identical planes, the tool can be run multiple times on the same .csv with different -s hfi\(ulsuffix options. +For example, if there are two identical fabrics (fabric\(ul1 and fabric\(ul2) connected to a single host with two HFIs (hfi1\(ul0 and hfi1\(ul1), the tool can be run twice like this: + +.IP \(bu +For fabric\(ul1: + +.br +opaxlattopology .csv .xml + +.br + + +.IP \(bu +For fabric\(ul2: + +.br +opaxlattopology -s hfi1\(ul1 .csv .xml + +.br + + + +.IP \(bu +For a fabric with both Multi-Rail and Multi-Plane segments, you can use a combination of the above techniques to generate the desired .xml file. diff --git a/IbaTools/man/opaxmlextract.manPage b/IbaTools/man/opaxmlextract.manPage index 3bf634a..a2bde78 100644 --- a/IbaTools/man/opaxmlextract.manPage +++ b/IbaTools/man/opaxmlextract.manPage @@ -1,191 +1,202 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opaxmlextract 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opaxmlextract - -.NL - -.PP - -\fB(Linux)\fR -Extracts element values from XML input and outputs the data in CSV format. opaxmlextract is intended to be used with opareport, to parse and filter its XML output, and to allow the filtered output to be imported into other tools such as spreadsheets and customer-written scripts. opaxmlextract can also be used with any well-formed XML stream to extract element values into a delimited format. -.PP -Five sample scripts are available as prototypes for customized scripts. They combine various calls to opareport with a call to opaxmlextract with commonly used parameters. -.SH Syntax -.NL -opaxmlextract [-v][-H][-d \fIdelimiter\fR][-e \fIextract\(ulelement\fR] -.br -[-s \fIsuppress\(ulelement\fR][-X \fIinput\(ulfile\fR] [-P \fIparam\(ulfile\fR] -.SH Options -.NL - -.TP 10 ---help -.NL -Produces full help text. - -.TP 10 --v/--verbose -.NL -Produces verbose output. Includes output progress reports during extraction and output prepended wildcard characters on element names in output header record. - -.TP 10 --H/--noheader -.NL -Does not output element name header record. - -.TP 10 --d/--delimit \fIdelimiter\fR -.NL -Uses single character or string as the delimiter between element names and element values. Default is semicolon. - -.TP 10 --e/--extract \fIextract\(ulelement\fR -.NL -Specifies the name of the XML element to extract. Elements can be nested in any order, but are output in the order specified. Elements can be specified multiple times, with a different attribute name or attribute value. An optional attribute (or attribute and value) can also be specified with elements: - -.RS - -.IP \(bu --e \fIelement\fR -.IP \(bu --e \fIelement:attrName\fR -.IP \(bu --e \fIelement:attrName:attrValue\fR - -.RE - -.TP 10 -.BR - -.PP - -.B NOTE: - -.RS - -.IP \(bu -Elements can be compound values separated by a dot. For example, Switches.Node is a Node element contained within a Switches element. -.IP \(bu -To output the attribute value as opposed to the element value, a specification such as -e FIs.Node:id can be used. This will return the value of the id attribute of any Node elements within FIs element. -.IP \(bu -If desired, a specific element can be selected by its attribute value, such as -e MulticastFDB.Value:LID:0xc000 which will return the value of the Value element within Multicast FDB element where the Value element has an attribute of LID with a value of 0xc000. -.IP \(bu -A given element can be specified multiple times each with a different AttrName or attrValue. - -.RE - - -.TP 10 --s/--suppress \fIsuppress\(ulelement\fR -.NL -Specifies the name of the XML element to suppress extraction. Can be used multiple times (in any order). Supports the same syntax as -e. - -.TP 10 --X/--infile \fIinput\(ulfile\fR -.NL -Parses XML from \fIinput\(ulfile\fR. - -.TP 10 --P/--pfile \fIparam\(ulfile\fR -.NL -Reads command parameters from param\(ulfile. - -.SH Example -.NL - -.PP -Here is an example of opareport output filtered by opaxmlextract : -.PP - -.br -# opareport -o comps -s -x | opaxmlextract -d \; -e NodeDesc -.br --e SystemImageGUID -e NumPorts -s Neighbor -.br -Getting All Node Records... -.br -Done Getting All Node Records -.br -Done Getting All Link Records -.br -Done Getting All Cable Info Records -.br -Done Getting All SM Info Records -.br -Getting All Port Counters... -.br -Done Getting All Port Counters -.br -NodeDesc;SystemImageGUID;NumPorts -.br -phs1fnivd13u07n4 hfi1\(ul0;0x00117501016033c7;1 -.br -phs1fnivd13u07n2 hfi1\(ul0;0x00117501016033ef;1 -.br -phs1fnivd13u07n1 hfi1\(ul0;0x001175010160347a;1 -.br -phs1fnivd13u07n3 hfi1\(ul0;0x0011750101603593;1 -.br -phs1swivd13u21;0x00117501ff6a5619;48 -.br -phs1fnivd13u07n1 hfi1\(ul0;; -.br - - -.br - -.SH Details -.NL - -.PP -opaxmlextract is a flexible and powerful tool to process an XML stream. The tool: -.IP \(bu -Requires no specific element names to be present in the XML. -.IP \(bu -Assumes no hierarchical relationship between elements. -.IP \(bu -Allows extracted element values to be output in any order. -.IP \(bu -Allows an element\[aq]s value to be extracted only in the context of another specified element. -.IP \(bu -Allows extraction to be suppressed during the scope of specified elements. -.PP -opaxmlextract takes the XML input stream from either stdin or a specified input file. opaxmlextract does not use or require a connection to a fabric. -.PP -opaxmlextract works from two lists of elements supplied as command line or input parameters. The first is a list of elements whose values are to be extracted, called extraction elements. The second is a list of elements for which extraction is to be suppressed, called suppression elements. When an extraction element is encountered and extraction is not suppressed, the value of the element is extracted for later output in an extraction record. An extraction record contains a value for all extraction elements, including those which have a null value. -.PP -When a suppression element is encountered, then no extraction is performed during the extent of that element, from start through end. Suppression is maintained for elements specified inside the suppression element, including elements which may happen to match extraction elements. Suppression can be used to prevent extraction in sections of XML that are present, but not of current interest. For example, NodeDesc or NodeGUID inside a Neighbor specification of opareport. -.PP -opaxmlextract attempts to generate extraction records with data values that are valid at the same time. Specifying extraction elements that are valid in the same scope produces a single record for each group of extraction elements. However, mixing extraction elements from different scopes (including different XML levels) may cause opaxmlextract to produce multiple records. -.PP -opaxmlextract outputs an extraction record under the following conditions: -.IP \(bu -One or more extraction elements containing a non-null value go out of scope (that is, the element containing the extraction elements is ended) and a record containing the element values has not already been output. -.IP \(bu -A new and different value is specified for an extraction element and an extraction record containing the previous value has not already been output. -.PP -Element names (extraction or suppression) can be made context-sensitive with an enclosing element name using the syntax element1.element2. In this case, element2 is extracted (or extraction is suppressed) only when element2 is enclosed by element1. -.PP -The syntax also allows \[aq] * \[aq] to be specified as a wildcard. In this case, *.element3 specifies element3 enclosed by any element or sequence of elements (for example, element1.element3 or element1.element2.element3). Similarly, element1.*.element3 specifies element3 enclosed by element1 with any number of (but at least 1) intermediate elements. -.PP -opaxmlextract prepends any entered element name not containing a \[aq] * \[aq] (anywhere) with \[aq] *. \[aq], matching the element regardless of the enclosing elements. -.PP - -.B NOTE: -Any element names that include a wildcard should be quoted to the shell attempting to wildcard match against filenames. - - -.PP -At the beginning of operation, opaxmlextract, by default, outputs a delimited header record containing the names of the extraction elements. The order of the names is the same as specified on the command line and is the same order as that of the extraction record. Output of the header record can be disabled with the -H option. By default, element names are shown as they were entered on the command line. The -v option causes element names to be output as they are used during extraction, with any prepended wildcard characters. -.PP -Options (parameters) to opaxmlextract can be specified on the command line, with a parameter file, or using both methods. A parameter file is specified with -P \fIparam\(ulfile\fR. When a parameter file specification is encountered on the command line, option processing on the command line is suspended, the parameter file is read and processed entirely, and then command line processing is resumed. -.PP -Option syntax within a parameter file is the same as on the command line. Multiple parameter file specifications can be made, on the command line or within other parameter files. At each point that a parameter file is specified, current option processing is suspended while the parameter file is processed, then resumed. Options are processed in the order they are encountered on the command line or in parameter files. A parameter file can be up to 8192 bytes in size and may contain up to 512 parameters. +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opaxmlextract 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opaxmlextract + + +.PP + +\fB(Linux)\fR +Extracts element values from XML input and outputs the data in CSV format. opaxmlextract is intended to be used with opareport, to parse and filter its XML output, and to allow the filtered output to be imported into other tools such as spreadsheets and customer-written scripts. opaxmlextract can also be used with any well-formed XML stream to extract element values into a delimited format. +.PP +Five sample scripts are available as prototypes for customized scripts. They combine various calls to opareport with a call to opaxmlextract with commonly used parameters. +.SH Syntax +opaxmlextract [-v][-H][-d \fIdelimiter\fR][-e \fIextract\(ulelement\fR] +.br + +[-s \fIsuppress\(ulelement\fR][-X \fIinput\(ulfile\fR] [-P \fIparam\(ulfile\fR] +.SH Options + +.TP 10 +--help + +Produces full help text. + +.TP 10 +-v/--verbose + +Produces verbose output. Includes output progress reports during extraction and output prepended wildcard characters on element names in output header record. + +.TP 10 +-H/--noheader + +Does not output element name header record. + +.TP 10 +-d/--delimit \fIdelimiter\fR + +Uses single character or string as the delimiter between element names and element values. Default is semicolon. + +.TP 10 +-e/--extract \fIextract\(ulelement\fR + +Specifies the name of the XML element to extract. Elements can be nested in any order, but are output in the order specified. Elements can be specified multiple times, with a different attribute name or attribute value. An optional attribute (or attribute and value) can also be specified with elements: + +.RS + +.IP \(bu +-e \fIelement\fR +.IP \(bu +-e \fIelement:attrName\fR +.IP \(bu +-e \fIelement:attrName:attrValue\fR + +.RE + +.TP 10 +.BR + +.PP + +.B NOTE: + +.RS + +.IP \(bu +Elements can be compound values separated by a dot. For example, Switches.Node is a Node element contained within a Switches element. +.IP \(bu +To output the attribute value as opposed to the element value, a specification such as -e FIs.Node:id can be used. This will return the value of the id attribute of any Node elements within FIs element. +.IP \(bu +If desired, a specific element can be selected by its attribute value, such as -e MulticastFDB.Value:LID:0xc000 which will return the value of the Value element within Multicast FDB element where the Value element has an attribute of LID with a value of 0xc000. +.IP \(bu +A given element can be specified multiple times each with a different AttrName or attrValue. + +.RE + + +.TP 10 +-s/--suppress \fIsuppress\(ulelement\fR + +Specifies the name of the XML element to suppress extraction. Can be used multiple times (in any order). Supports the same syntax as -e. + +.TP 10 +-X/--infile \fIinput\(ulfile\fR + +Parses XML from \fIinput\(ulfile\fR. + +.TP 10 +-P/--pfile \fIparam\(ulfile\fR + +Reads command parameters from param\(ulfile. + +.SH Example + +.PP +Here is an example of opareport output filtered by opaxmlextract : +.PP + +.br +# opareport -o comps -s -x | opaxmlextract -d \; -e NodeDesc +.br + +-e SystemImageGUID -e NumPorts -s Neighbor +.br + +Getting All Node Records... +.br + +Done Getting All Node Records +.br + +Done Getting All Link Records +.br + +Done Getting All Cable Info Records +.br + +Done Getting All SM Info Records +.br + +Getting All Port Counters... +.br + +Done Getting All Port Counters +.br + +NodeDesc;SystemImageGUID;NumPorts +.br + +phs1fnivd13u07n4 hfi1\(ul0;0x00117501016033c7;1 +.br + +phs1fnivd13u07n2 hfi1\(ul0;0x00117501016033ef;1 +.br + +phs1fnivd13u07n1 hfi1\(ul0;0x001175010160347a;1 +.br + +phs1fnivd13u07n3 hfi1\(ul0;0x0011750101603593;1 +.br + +phs1swivd13u21;0x00117501ff6a5619;48 +.br + +phs1fnivd13u07n1 hfi1\(ul0;; +.br + + +.br + +.SH Details + +.PP +opaxmlextract is a flexible and powerful tool to process an XML stream. The tool: +.IP \(bu +Requires no specific element names to be present in the XML. +.IP \(bu +Assumes no hierarchical relationship between elements. +.IP \(bu +Allows extracted element values to be output in any order. +.IP \(bu +Allows an element\[aq]s value to be extracted only in the context of another specified element. +.IP \(bu +Allows extraction to be suppressed during the scope of specified elements. +.PP +opaxmlextract takes the XML input stream from either stdin or a specified input file. opaxmlextract does not use or require a connection to a fabric. +.PP +opaxmlextract works from two lists of elements supplied as command line or input parameters. The first is a list of elements whose values are to be extracted, called extraction elements. The second is a list of elements for which extraction is to be suppressed, called suppression elements. When an extraction element is encountered and extraction is not suppressed, the value of the element is extracted for later output in an extraction record. An extraction record contains a value for all extraction elements, including those which have a null value. +.PP +When a suppression element is encountered, then no extraction is performed during the extent of that element, from start through end. Suppression is maintained for elements specified inside the suppression element, including elements which may happen to match extraction elements. Suppression can be used to prevent extraction in sections of XML that are present, but not of current interest. For example, NodeDesc or NodeGUID inside a Neighbor specification of opareport. +.PP +opaxmlextract attempts to generate extraction records with data values that are valid at the same time. Specifying extraction elements that are valid in the same scope produces a single record for each group of extraction elements. However, mixing extraction elements from different scopes (including different XML levels) may cause opaxmlextract to produce multiple records. +.PP +opaxmlextract outputs an extraction record under the following conditions: +.IP \(bu +One or more extraction elements containing a non-null value go out of scope (that is, the element containing the extraction elements is ended) and a record containing the element values has not already been output. +.IP \(bu +A new and different value is specified for an extraction element and an extraction record containing the previous value has not already been output. +.PP +Element names (extraction or suppression) can be made context-sensitive with an enclosing element name using the syntax element1.element2. In this case, element2 is extracted (or extraction is suppressed) only when element2 is enclosed by element1. +.PP +The syntax also allows \[aq] * \[aq] to be specified as a wildcard. In this case, *.element3 specifies element3 enclosed by any element or sequence of elements (for example, element1.element3 or element1.element2.element3). Similarly, element1.*.element3 specifies element3 enclosed by element1 with any number of (but at least 1) intermediate elements. +.PP +opaxmlextract prepends any entered element name not containing a \[aq] * \[aq] (anywhere) with \[aq] *. \[aq], matching the element regardless of the enclosing elements. +.PP + +.B NOTE: +Any element names that include a wildcard should be quoted to the shell attempting to wildcard match against filenames. + + +.PP +At the beginning of operation, opaxmlextract, by default, outputs a delimited header record containing the names of the extraction elements. The order of the names is the same as specified on the command line and is the same order as that of the extraction record. Output of the header record can be disabled with the -H option. By default, element names are shown as they were entered on the command line. The -v option causes element names to be output as they are used during extraction, with any prepended wildcard characters. +.PP +Options (parameters) to opaxmlextract can be specified on the command line, with a parameter file, or using both methods. A parameter file is specified with -P \fIparam\(ulfile\fR. When a parameter file specification is encountered on the command line, option processing on the command line is suspended, the parameter file is read and processed entirely, and then command line processing is resumed. +.PP +Option syntax within a parameter file is the same as on the command line. Multiple parameter file specifications can be made, on the command line or within other parameter files. At each point that a parameter file is specified, current option processing is suspended while the parameter file is processed, then resumed. Options are processed in the order they are encountered on the command line or in parameter files. A parameter file can be up to 8192 bytes in size and may contain up to 512 parameters. diff --git a/IbaTools/man/opaxmlfilter.manPage b/IbaTools/man/opaxmlfilter.manPage index 5c00d7e..12c8fed 100644 --- a/IbaTools/man/opaxmlfilter.manPage +++ b/IbaTools/man/opaxmlfilter.manPage @@ -1,56 +1,53 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opaxmlfilter 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opaxmlfilter - -.NL - -.PP -Processes an XML file and removes all specified XML tags. The remaining tags are output and indentation can also be reformatted. opaxmlfilter is the opposite of opaxmlextract. -.SH Syntax -.NL -opaxmlfilter [-t|-k] [-l] [-i \fIindent\fR] [-s \fIelement\fR] \fI[input\(ulfile]\fR -.SH Options -.NL - -.TP 10 ---help -.NL -Produces full help text. - -.TP 10 --t -.NL -Trims leading and trailing whitespace in tag contents. - -.TP 10 --k -.NL -In tags with purely whitespace that contain newlines, keeps newlines as-is. Default is to format as an empty list. - -.TP 10 --l -.NL -Adds comments with line numbers after each end tag. This can make comparison of resulting files easier since original line numbers are available. - -.TP 10 --i \fIindent\fR -.NL -Sets indentation to use per level. Default is 4. - -.TP 10 --s \fIelement\fR -.NL -Specifies the name of the XML element to suppress. Can be used multiple times (maximum of 100) in any order. - -.TP 10 -\fIinput\(ulfile\fR -.NL -Specifies the XML file to read. Default is stdin. +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opaxmlfilter 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opaxmlfilter + + +.PP +Processes an XML file and removes all specified XML tags. The remaining tags are output and indentation can also be reformatted. opaxmlfilter is the opposite of opaxmlextract. +.SH Syntax +opaxmlfilter [-t|-k] [-l] [-i \fIindent\fR] [-s \fIelement\fR] \fI[input\(ulfile]\fR +.SH Options + +.TP 10 +--help + +Produces full help text. + +.TP 10 +-t + +Trims leading and trailing whitespace in tag contents. + +.TP 10 +-k + +In tags with purely whitespace that contain newlines, keeps newlines as-is. Default is to format as an empty list. + +.TP 10 +-l + +Adds comments with line numbers after each end tag. This can make comparison of resulting files easier since original line numbers are available. + +.TP 10 +-i \fIindent\fR + +Sets indentation to use per level. Default is 4. + +.TP 10 +-s \fIelement\fR + +Specifies the name of the XML element to suppress. Can be used multiple times (maximum of 100) in any order. + +.TP 10 +\fIinput\(ulfile\fR + +Specifies the XML file to read. Default is stdin. diff --git a/IbaTools/man/opaxmlgenerate.manPage b/IbaTools/man/opaxmlgenerate.manPage index d72db3a..fd0f8ad 100644 --- a/IbaTools/man/opaxmlgenerate.manPage +++ b/IbaTools/man/opaxmlgenerate.manPage @@ -1,109 +1,103 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opaxmlgenerate 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opaxmlgenerate - -.NL - -.PP - -\fB(Linux)\fR -Takes comma-separated-values (CSV) data as input and generates sequences of XML containing user-specified element names and element values within start and end tag specifications. Use this tool to create an XML representation of fabric data from its CSV form. -.SH Syntax -.NL -opaxmlgenerate [-v] [-d \fIdelimiter\fR] [-i \fInumber\fR] [-g \fIelement\fR] -.br -[-h \fIelement\fR] [-e \fIelement\fR] [-X \fIinput\(ulfile\fR] [-P \fIparam\(ulfile\fR] -.SH Options -.NL - -.TP 10 ---help -.NL -Produces full help text. - -.TP 10 --g/--generate \fIelement\fR -.NL -Generates value for \fIelement\fR using value in next field from the input file. Can be used multiple times on the command line. Values are assigned to elements in order. - -.TP 10 --h/--header \fIelement\fR -.NL -Name of the XML element that is the enclosing header start tag. - -.TP 10 --e/--end \fIelement\fR -.NL -Name of the XML element that is the enclosing header end tag. - -.TP 10 --d/--delimit \fIdelimiter\fR -.NL -Specifies the delimiter character that separates values in the input file. Default is semicolon. - -.TP 10 --i/--indent \fInumber\fR -.NL -Number of spaces to indent each level of XML output. Default is 0. - -.TP 10 --X/--infile \fIinput\(ulfile\fR -.NL -Generates XML from CSV in input\(ulfile. One record per line with fields in each record separated by the specified delimiter. - -.TP 10 --P/--pfile \fIparam\(ulfile\fR -.NL -Uses input command line options (parameters) from param\(ulfile. - -.TP 10 --v/--verbose -.NL -Produces verbose output. Includes output progress reports during extraction. - -.NL - -.SH Details -.NL - -.PP -opaxmlgenerate takes the CSV data from an input file. It generates fragments of XML, and in combination with a script, can be used to generate complete XML sequences. opaxmlgenerate does not use nor require a connection to an Intel(R) Omni-Path Fabric. -.PP -opaxmlgenerate reads CSV element values and applies element (tag) names to those values. The element names are supplied as command line options to the tool and constitute a template that is applied to the input. -.PP -Element names on the command line are of three (3) types, distinguished by their command line option - Generate, Header, and Header\(ulEnd. The Header and Header\(ulEnd types together constitute enclosing element types. Enclosing elements do not contain a value, but serve to separate and organize Generate elements. -.PP -Generate elements, along with a value from the CSV input file, cause XML in the form of \fIvalue\fR to be generated. Generate elements are normally the majority of the XML output since they specify elements containing the input values. Header elements cause an XML header start tag of the form: to be generated. Header\(ulEnd elements cause an XML header end tag of the form to be generated. Output of enclosing elements is controlled entirely by the placement of those element types on the command line. opaxmlgenerate does -\fBnot\fR -check for matching start and end tags or proper nesting of tags. -.PP -Options (parameters) to opaxmlgenerate can be specified on the command line, with a parameter file, or both. A parameter file is specified with -P \fIparam\(ulfile\fR. When a parameter file specification is encountered on the command line, option processing on the command line is suspended, the parameter file is read and processed entirely, and then command line processing is resumed. Option syntax within a parameter file is the same as on the command line. Multiple parameter file specifications can be made, on the command line or within other parameter files. At each point that a parameter file is specified, current option processing is suspended while the parameter file is processed, then resumed. Options are processed in the order they are encountered on the command line or in parameter files. A parameter file can be up to 8192 bytes in size and may contain up to 512 parameters. -.NL - -.SH Using opaxmlgenerate to Create Topology Input Files -.NL - -.PP -opaxmlgenerate can be used to create scripts to translate from user-specific format into the opareport topology\(ulinput file format. opaxmlgenerate itself works against a CSV style file with one line per record. Given such a file it can produce hierarchical XML output of arbitrary complexity and depth. -.PP -The typical flow for a script which translates from a user-specific format into opareport topology\(ulinput would be: -.IP \(bu -As needed, reorganize the data into link and node data CSV files, in a sequencing similar to that used by opareport topology\(ulinput. One link record per line in one temporary file, one node record per line in another temporary file and one SM per line in a third temporary file. -.IP \(bu -The script must directly output the boilerplate for XML version, etc. -.IP \(bu -opaxmlgenerate can be used to output the Link section of the topology\(ulinput, using the link record temporary file. -.IP \(bu -opaxmlgenerate can be used to output the Node sections of the topology\(ulinput using the node record temporary file. If desired, there could be separate node record temporary files for HFIs and Switches. -.IP \(bu -opaxmlgenerate can be used to output the SM section of the topology\(ulinput, if desired. -.IP \(bu -The script must directly output the closing XML tags to complete the topology\(ulinput file. +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opaxmlgenerate 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opaxmlgenerate + + +.PP + +\fB(Linux)\fR +Takes comma-separated-values (CSV) data as input and generates sequences of XML containing user-specified element names and element values within start and end tag specifications. Use this tool to create an XML representation of fabric data from its CSV form. +.SH Syntax +opaxmlgenerate [-v] [-d \fIdelimiter\fR] [-i \fInumber\fR] [-g \fIelement\fR] +.br + +[-h \fIelement\fR] [-e \fIelement\fR] [-X \fIinput\(ulfile\fR] [-P \fIparam\(ulfile\fR] +.SH Options + +.TP 10 +--help + +Produces full help text. + +.TP 10 +-g/--generate \fIelement\fR + +Generates value for \fIelement\fR using value in next field from the input file. Can be used multiple times on the command line. Values are assigned to elements in order. + +.TP 10 +-h/--header \fIelement\fR + +Name of the XML element that is the enclosing header start tag. + +.TP 10 +-e/--end \fIelement\fR + +Name of the XML element that is the enclosing header end tag. + +.TP 10 +-d/--delimit \fIdelimiter\fR + +Specifies the delimiter character that separates values in the input file. Default is semicolon. + +.TP 10 +-i/--indent \fInumber\fR + +Number of spaces to indent each level of XML output. Default is 0. + +.TP 10 +-X/--infile \fIinput\(ulfile\fR + +Generates XML from CSV in input\(ulfile. One record per line with fields in each record separated by the specified delimiter. + +.TP 10 +-P/--pfile \fIparam\(ulfile\fR + +Uses input command line options (parameters) from param\(ulfile. + +.TP 10 +-v/--verbose + +Produces verbose output. Includes output progress reports during extraction. + + +.SH Details + +.PP +opaxmlgenerate takes the CSV data from an input file. It generates fragments of XML, and in combination with a script, can be used to generate complete XML sequences. opaxmlgenerate does not use nor require a connection to an Intel(R) Omni-Path Fabric. +.PP +opaxmlgenerate reads CSV element values and applies element (tag) names to those values. The element names are supplied as command line options to the tool and constitute a template that is applied to the input. +.PP +Element names on the command line are of three (3) types, distinguished by their command line option - Generate, Header, and Header\(ulEnd. The Header and Header\(ulEnd types together constitute enclosing element types. Enclosing elements do not contain a value, but serve to separate and organize Generate elements. +.PP +Generate elements, along with a value from the CSV input file, cause XML in the form of \fIvalue\fR to be generated. Generate elements are normally the majority of the XML output since they specify elements containing the input values. Header elements cause an XML header start tag of the form: to be generated. Header\(ulEnd elements cause an XML header end tag of the form to be generated. Output of enclosing elements is controlled entirely by the placement of those element types on the command line. opaxmlgenerate does +\fBnot\fR +check for matching start and end tags or proper nesting of tags. +.PP +Options (parameters) to opaxmlgenerate can be specified on the command line, with a parameter file, or both. A parameter file is specified with -P \fIparam\(ulfile\fR. When a parameter file specification is encountered on the command line, option processing on the command line is suspended, the parameter file is read and processed entirely, and then command line processing is resumed. Option syntax within a parameter file is the same as on the command line. Multiple parameter file specifications can be made, on the command line or within other parameter files. At each point that a parameter file is specified, current option processing is suspended while the parameter file is processed, then resumed. Options are processed in the order they are encountered on the command line or in parameter files. A parameter file can be up to 8192 bytes in size and may contain up to 512 parameters. + +.SH Using opaxmlgenerate to Create Topology Input Files + +.PP +opaxmlgenerate can be used to create scripts to translate from user-specific format into the opareport topology\(ulinput file format. opaxmlgenerate itself works against a CSV style file with one line per record. Given such a file it can produce hierarchical XML output of arbitrary complexity and depth. +.PP +The typical flow for a script which translates from a user-specific format into opareport topology\(ulinput would be: +.IP \(bu +As needed, reorganize the data into link and node data CSV files, in a sequencing similar to that used by opareport topology\(ulinput. One link record per line in one temporary file, one node record per line in another temporary file and one SM per line in a third temporary file. +.IP \(bu +The script must directly output the boilerplate for XML version, etc. +.IP \(bu +opaxmlgenerate can be used to output the Link section of the topology\(ulinput, using the link record temporary file. +.IP \(bu +opaxmlgenerate can be used to output the Node sections of the topology\(ulinput using the node record temporary file. If desired, there could be separate node record temporary files for HFIs and Switches. +.IP \(bu +opaxmlgenerate can be used to output the SM section of the topology\(ulinput, if desired. +.IP \(bu +The script must directly output the closing XML tags to complete the topology\(ulinput file. diff --git a/IbaTools/man/opaxmlindent.manPage b/IbaTools/man/opaxmlindent.manPage index cd875cf..a7b5fb8 100644 --- a/IbaTools/man/opaxmlindent.manPage +++ b/IbaTools/man/opaxmlindent.manPage @@ -1,48 +1,45 @@ -.\" .\" ********************************************************************* -.\" .\" * * -.\" .\" * Copyright 2015-2019, Intel Corporation * -.\" .\" * * -.\" .\" * All Rights Reserved. * -.\" .\" * * -.\" .\" ********************************************************************* - -.TH opaxmlindent 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" -.SH NAME -opaxmlindent - -.NL - -.PP - -\fB(Linux)\fR -Takes well-formed XML as input, filters out comments, and generates a uniformly-indented equivalent XML file. Use opaxmlindent to reformat files for easier reading and review, also to reformat a file for easy comparison with diff. -.SH Syntax -.NL -opaxmlindent [-t|-k] [-i \fIindent\fR] [ \fIinput\(ulfile\fR] -.SH Options -.NL - -.TP 10 ---help -.NL -Produces full help text. - -.TP 10 --t -.NL -Trims leading and trailing whitespace in tag contents. - -.TP 10 --k -.NL -In tags with purely whitespace that contain newlines, keeps newlines as-is. Default is to format as an empty list. - -.TP 10 --i \fIindent\fR -.NL -Sets indentation to use per level. Default is 4. - -.TP 10 -\fIinput\(ulfile\fR -.NL -Specifies the XML file to read. Default is stdin. +.\" .\" ********************************************************************* +.\" .\" * * +.\" .\" * Copyright 2015-2019, Intel Corporation * +.\" .\" * * +.\" .\" * All Rights Reserved. * +.\" .\" * * +.\" .\" ********************************************************************* + +.TH opaxmlindent 8 "Intel Corporation" "Copyright(C) 2015\-2019" "IFSFFCLIRG (Man Page)" +.SH NAME +opaxmlindent + + +.PP + +\fB(Linux)\fR +Takes well-formed XML as input, filters out comments, and generates a uniformly-indented equivalent XML file. Use opaxmlindent to reformat files for easier reading and review, also to reformat a file for easy comparison with diff. +.SH Syntax +opaxmlindent [-t|-k] [-i \fIindent\fR] [ \fIinput\(ulfile\fR] +.SH Options + +.TP 10 +--help + +Produces full help text. + +.TP 10 +-t + +Trims leading and trailing whitespace in tag contents. + +.TP 10 +-k + +In tags with purely whitespace that contain newlines, keeps newlines as-is. Default is to format as an empty list. + +.TP 10 +-i \fIindent\fR + +Sets indentation to use per level. Default is 4. + +.TP 10 +\fIinput\(ulfile\fR + +Specifies the XML file to read. Default is stdin. diff --git a/IbaTools/nodeverify/nodeverify.sh b/IbaTools/nodeverify/nodeverify.sh index 6a56bbf..0e6556a 100755 --- a/IbaTools/nodeverify/nodeverify.sh +++ b/IbaTools/nodeverify/nodeverify.sh @@ -55,6 +55,7 @@ PCI_WIDTH="x16" # expected value for PCI width on Intel WFR HFI MPI_APPS=$HOME/mpi_apps/ # where to find mpi_apps for HPL test MIN_FLOPS="115" # minimum flops expected from HPL test IPOIB_IF="ib0" # IPoIB interface to check +IPOIB_MODE="connected" # IPoIB required mode "connected" or "datagram" IPOIB_MTU=65520 # IPoIB required MTU outputdir=/root # default outputdir is root -d $DIR overrides CPU_DRIVER="intel_pstate" # power scaling driver for CPU @@ -891,8 +892,8 @@ test_ipoib() mtu=$(cat /sys/class/net/$IPOIB_IF/mtu) mode=$(cat /sys/class/net/$IPOIB_IF/mode) - [ $mode != "connected" ] && fail "$IPOIB_IF is in '$mode' mode - should be in 'connected' mode" - [ $mtu -lt $IPOIB_MTU ] && fail "$IPOIB_IF MTU of $mtu is less than required $IPOIB_MTU" + [ $mode != "$IPOIB_MODE" ] && fail "$IPOIB_IF is in '$mode' mode - should be in '$IPOIB_MODE' mode" + [ $mtu -ne $IPOIB_MTU ] && fail "$IPOIB_IF MTU of $mtu - should be $IPOIB_MTU" set +x pass ": IPoIB properly configured" diff --git a/IbaTools/nodeverify/nodeverify.sh.base b/IbaTools/nodeverify/nodeverify.sh.base index 6a56bbf..0e6556a 100755 --- a/IbaTools/nodeverify/nodeverify.sh.base +++ b/IbaTools/nodeverify/nodeverify.sh.base @@ -55,6 +55,7 @@ PCI_WIDTH="x16" # expected value for PCI width on Intel WFR HFI MPI_APPS=$HOME/mpi_apps/ # where to find mpi_apps for HPL test MIN_FLOPS="115" # minimum flops expected from HPL test IPOIB_IF="ib0" # IPoIB interface to check +IPOIB_MODE="connected" # IPoIB required mode "connected" or "datagram" IPOIB_MTU=65520 # IPoIB required MTU outputdir=/root # default outputdir is root -d $DIR overrides CPU_DRIVER="intel_pstate" # power scaling driver for CPU @@ -891,8 +892,8 @@ test_ipoib() mtu=$(cat /sys/class/net/$IPOIB_IF/mtu) mode=$(cat /sys/class/net/$IPOIB_IF/mode) - [ $mode != "connected" ] && fail "$IPOIB_IF is in '$mode' mode - should be in 'connected' mode" - [ $mtu -lt $IPOIB_MTU ] && fail "$IPOIB_IF MTU of $mtu is less than required $IPOIB_MTU" + [ $mode != "$IPOIB_MODE" ] && fail "$IPOIB_IF is in '$mode' mode - should be in '$IPOIB_MODE' mode" + [ $mtu -ne $IPOIB_MTU ] && fail "$IPOIB_IF MTU of $mtu - should be $IPOIB_MTU" set +x pass ": IPoIB properly configured" diff --git a/IbaTools/opagenswitches/opagenswitches.sh b/IbaTools/opagenswitches/opagenswitches.sh index 1cc6b48..bbef890 100644 --- a/IbaTools/opagenswitches/opagenswitches.sh +++ b/IbaTools/opagenswitches/opagenswitches.sh @@ -257,11 +257,11 @@ gen_switches() suffix=":$hfi:$port" export IFS=';' rm -f $FILE_TEMP - eval $OPA_REPORT $port_opts -q -o comps -x -F nodetype:SW:port:0 -d 4| $XML_EXTRACT -H -d \; -e Node.NodeGUID -e Node.SystemImageGUID -e Node.Capability -e Node.PortInfo.Capability -e Node.NodeDesc -e Node.PortInfo.GUID -s Focus > $FILE_TEMP + eval $OPA_REPORT $port_opts -q -o comps -x -F nodetype:SW:port:0 -d 4| $XML_EXTRACT -H -d \; -e Node.LID -e Node.NodeGUID -e Node.SystemImageGUID -e Node.Capability -e Node.PortInfo.Capability -e Node.NodeDesc -e Node.PortInfo.GUID -s Focus > $FILE_TEMP if [ $? -eq 0 ] then fl_write_switches=1 - cat $FILE_TEMP | while read nodeguid systemguid capability portcapability nodedesc portguid + cat $FILE_TEMP | while read lid nodeguid systemguid capability portcapability nodedesc portguid do if [[ ! $portcapability =~ "VDR" ]]; then continue @@ -271,7 +271,8 @@ gen_switches() comma= if [ "$get_distance" = y ] then - distance=$(eval opasaquery $port_opts -o trace -g $portguid | grep "NodeType: SW" | wc -l) + # Use lid to handle LMC != 0 case + distance=$(eval opasaquery $port_opts -o trace -l $lid | grep "NodeType: SW" | wc -l) if [ ! -z "$distance" ] then comma="," diff --git a/IbaTools/opareport/opareport.c b/IbaTools/opareport/opareport.c index d72fb89..3cc5134 100644 --- a/IbaTools/opareport/opareport.c +++ b/IbaTools/opareport/opareport.c @@ -251,6 +251,12 @@ void XmlPrintLinkSpeed(const char* tag_prefix, uint16 value, int indent) XmlPrintStr(tag_prefix, StlLinkSpeedToText(value, buf, sizeof(buf)), indent); printf("%*s<%s_Int>%u\n", indent, "",tag_prefix, value, tag_prefix); } +void XmlPrintPortLtpCrc(const char* tag_prefix, uint16 value, int indent) +{ + char buf[64]; + XmlPrintStr(tag_prefix, StlPortLtpCrcModeToText(value, buf, sizeof(buf)), indent); + printf("%*s<%s_Int>%u\n", indent, "", tag_prefix, value, tag_prefix); +} // for predictable output order, should be called with the from port of the // link record, with the exception of trace routes @@ -2842,6 +2848,40 @@ void ShowPortCounters(STL_PORT_COUNTERS_DATA *pPortCounters, Format_t format, in break; } } +void ShowPortLinkDownReasonLog(PortData *portp, Format_t format, int indent, int detail) +{ + int i, idx = STL_LINKDOWN_REASON_LAST_INDEX(portp->LinkDownReasons); + if (idx == -1) return; + + STL_LINKDOWN_REASON *ldr = &portp->LinkDownReasons[idx]; + + for (i = 0; i < STL_NUM_LINKDOWN_REASONS; ++i) { + if (ldr->Timestamp == 0) break; + switch (format) { + case FORMAT_TEXT: + printf("%*s", indent, ""); + if (ldr->LinkDownReason) + printf("LinkDownReasonLog: %s ", StlLinkDownReasonToText(ldr->LinkDownReason)); + if (ldr->NeighborLinkDownReason) + printf("NeighborLinkDownReasonLog: %s", StlLinkDownReasonToText(ldr->NeighborLinkDownReason)); + printf("\n%*sTimestamp: %s", indent+4, "", ctime((time_t *)&ldr->Timestamp)); // ctime ends in '\n' + break; + case FORMAT_XML: + printf("%*s\n", indent, "", idx); + XmlPrintDec("LinkDownReason", ldr->LinkDownReason, indent+4); + XmlPrintDec("NeighborLinkDownReason", ldr->NeighborLinkDownReason, indent+4); + XmlPrintDec64("Timestamp", ldr->Timestamp, indent+4); + printf("%*s\n", indent, ""); + break; + default: + return; + } + + if (idx == 0) idx = STL_NUM_LINKDOWN_REASONS; + idx--; + ldr = &portp->LinkDownReasons[idx]; + } +} // output verbose summary of an STL Port void ShowPortSummary(PortData *portp, Format_t format, int indent, int detail) @@ -3051,6 +3091,16 @@ void ShowPortSummary(PortData *portp, Format_t format, int indent, int detail) StlPortLinkModeToText(pPortInfo->PortLinkMode.s.Active, buf1, sizeof(buf1)), StlPortLinkModeToText(pPortInfo->PortLinkMode.s.Supported, buf2, sizeof(buf2)), StlPortLinkModeToText(pPortInfo->PortLinkMode.s.Enabled, buf3, sizeof(buf3))); + if (g_hard) + printf("%*sPortLTPCRCMode: Act: xxxx Sup: %-21s En: xxxx\n", + indent+4, "", + StlPortLtpCrcModeToText(pPortInfo->PortLTPCRCMode.s.Supported, buf1, sizeof(buf1))); + else + printf("%*sPortLTPCRCMode: Act: %-6s Sup: %-21s En: %-21s\n", + indent+4, "", + StlPortLtpCrcModeToText(pPortInfo->PortLTPCRCMode.s.Active, buf1, sizeof(buf1)), + StlPortLtpCrcModeToText(pPortInfo->PortLTPCRCMode.s.Supported, buf2, sizeof(buf2)), + StlPortLtpCrcModeToText(pPortInfo->PortLTPCRCMode.s.Enabled, buf3, sizeof(buf3))); if (g_hard) printf( "%*sLinkSpeed: Active: xxxxxxx Supported: %10s Enabled: xxxxxxxxxx\n", indent+4, "", @@ -3222,6 +3272,11 @@ void ShowPortSummary(PortData *portp, Format_t format, int indent, int detail) indent+4, "", pPortInfo->s3.PartitionEnforcementInbound?"On":"Off", pPortInfo->s3.PartitionEnforcementOutbound?"On":"Off"); + + if (detail > 1) { + ShowPortLinkDownReasonLog(portp, format, indent+4, detail-2); + } + if ( portp->nodep && portp->pQOS && (detail > 1) && !g_persist && !g_hard ) { if ( portp->pQOS->SL2SCMap ) { @@ -3417,20 +3472,32 @@ void ShowPortSummary(PortData *portp, Format_t format, int indent, int detail) XmlPrintLinkSpeed("LinkSpeedEnabled", pPortInfo->LinkSpeed.Enabled, indent+4); } - - XmlPrintStr("PortLinkModeSupported", - StlPortLinkModeToText(pPortInfo->PortLinkMode.s.Supported, buf1, - sizeof(buf1)), indent+4); - - if (! g_hard) { - XmlPrintStr("PortLinkModeActive", - StlPortLinkModeToText(pPortInfo->PortLinkMode.s.Active, buf1, - sizeof(buf1)), indent+4); + + if (! g_hard) { + XmlPrintStr("PortLinkModeActive", + StlPortLinkModeToText(pPortInfo->PortLinkMode.s.Active, + buf1, sizeof(buf1)), indent+4); + } + XmlPrintStr("PortLinkModeSupported", + StlPortLinkModeToText(pPortInfo->PortLinkMode.s.Supported, + buf1, sizeof(buf1)), indent+4); + if (! g_hard) { XmlPrintStr("PortLinkModeEnabled", - StlPortLinkModeToText(pPortInfo->PortLinkMode.s.Enabled, buf1, - sizeof(buf1)), indent+4); + StlPortLinkModeToText(pPortInfo->PortLinkMode.s.Enabled, + buf1, sizeof(buf1)), indent+4); } - + + if (! g_hard) { + XmlPrintPortLtpCrc("PortLTPCRCModeActive", + pPortInfo->PortLTPCRCMode.s.Active, indent+4); + } + XmlPrintPortLtpCrc("PortLTPCRCModeSupported", + pPortInfo->PortLTPCRCMode.s.Supported, indent+4); + if (! g_hard) { + XmlPrintPortLtpCrc("PortLTPCRCModeEnabled", + pPortInfo->PortLTPCRCMode.s.Enabled, indent+4); + } + XmlPrintDec("SM_TrapQP", pPortInfo->SM_TrapQP.s.QueuePair, indent+4); XmlPrintDec("SA_QP", pPortInfo->SA_QP.s.QueuePair, indent+4); XmlPrintStr("IPV6", inet_ntop(AF_INET6, pPortInfo->IPAddrIPV6.addr, buf1, sizeof(buf1)), indent+4); @@ -3589,6 +3656,9 @@ void ShowPortSummary(PortData *portp, Format_t format, int indent, int detail) pPortInfo->s3.PartitionEnforcementOutbound, indent+4); } + if (detail > 1) { + ShowPortLinkDownReasonLog(portp, format, indent+4, detail-2); + } if ( portp->nodep && portp->pQOS && (detail > 1) && !g_persist && !g_hard ) { if ( portp->pQOS->SL2SCMap ) { @@ -12332,6 +12402,10 @@ void Usage_full(void) fprintf(stderr, " to value\n"); fprintf(stderr, " nodepatfile:FILENAME - name of file with list of nodes\n"); fprintf(stderr, " nodepairpatfile:FILENAME - name of file with list of node pairs separated by colon\n"); + fprintf(stderr, " ldr - ports with a non-zero link down reason or neighbor\n"); + fprintf(stderr, " link down reason\n"); + fprintf(stderr, " ldr:value - ports with a link down reason or neighbor link down\n"); + fprintf(stderr, " reason equal to value\n"); fprintf(stderr, "Examples:\n"); fprintf(stderr, " opareport -o comps -d 3\n"); fprintf(stderr, " opareport -o errors -o slowlinks\n"); diff --git a/IbaTools/opasnapconfig/Makefile b/IbaTools/opasnapconfig/Makefile deleted file mode 100644 index f574705..0000000 --- a/IbaTools/opasnapconfig/Makefile +++ /dev/null @@ -1,163 +0,0 @@ -# BEGIN_ICS_COPYRIGHT8 **************************************** -# -# Copyright (c) 2015, Intel Corporation -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# * Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# * Neither the name of Intel Corporation nor the names of its contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# END_ICS_COPYRIGHT8 **************************************** -# Makefile for opasnapconfig - -# Include Make Control Settings -include $(TL_DIR)/$(PROJ_FILE_DIR)/Makesettings.project - -#=============================================================================# -# Definitions: -#-----------------------------------------------------------------------------# - -# Name of SubProjects -DS_SUBPROJECTS = -# name of executable or downloadable image -EXECUTABLE = $(BUILDDIR)/opasnapconfig$(EXE_SUFFIX) -# list of sub directories to build -DIRS = -# C files (.c) -CFILES = \ - opasnapconfig.c \ - # Add more c files here -# C++ files (.cpp) -CCFILES = \ - # Add more cpp files here -# lex files (.lex) -LFILES = \ - # Add more lex files here -# archive library files (basename, $ARFILES will add MOD_LIB_DIR/prefix and suffix) -LIBFILES= -# Windows Resource Files (.rc) -RSCFILES = -# Windows IDL File (.idl) -IDLFILE = -# Windows Linker Module Definitions (.def) file for dll's -DEFFILE = -# targets to build during INCLUDES phase (add public includes here) -INCLUDE_TARGETS = \ - # Add more h hpp files here -# Non-compiled files -MISC_FILES = -# all source files -SOURCES = $(CFILES) $(CCFILES) $(LFILES) $(RSCFILES) $(IDLFILE) -# Source files to include in DSP File -DSP_SOURCES = $(INCLUDE_TARGETS) $(SOURCES) $(MISC_FILES) \ - $(RSCFILES) $(DEFFILE) $(MAKEFILE) -# all object files -OBJECTS = $(CFILES:.c=$(OBJ_SUFFIX)) $(CCFILES:.cpp=$(OBJ_SUFFIX)) \ - $(LFILES:.lex=$(OBJ_SUFFIX)) -RSCOBJECTS = $(RSCFILES:.rc=$(RES_SUFFIX)) -# targets to build during LIBS phase -LIB_TARGETS_IMPLIB = -LIB_TARGETS_ARLIB = # $(LIB_PREFIX)ResourceTest$(ARLIB_SUFFIX) -LIB_TARGETS_EXP = $(LIB_TARGETS_IMPLIB:$(ARLIB_SUFFIX)=$(EXP_SUFFIX)) -LIB_TARGETS_MISC = -# targets to build during CMDS phase -CMD_TARGETS_SHLIB = -CMD_TARGETS_EXE = $(EXECUTABLE) -CMD_TARGETS_MISC = -# files to remove during clean phase -CLEAN_TARGETS_MISC = -CLEAN_TARGETS = $(OBJECTS) $(RSCOBJECTS) $(IDL_TARGETS) $(CLEAN_TARGETS_MISC) -# other files to remove during clobber phase -CLOBBER_TARGETS_MISC= -# sub-directory to install to within bin -BIN_SUBDIR = -# sub-directory to install to within include -INCLUDE_SUBDIR = - -# Additional Settings -#CLOCALDEBUG = User defined C debugging compilation flags [Empty] -#CCLOCALDEBUG = User defined C++ debugging compilation flags [Empty] -#CLOCAL = User defined C flags for compiling [Empty] -#CCLOCAL = User defined C++ flags for compiling [Empty] -#BSCLOCAL = User flags for Browse File Builder [Empty] -#DEPENDLOCAL = user defined makedepend flags [Empty] -#LINTLOCAL = User defined lint flags [Empty] -#LOCAL_INCLUDE_DIRS = User include directories to search for C/C++ headers [Empty] -#LDLOCAL = User defined C flags for linking [Empty] -#IMPLIBLOCAL = User flags for Object Lirary Manager [Empty] -#MIDLLOCAL = User flags for IDL compiler [Empty] -#RSCLOCAL = User flags for resource compiler [Empty] -#LOCALDEPLIBS = User libraries to include in dependencies [Empty] -#LOCALLIBS = User libraries to use when linking [Empty] -# (in addition to LOCALDEPLIBS) -#LOCAL_LIB_DIRS = User library directories for libpaths [Empty] - -CLOCAL=$(CIBACCESS) $(CPIE) -LOCAL_INCLUDE_DIRS= -ifeq "$(IB_STACK)" "IBACCESS" -LOCALDEPLIBS=$(IBACCESS_USER_LIBS) Xml Topology -LOCALLIBS=m -LOCAL_LIB_DIRS= $(IBACCESS_USER_LIB_DIRS) -else -LOCALDEPLIBS=$(IBACCESS_USER_LIBS) Xml Topology opamgt-priv -LOCALLIBS=$(OPENIB_USER_LIBS) m rt expat -LOCAL_LIB_DIRS=$(OPENIB_USER_LIB_DIRS) $(IBACCESS_USER_LIB_DIRS) -endif - -# Include Make Rules definitions and rules -include $(TL_DIR)/IbaTools/Makerules.module - -#=============================================================================# -# Overrides: -#-----------------------------------------------------------------------------# -#CCOPT = # C++ optimization flags, default lets build config decide -#COPT = # C optimization flags, default lets build config decide -#SUBSYSTEM = Subsystem to build for (none, console or windows) [none] -# (Windows Only) -#USEMFC = How Windows MFC should be used (none, static, shared, no_mfc) [none] -# (Windows Only) -#=============================================================================# - -#=============================================================================# -# Rules: -#-----------------------------------------------------------------------------# -# process Sub-directories -include $(TL_DIR)/Makerules/Maketargets.toplevel - -# build cmds and libs -include $(TL_DIR)/Makerules/Maketargets.build - -# install for includes, libs and cmds phases -include $(TL_DIR)/Makerules/Maketargets.install - -# install for stage phase -include $(TL_DIR)/Makerules/Maketargets.stage -#STAGE:: -# $(VS)$(STAGE_INSTALL) $(STAGE_INSTALL_DIR_OPT) $(MOD_STAGE_TESTS_BIN_DIR) $(CMD_TARGETS_EXE) $(CMD_TARGETS_MISC) - -# Unit test execution -#include $(TL_DIR)/Makerules/Maketargets.runtest - -#=============================================================================# - -#=============================================================================# -# DO NOT DELETE THIS LINE -- make depend depends on it. -#=============================================================================# diff --git a/IbaTools/opasnapconfig/opasnapconfig.c b/IbaTools/opasnapconfig/opasnapconfig.c deleted file mode 100644 index d3808f7..0000000 --- a/IbaTools/opasnapconfig/opasnapconfig.c +++ /dev/null @@ -1,1477 +0,0 @@ -/* BEGIN_ICS_COPYRIGHT7 **************************************** - -Copyright (c) 2015-2017, Intel Corporation - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of Intel Corporation nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -** END_ICS_COPYRIGHT7 ****************************************/ - -/* [ICS VERSION STRING: unknown] */ - -#include -#include -#include -#include - -#include -#include -#include -#include - -#define _GNU_SOURCE - -#define EXIT_STATUS_OK 0 -#define EXIT_STATUS_BADOPTIONS 1 -#define EXIT_STATUS_FAILED_PARSE 2 -#define EXIT_STATUS_FAILED_OPEN_PORT 3 -#define EXIT_STATUS_NO_LOCAL_NODE 4 -#define EXIT_STATUS_FAILED_IDENTITY_VERIFICATION 5 -#define EXIT_STATUS_FAILED_SMP_DISTRIBUTION 6 -#define EXIT_STATUS_FAILED_ACTIVATION 7 -#define EXIT_STATUS_BAD_FILENAME 8 - -#define PROGRAM_ATTR_PORTINFO (0x00000001) -#define PROGRAM_ATTR_VLARB (0x00000002) -#define PROGRAM_ATTR_PKEY (0x00000004) -#define PROGRAM_ATTR_LFT (0x00000008) -#define PROGRAM_ATTR_MFT (0x00000020) -#define PROGRAM_ATTR_SLSC (0x00000040) -#define PROGRAM_ATTR_SCSC (0x00000080) -#define PROGRAM_ATTR_SWITCHINFO (0x00000100) -#define PROGRAM_ATTR_SCSL (0x00000200) -#define PROGRAM_ATTR_BFRCTRL (0x00000400) -#define PROGRAM_ATTR_SCVLR (0x00002000) -#define PROGRAM_ATTR_SCVLT (0x00004000) -#define PROGRAM_ATTR_SCVLNT (0x00008000) -#define PROGRAM_ATTR_ALL (0x80000000) - -#define DR_PATH_SIZE 64 - -// command line options, each has a short and long flag name -struct option options[] = { - // basic controls - { "help", no_argument, NULL, '$' }, // use an invalid option character - { "verbose", no_argument, NULL, 'v' }, - { "hfi", required_argument, NULL, 'h' }, - { "port", required_argument, NULL, 'p' }, - { "prog", no_argument, NULL, 'P' }, - { "act", no_argument, NULL, 'A' }, - { "attr", required_argument, NULL, 'a' }, - { "attempts", required_argument, NULL, 'c' }, - { "directed", no_argument, NULL, 'd' }, - { "strict", no_argument, NULL, 's' }, - { "bail", no_argument, NULL, 'b' }, - { "parsable", no_argument, NULL, 'g' }, - { 0 } -}; - -static __inline__ void logFailedSMP(NodeData* node, char* attribute, uint8_t parsableOutput) { - if(!node || !attribute) - return; - - if(parsableOutput) - fprintf(stderr, "error;attribute;%s;%s;0x%016"PRIx64"\n", attribute, node->NodeDesc.NodeString, node->NodeInfo.NodeGUID); - else - fprintf(stderr, "ERROR: Failed %s to %s (NodeGUID: 0x%016"PRIx64")\n", attribute, node->NodeDesc.NodeString, node->NodeInfo.NodeGUID); -} - -void Output_Usage(void) -{ - fprintf(stderr, "Usage: opasnapconfig [OPTION] ... SNAPSHOT\n"); - fprintf(stderr, "Parse information from provided snapshot file and issue packets to program\n"); - fprintf(stderr, "and activate a fabric.\n"); - fprintf(stderr, " --help - produce full help text\n"); - fprintf(stderr, " -v/--verbose - verbose output\n"); - fprintf(stderr, " -h/--hfi hfi - hfi, numbered 1..n, 0= -p port will be a\n"); - fprintf(stderr, " system wide port num (default is 0)\n"); - fprintf(stderr, " -p/--port port - port, numbered 1..n, 0=1st active (default\n"); - fprintf(stderr, " is 1st active)\n"); - fprintf(stderr, " -P/--prog - perform only attribute programming, skip\n"); - fprintf(stderr, " activation phase\n"); - fprintf(stderr, " -A/--act - perform only activation phase, skip\n"); - fprintf(stderr, " attribute programming\n"); - fprintf(stderr, " -a/--attr attr - enables selected attribute programming.\n"); - fprintf(stderr, " can be specified multiple times for\n"); - fprintf(stderr, " multiple attributes (default is all)\n"); - fprintf(stderr, " -c/--attempts attempts - number of times to attempt sending a packet\n"); - fprintf(stderr, " before moving on (default is 2)\n"); - fprintf(stderr, " -d/--directed - perform all attribute programming using only\n"); - fprintf(stderr, " directed route routing. recommended for use\n"); - fprintf(stderr, " with the -P option\n"); - fprintf(stderr, " -s/--strict - when checking node identity validate only\n"); - fprintf(stderr, " NodeGUID (default: match NodeGUID first,\n"); - fprintf(stderr, " match NodeDesc second)\n"); - fprintf(stderr, " -b/--bail - exit at the first error encountered\n"); - fprintf(stderr, " -g/--parsable - machine parsable output of failures during\n"); - fprintf(stderr, " fabric configuration\n"); - fprintf(stderr, "\n"); - fprintf(stderr, "The -h and -p options permit a variety of selections:\n"); - fprintf(stderr, " -h 0 - 1st active port in system (this is the default)\n"); - fprintf(stderr, " -h 0 -p 0 - 1st active port in system\n"); - fprintf(stderr, " -h x - 1st active port on HFI x\n"); - fprintf(stderr, " -h x -p 0 - 1st active port on HFI x\n"); - fprintf(stderr, " -h 0 -p y - port y within system (irrespective of which ports are active)\n"); - fprintf(stderr, " -h x -p y - HFI x, port y\n"); - fprintf(stderr, "\n"); - fprintf(stderr, "Attribute Types:\n"); - fprintf(stderr, " portinfo - program each port's PortInfo\n"); - fprintf(stderr, " vlarb - program each port's VL Arbitration Table\n"); - fprintf(stderr, " pkey - program each port's PKey Table\n"); - fprintf(stderr, " lft - program each node's Linear Forwarding Table\n"); - fprintf(stderr, " mft - program each node's Multicast Forwarding Table\n"); - fprintf(stderr, " slsc - program each node's SLtoSC Mapping Table\n"); - fprintf(stderr, " scsl - program each node's SCtoSL Mapping Table\n"); - fprintf(stderr, " scsc - program each node's SCtoSC Mapping Table\n"); - fprintf(stderr, " switchinfo - program each switch's SwitchInfo\n"); - fprintf(stderr, " bfrctrl - program each port's Buffer Control Table\n"); - fprintf(stderr, " scvlr - program each port's SCtoVLr Mapping Table\n"); - fprintf(stderr, " scvlt - program each port's SCtoVLt Mapping Table\n"); - fprintf(stderr, " scvlnt - program each port's SCtoVLnt Mapping Table\n"); - fprintf(stderr, " all - program all attribute information (default)\n"); -} - -void Usage_full(void) -{ - Output_Usage(); - exit(EXIT_STATUS_OK); -} - -void Usage(void) -{ - Output_Usage(); - exit(EXIT_STATUS_BADOPTIONS); -} - -uint32_t attributeToFlag(const char *attribute) { - if(0 == strcasecmp(attribute, "portinfo")) - return PROGRAM_ATTR_PORTINFO; - else if(0 == strcasecmp(attribute, "vlarb")) - return PROGRAM_ATTR_VLARB; - else if(0 == strcasecmp(attribute, "pkey")) - return PROGRAM_ATTR_PKEY; - else if(0 == strcasecmp(attribute, "lft")) - return PROGRAM_ATTR_LFT; - else if(0 == strcasecmp(attribute, "mft")) - return PROGRAM_ATTR_MFT; - else if(0 == strcasecmp(attribute, "slsc")) - return PROGRAM_ATTR_SLSC; - else if(0 == strcasecmp(attribute, "scsc")) - return PROGRAM_ATTR_SCSC; - else if(0 == strcasecmp(attribute, "switchinfo")) - return PROGRAM_ATTR_SWITCHINFO; - else if(0 == strcasecmp(attribute, "scsl")) - return PROGRAM_ATTR_SCSL; - else if(0 == strcasecmp(attribute, "bfrctrl")) - return PROGRAM_ATTR_BFRCTRL; - else if(0 == strcasecmp(attribute, "scvlr")) - return PROGRAM_ATTR_SCVLR; - else if(0 == strcasecmp(attribute, "scvlt")) - return PROGRAM_ATTR_SCVLT; - else if(0 == strcasecmp(attribute, "scvlnt")) - return PROGRAM_ATTR_SCVLNT; - else if(0 == strcasecmp(attribute, "all")) - return PROGRAM_ATTR_ALL; - else { - fprintf(stderr, "opasnapconfig: Invalid attribute type: %s\n", attribute); - Usage(); - } - - return PROGRAM_ATTR_ALL; -} - -static __inline__ void attributeFlagsToString(uint32_t attributes, char* buf, uint32_t buflen) { - int remainingLength = buflen - 1; - char* attrString; - - if(attributes & PROGRAM_ATTR_ALL) { - snprintf(buf, remainingLength, "All"); - return; - } - - if((attributes & PROGRAM_ATTR_PORTINFO) && remainingLength) { - attributes &= ~PROGRAM_ATTR_PORTINFO; - attrString = (attributes) ? "portinfo, " : "portinfo"; - - strncat(buf, attrString, remainingLength); - remainingLength -= strlen(attrString); - } - if((attributes & PROGRAM_ATTR_VLARB) && remainingLength) { - attributes &= ~PROGRAM_ATTR_VLARB; - attrString = (attributes) ? "vlarb, " : "vlarb"; - - strncat(buf, attrString, remainingLength); - remainingLength -= strlen(attrString); - } - if((attributes & PROGRAM_ATTR_PKEY) && remainingLength) { - attributes &= ~PROGRAM_ATTR_PKEY; - attrString = (attributes) ? "pkey, " : "pkey"; - - strncat(buf, attrString, remainingLength); - remainingLength -= strlen(attrString); - } - if((attributes & PROGRAM_ATTR_LFT) && remainingLength) { - attributes &= ~PROGRAM_ATTR_LFT; - attrString = (attributes) ? "lft, " : "lft"; - - strncat(buf, attrString, remainingLength); - remainingLength -= strlen(attrString); - } - if((attributes & PROGRAM_ATTR_MFT) && remainingLength) { - attributes &= ~PROGRAM_ATTR_MFT; - attrString = (attributes) ? "mft, " : "mft"; - - strncat(buf, attrString, remainingLength); - remainingLength -= strlen(attrString); - } - if((attributes & PROGRAM_ATTR_SLSC) && remainingLength) { - attributes &= ~PROGRAM_ATTR_SLSC; - attrString = (attributes) ? "slsc, " : "slsc"; - - strncat(buf, attrString, remainingLength); - remainingLength -= strlen(attrString); - } - if((attributes & PROGRAM_ATTR_SCSL) && remainingLength) { - attributes &= ~PROGRAM_ATTR_SCSL; - attrString = (attributes) ? "scsl, " : "scsl"; - - strncat(buf, attrString, remainingLength); - remainingLength -= strlen(attrString); - } - if((attributes & PROGRAM_ATTR_SCSC) && remainingLength) { - //attributes &= ~PROGRAM_ATTR_SCSC; - //attrString = (attributes) ? "scsc, " : "scsc"; - // - //strncat(buf, attrString, remainingLength); - //remainingLength -= strlen(attrString); - fprintf(stdout, "SCSC Mapping Table currently unsupported\n"); - } - if((attributes & PROGRAM_ATTR_SWITCHINFO) && remainingLength) { - attributes &= ~PROGRAM_ATTR_SWITCHINFO; - attrString = (attributes) ? "switchinfo, " : "switchinfo"; - - strncat(buf, attrString, remainingLength); - remainingLength -= strlen(attrString); - } - if((attributes & PROGRAM_ATTR_BFRCTRL) && remainingLength) { - attributes &= ~PROGRAM_ATTR_BFRCTRL; - attrString = (attributes) ? "bfrctrl, " : "bfrctrl"; - - strncat(buf, attrString, remainingLength); - remainingLength -= strlen(attrString); - } - if((attributes & PROGRAM_ATTR_SCVLR) && remainingLength) { - attributes &= ~PROGRAM_ATTR_SCVLR; - attrString = (attributes) ? "scvlr, " : "scvlr"; - - strncat(buf, attrString, remainingLength); - remainingLength -= strlen(attrString); - } - if((attributes & PROGRAM_ATTR_SCVLT) && remainingLength) { - attributes &= ~PROGRAM_ATTR_SCVLT; - attrString = (attributes) ? "scvlt, " : "scvlt"; - - strncat(buf, attrString, remainingLength); - remainingLength -= strlen(attrString); - } - if((attributes & PROGRAM_ATTR_SCVLNT) && remainingLength) { - attributes &= ~PROGRAM_ATTR_SCVLNT; - attrString = (attributes) ? "scvlnt, " : "scvlnt"; - - strncat(buf, attrString, remainingLength); - remainingLength -= strlen(attrString); - } -} - -NodeData* locateLocalNode(struct omgt_port* oibPort, FabricData_t* fabric, uint8_t strict, uint8_t parsableOutput) -{ - STL_NODE_INFO localNodeInfo; - STL_NODE_DESCRIPTION localNodeDesc; - uint8_t path[DR_PATH_SIZE]; - Point results; - NodeData* localNode; - - memset(&localNodeInfo, 0, sizeof(STL_NODE_INFO)); - memset(&localNodeDesc, 0, sizeof(STL_NODE_DESCRIPTION)); - memset(path, 0, sizeof(path)); - PointInit(&results); - - if(SmaGetNodeInfo(oibPort, 0, 0, path, &localNodeInfo) != FSUCCESS) { - if(parsableOutput) - fprintf(stderr, "error;attribute;Get(NodeInfo);Local Node;none;any\n"); - else - fprintf(stderr, "ERROR: Unable to get local NodeInfo\n"); - return NULL; - } - - if(SmaGetNodeDesc(oibPort, 0, 0, path, &localNodeDesc) != FSUCCESS) { - if(parsableOutput) - fprintf(stderr, "error;attribute;Get(NodeDesc);Local Node;none;any\n"); - else - fprintf(stderr, "ERROR: Unable to get local NodeDesc\n"); - return NULL; - } - - if((localNode = FindNodeGuid(fabric, localNodeInfo.NodeGUID)) != NULL) { - // Mark the local node as visited so we don't revisit it - localNode->visited = 1; - localNode->valid = 1; - return localNode; - } - - if (strict || FindNodeNamePoint(fabric, (char*)localNodeDesc.NodeString, &results, FIND_FLAG_FABRIC, 1) != FSUCCESS) - return NULL; - - if (results.Type == POINT_TYPE_NODE_LIST) { - if(parsableOutput) - fprintf(stderr, "error;snapshot;locateLocalNode;Local node listed multiple times\n"); - else - fprintf(stderr, "ERROR: Found local node listed multiple times in snapshot\n"); - return NULL; - } - - if (results.Type != POINT_TYPE_NODE) - return NULL; - - localNode = results.u.nodep; - // Mark the local node as visited so we don't revisit it - localNode->visited = 1; - localNode->valid = 1; - return localNode; -} - -FSTATUS verifyNodeIdentityRecurse(struct omgt_port* oibPort, NodeData* nodeToVerify, uint8_t* path, uint8_t strict, uint8_t bail, uint8_t parsableOutput) { - cl_map_item_t *port; - PortData* portData; - STL_NODE_INFO nodeInfo; - STL_NODE_DESCRIPTION nodeDesc; - uint8_t gotNodeInfo = 0; - uint8_t gotNodeDesc = 0; - - if(!oibPort || !nodeToVerify || !path) - return FINVALID_PARAMETER; - - if(nodeToVerify->visited) - return FSUCCESS; - - memset(&nodeInfo, 0, sizeof(STL_NODE_INFO)); - memset(&nodeDesc, 0, sizeof(STL_NODE_DESCRIPTION)); - - if(SmaGetNodeInfo(oibPort, 0, 0, path, &nodeInfo) != FSUCCESS) { - logFailedSMP(nodeToVerify, "Get(NodeInfo)", parsableOutput); - if(bail) - return FERROR; - } else { - gotNodeInfo = 1; - } - - if(SmaGetNodeDesc(oibPort, 0, 0, path, &nodeDesc) != FSUCCESS) { - logFailedSMP(nodeToVerify, "Get(NodeDesc)", parsableOutput); - if(bail) - return FERROR; - } else { - gotNodeDesc = 1; - } - - nodeToVerify->visited = 1; - - if(gotNodeInfo && nodeInfo.NodeGUID == nodeToVerify->NodeInfo.NodeGUID) { - nodeToVerify->valid = 1; - } - - if(!strict && !nodeToVerify->valid && gotNodeDesc && - strncmp((char*)nodeDesc.NodeString, (char*)nodeToVerify->NodeDesc.NodeString, STL_NODE_DESCRIPTION_ARRAY_SIZE) == 0) { - nodeToVerify->valid = 1; - } - - if(nodeToVerify->valid) { - memcpy(nodeToVerify->path, path, sizeof(nodeToVerify->path)); - } else { - if(parsableOutput) - fprintf(stderr, "error;incorrectnode;%s0x%016"PRIx64";%s;0x%016"PRIx64"\n", nodeToVerify->NodeDesc.NodeString, nodeToVerify->NodeInfo.NodeGUID, - gotNodeDesc ? (char*)nodeDesc.NodeString : "none", gotNodeInfo ? nodeInfo.NodeGUID : 0); - else { - fprintf(stderr, "ERROR: Skipping programming of incorrect node\n"); - fprintf(stderr, " Expected: %s (NodeGUID: 0x%016"PRIx64")\n", nodeToVerify->NodeDesc.NodeString, nodeToVerify->NodeInfo.NodeGUID); - fprintf(stderr, " Found: %s (NodeGUID: 0x%016"PRIx64")\n", gotNodeDesc ? (char*)nodeDesc.NodeString : "none", gotNodeInfo ? nodeInfo.NodeGUID : 0); - } - - if(bail) - return FERROR; - } - - for (port = cl_qmap_head(&nodeToVerify->Ports); port != cl_qmap_end(&nodeToVerify->Ports); port = cl_qmap_next(port)) { - portData = PARENT_STRUCT(port, PortData, NodePortsEntry); - - if(portData->neighbor != NULL && portData->neighbor->nodep != NULL && portData->PortNum != 0 && path[0] < DR_PATH_SIZE-2) { - FSTATUS status; - uint8_t newPath[DR_PATH_SIZE]; - memcpy(newPath, path, sizeof(newPath)); - // Update the path port number and hop count - newPath[0]++; - newPath[newPath[0]] = portData->PortNum; - - status = verifyNodeIdentityRecurse(oibPort, portData->neighbor->nodep, newPath, strict, bail, parsableOutput); - if(status != FSUCCESS && bail){ - return FERROR; - } - } - } - - return FSUCCESS; -} - -FSTATUS checkAllNodesVerified(FabricData_t* fabric, uint8_t parsableOutput) { - FSTATUS status = FSUCCESS; - LIST_ITEM* listNode; - NodeData* node; -// It is enough to verify all switches are visited since the logic in verifyNodeIdentityRecurse will ensure all FIs are always visited -// as long as the neighbor switch is visited. - for(listNode = QListHead(&fabric->AllSWs); listNode != NULL; listNode = QListNext(&fabric->AllSWs, listNode)) { - node = (NodeData*)QListObj(listNode); - - if(!node || !node->valid) - continue; - - if(!node->visited) { - if(parsableOutput) - fprintf(stderr, "error;routing;%s;0x%016"PRIx64";node not verified \n", node->NodeDesc.NodeString, node->NodeInfo.NodeGUID); - else - fprintf(stderr, "ERROR:Node %s (NodeGUID: 0x%016"PRIx64") not verified \n", node->NodeDesc.NodeString, node->NodeInfo.NodeGUID); - status = FINVALID_SETTING; - } - } - return status; -} - -static FSTATUS DistributePortInfo(struct omgt_port* oibPort, NodeData *node, uint8_t directedOnly, uint8_t bail, uint8_t parsableOutput) -{ - if(!node || !node->valid) - return FSUCCESS; - - cl_map_item_t *clPort; - for(clPort = cl_qmap_head(&node->Ports); clPort != cl_qmap_end(&node->Ports); clPort = cl_qmap_next(clPort)) { - PortData *port = PARENT_STRUCT(clPort, PortData, NodePortsEntry); - - if(!port) - continue; - - port->PortInfo.PortStates.s.PortState = IB_PORT_NOP; - port->PortInfo.PortStates.s.PortPhysicalState = IB_PORT_PHYS_NOP; - if (node->pSwitchInfo) { - // If we're programming a switch, make sure Flit Preemption values are set. - if (port->PortInfo.FlitControl.Preemption.MinInitial == 0) - port->PortInfo.FlitControl.Preemption.MinInitial = 8; - if (port->PortInfo.FlitControl.Preemption.MinTail == 0) - port->PortInfo.FlitControl.Preemption.MinTail = 8; - } - - if(SmaSetPortInfo(oibPort, 0, 0, node->path, port->PortNum, &port->PortInfo) != FSUCCESS) { - logFailedSMP(node, "Set(PortInfo)", parsableOutput); - - if(bail) - return FERROR; - } - } - - return FSUCCESS; -} - -static FSTATUS updateFabricPortInfo(struct omgt_port* oibPort, FabricData_t* fabric, uint8_t directedOnly, uint8_t bail, uint8_t parsableOutput) -{ - cl_map_item_t *clNode, *clPort; - NodeData* node; - PortData* port; - STL_PORT_INFO portInfo; - FSTATUS fstatus; - - for (clNode = cl_qmap_head(&fabric->AllNodes); clNode != cl_qmap_end(&fabric->AllNodes); clNode = cl_qmap_next(clNode)) { - node = PARENT_STRUCT(clNode, NodeData, AllNodesEntry); - - if (!node || !node->valid) - continue; - - for (clPort = cl_qmap_head(&node->Ports); clPort != cl_qmap_end(&node->Ports); clPort = cl_qmap_next(clPort)) { - port = PARENT_STRUCT(clPort, PortData, NodePortsEntry); - - if (!port) - continue; - - memset(&portInfo, 0, sizeof(portInfo)); - - fstatus = SmaGetPortInfo(oibPort, directedOnly ? 0 : port->EndPortLID, 0, directedOnly ? node->path : NULL, port->PortNum, 1, &portInfo); - - if (fstatus == FSUCCESS) { - memcpy(&port->PortInfo, &portInfo, sizeof(portInfo)); - } else { - logFailedSMP(node, "Get(PortInfo)", parsableOutput); - - if (bail) - return FERROR; - } - } - } - - return FSUCCESS; -} - -FSTATUS distributeSMPs(struct omgt_port* oibPort, FabricData_t* fabric, uint32_t attributesToProgram, uint8_t directedOnly, uint8_t bail, uint8_t parsableOutput) -{ - FSTATUS status = FSUCCESS; - LIST_ITEM* listNode; - cl_map_item_t *clNode, *clPort; - NodeData* node; - PortData* port; - SC2VLUpdateType sc2vlUpdateType; - int block; - - if(!oibPort || !fabric) - return FINVALID_PARAMETER; - - - // Distribute SwitchInfo - if(attributesToProgram & (PROGRAM_ATTR_SWITCHINFO | PROGRAM_ATTR_ALL)) { - if(!parsableOutput) - fprintf(stdout, "Sending SwitchInfo(s)...\n"); - - for(listNode = QListHead(&fabric->AllSWs); listNode != NULL; listNode = QListNext(&fabric->AllSWs, listNode)) { - node = (NodeData*)QListObj(listNode); - - if(!node || !node->valid || !node->pSwitchInfo) - continue; - - if(SmaSetSwitchInfo(oibPort, 0, 0, node->path, &node->pSwitchInfo->SwitchInfoData) != FSUCCESS) { - logFailedSMP(node, "Set(SwitchInfo)", parsableOutput); - - if(bail) - return FERROR; - } - } - } - - // Distribute LFTs - if(attributesToProgram & (PROGRAM_ATTR_LFT | PROGRAM_ATTR_ALL)) { - if(!parsableOutput) - fprintf(stdout, "Sending LFT(s)...\n"); - - for(listNode = QListHead(&fabric->AllSWs); listNode != NULL; listNode = QListNext(&fabric->AllSWs, listNode)) { - node = (NodeData*)QListObj(listNode); - - if(!node || !node->valid || !node->switchp || !node->switchp->LinearFDB || !node->pSwitchInfo || node->pSwitchInfo->SwitchInfoData.RoutingMode.Enabled != STL_ROUTE_LINEAR) - continue; - - for(block = 0; block <= node->switchp->LinearFDBSize / MAX_LFT_ELEMENTS_BLOCK; block++) { - if(SmaSetLinearFDBTable(oibPort, 0, 0, node->path, block, &node->switchp->LinearFDB[block]) != FSUCCESS) { - logFailedSMP(node, "Set(LFT)", parsableOutput); - - if(bail) - return FERROR; - } - } - } - } - - - // Distribute PortInfo - if(attributesToProgram & (PROGRAM_ATTR_PORTINFO | PROGRAM_ATTR_ALL)) { - if(!parsableOutput) - fprintf(stdout, "Sending PortInfo(s)...\n"); - - // First Set(PortInfo), program switches first followed by FIs - // This is to avoid transient SLID security errors when IPoIB tries to reregister - // with new LID before LID has been changed on switch port side. - LIST_ITEM *n; - for (n = QListHead(&fabric->AllSWs); n != NULL; n = QListNext(&fabric->AllSWs, n)) { - node = (NodeData*)QListObj(n); - if (FSUCCESS != DistributePortInfo(oibPort, node, directedOnly, bail, parsableOutput)) { - if (bail) - return FERROR; - } - } - - for (n = QListHead(&fabric->AllFIs); n != NULL; n = QListNext(&fabric->AllFIs, n)) { - node = (NodeData*)QListObj(n); - if (FSUCCESS != DistributePortInfo(oibPort, node, directedOnly, bail, parsableOutput)) { - if (bail) - return FERROR; - } - } - } - - // Distribute PKey Tables - // NOTE: Currently PKey distribution only supports a single block (32 entries) worth of PKey information - if(attributesToProgram & (PROGRAM_ATTR_PKEY | PROGRAM_ATTR_ALL)) { - if(!parsableOutput) - fprintf(stdout, "Sending PKey Table(s)...\n"); - - for(clNode = cl_qmap_head(&fabric->AllNodes); clNode != cl_qmap_end(&fabric->AllNodes); clNode = cl_qmap_next(clNode)) { - node = PARENT_STRUCT(clNode, NodeData, AllNodesEntry); - - if(!node || !node->valid) - continue; - - for(clPort = cl_qmap_head(&node->Ports); clPort != cl_qmap_end(&node->Ports); clPort = cl_qmap_next(clPort)) { - port = PARENT_STRUCT(clPort, PortData, NodePortsEntry); - - if(!port || !port->pPartitionTable) - continue; - - STL_PARTITION_TABLE pkeyTable; - size_t cpyCount = sizeof(STL_PKEY_ELEMENT) * (node->pSwitchInfo ? - node->pSwitchInfo->SwitchInfoData.PartitionEnforcementCap : - node->NodeInfo.PartitionCap); - cpyCount = MIN(cpyCount, sizeof(pkeyTable)); - - memset(&pkeyTable, 0, sizeof(pkeyTable)); - memcpy(&pkeyTable, port->pPartitionTable, cpyCount); - if(SmaSetPartTable(oibPort, directedOnly ? 0 : port->EndPortLID, 0, directedOnly ? node->path : NULL, port->PortNum, 0, &pkeyTable) != FSUCCESS) { - logFailedSMP(node, "Set(PKeyTable)", parsableOutput); - - if(bail) - return FERROR; - } - } - } - } - - // Distribute VLArb Tables - if(attributesToProgram & (PROGRAM_ATTR_VLARB | PROGRAM_ATTR_ALL)) { - if(!parsableOutput) - fprintf(stdout, "Sending VLArb Table(s)...\n"); - - for(clNode = cl_qmap_head(&fabric->AllNodes); clNode != cl_qmap_end(&fabric->AllNodes); clNode = cl_qmap_next(clNode)) { - node = PARENT_STRUCT(clNode, NodeData, AllNodesEntry); - - if(!node || !node->valid) - continue; - - int vlArb = 0; - if (node->NodeInfo.NodeType == STL_NODE_SW) { - cl_map_item_t *it = cl_qmap_get(&node->Ports, 0); - - if (it != cl_qmap_end(&node->Ports)) { - PortData *sp0 = PARENT_STRUCT(it, PortData, NodePortsEntry); - vlArb = sp0->PortInfo.CapabilityMask3.s.VLSchedulingConfig == STL_VL_SCHED_MODE_VLARB; - } else { - fprintf(stderr, - "Warning-%s: cannot get switch port 0 for node %s," - "0x%016"PRIx64". Assuming VLARB Supported = %d.\n", - __func__, node->NodeDesc.NodeString, node->NodeInfo.NodeGUID, vlArb); - } - } - - for(clPort = cl_qmap_head(&node->Ports); clPort != cl_qmap_end(&node->Ports); clPort = cl_qmap_next(clPort)) { - int part; - port = PARENT_STRUCT(clPort, PortData, NodePortsEntry); - - if (node->NodeInfo.NodeType != STL_NODE_SW) - vlArb = port->PortInfo.CapabilityMask3.s.VLSchedulingConfig == STL_VL_SCHED_MODE_VLARB; - - if(!port || !port->pQOS || !vlArb || port->PortInfo.VL.s2.Cap <= 1) - continue; - - for(part = 0; part < STL_VLARB_NUM_SECTIONS; part++) { - // Skip Preemption matrices if not supported - if (part >= STL_VLARB_PREEMPT_ELEMENTS && !(port->PortInfo.PortMode.s.IsVLMarkerEnabled || - port->PortInfo.FlitControl.Interleave.s.MaxNestLevelTxEnabled)) - continue; - - if(SmaSetVLArbTable(oibPort, directedOnly ? 0 : port->EndPortLID, 0, - directedOnly ? node->path : NULL, port->PortNum, part, - &port->pQOS->u.VLArbTable[part]) != FSUCCESS) { - logFailedSMP(node, "Set(VLarbTable)", parsableOutput); - - if(bail) - return FERROR; - } - } - } - } - } - - - // Distribute MFTs - if(attributesToProgram & (PROGRAM_ATTR_MFT | PROGRAM_ATTR_ALL)) { - if(!parsableOutput) - fprintf(stdout, "Sending MFT(s)...\n"); - - for(listNode = QListHead(&fabric->AllSWs); listNode != NULL; listNode = QListNext(&fabric->AllSWs, listNode)) { - node = (NodeData*)QListObj(listNode); - uint8_t pos; - uint32_t element; - - if(!node || !node->valid || !node->switchp || !node->pSwitchInfo - || !(node->pSwitchInfo->SwitchInfoData.MulticastFDBTop & STL_LID_MULTICAST_MASK)) - continue; - - for (pos = 0; pos < STL_NUM_MFT_POSITIONS_MASK; ++pos) { - STL_MULTICAST_FORWARDING_TABLE mftBlk = {{0}}; - uint8_t nonEmpty = 0; - - if (!(node->switchp->MulticastFDB[pos])) - continue; - - for (element = 0; element <= (node->pSwitchInfo->SwitchInfoData.MulticastFDBTop & STL_LID_MULTICAST_MASK); ++element) { - - if ((mftBlk.MftBlock[element % STL_NUM_MFT_ELEMENTS_BLOCK] = node->switchp->MulticastFDB[pos][element])) - nonEmpty = 1; - - if (nonEmpty && ((( (element + 1) % STL_NUM_MFT_ELEMENTS_BLOCK == 0) && (element > 0)) - || (element == (node->pSwitchInfo->SwitchInfoData.MulticastFDBTop & STL_LID_MULTICAST_MASK)) )) { - - if(SmaSetMulticastFDBTable(oibPort, directedOnly ? 0 : node->pSwitchInfo->RID.LID, 0, directedOnly ? node->path : NULL, - (element / STL_NUM_MFT_ELEMENTS_BLOCK), pos, - (STL_MULTICAST_FORWARDING_TABLE*)&mftBlk) != FSUCCESS) { - logFailedSMP(node, "Set(MFT)", parsableOutput); - - if(bail) - return FERROR; - } - mftBlk = (STL_MULTICAST_FORWARDING_TABLE){{0}}; - nonEmpty = 0; - } - } - } - } - } - - // Distribute SLSC Mapping Tables - if(attributesToProgram & (PROGRAM_ATTR_SLSC | PROGRAM_ATTR_ALL)) { - if(!parsableOutput) - fprintf(stdout, "Sending SLSC Mapping Table(s)...\n"); - - for(clNode = cl_qmap_head(&fabric->AllNodes); clNode != cl_qmap_end(&fabric->AllNodes); clNode = cl_qmap_next(clNode)) { - node = PARENT_STRUCT(clNode, NodeData, AllNodesEntry); - - if(!node || !node->valid) - continue; - - for(clPort = cl_qmap_head(&node->Ports); clPort != cl_qmap_end(&node->Ports); clPort = cl_qmap_next(clPort)) { - port = PARENT_STRUCT(clPort, PortData, NodePortsEntry); - - if(!port || !port->pQOS || !port->pQOS->SL2SCMap || (node->NodeInfo.NodeType == STL_NODE_SW && port->PortNum != 0)) - continue; - - if(SmaSetSLSCMappingTable(oibPort, directedOnly ? 0 : port->EndPortLID, 0, directedOnly ? node->path : NULL, port->pQOS->SL2SCMap) != FSUCCESS) { - logFailedSMP(node, "Set(SLSCMappingTable)", parsableOutput); - - if(bail) - return FERROR; - } - } - } - } - - // Distribute SCSL Mapping Tables - if(attributesToProgram & (PROGRAM_ATTR_SCSL | PROGRAM_ATTR_ALL)) { - if(!parsableOutput) - fprintf(stdout, "Sending SCSL Mapping Table(s)...\n"); - - for(clNode = cl_qmap_head(&fabric->AllNodes); clNode != cl_qmap_end(&fabric->AllNodes); clNode = cl_qmap_next(clNode)) { - node = PARENT_STRUCT(clNode, NodeData, AllNodesEntry); - - if(!node || !node->valid) - continue; - - for(clPort = cl_qmap_head(&node->Ports); clPort != cl_qmap_end(&node->Ports); clPort = cl_qmap_next(clPort)) { - port = PARENT_STRUCT(clPort, PortData, NodePortsEntry); - - if(!port || !port->pQOS || !port->pQOS->SC2SLMap || (node->NodeInfo.NodeType == STL_NODE_SW && port->PortNum != 0)) - continue; - - if(SmaSetSCSLMappingTable(oibPort, directedOnly ? 0 : port->EndPortLID, 0, directedOnly ? node->path : NULL, port->pQOS->SC2SLMap) != FSUCCESS) { - logFailedSMP(node, "Set(SCSLMappingTable)", parsableOutput); - - if(bail) - return FERROR; - } - } - } - } - - // Distribute SCSC Mapping Tables - if(attributesToProgram & (PROGRAM_ATTR_SCSC | PROGRAM_ATTR_ALL)) { - if(!parsableOutput) - fprintf(stdout, "Sending SCSC Mapping Table(s)...\n"); - - for(listNode = QListHead(&fabric->AllSWs); listNode != NULL; listNode = QListNext(&fabric->AllSWs, listNode)) { - node = (NodeData*)QListObj(listNode); - - if(!node || !node->valid) - continue; - - for(clPort = cl_qmap_head(&node->Ports); clPort != cl_qmap_end(&node->Ports); clPort = cl_qmap_next(clPort)) { - port = PARENT_STRUCT(clPort, PortData, NodePortsEntry); - - if(!port || !port->pQOS || !QListIsEmpty(&port->pQOS->SC2SCMapList[0])) - continue; - - // NOTE: Implement SC2SC Table once STL2 format is finalized - } - } - } - - // Distribute Buffer Control Tables - if(attributesToProgram & (PROGRAM_ATTR_BFRCTRL | PROGRAM_ATTR_ALL)) { - if(!parsableOutput) - fprintf(stdout, "Sending Buffer Control Table(s)...\n"); - - for(clNode = cl_qmap_head(&fabric->AllNodes); clNode != cl_qmap_end(&fabric->AllNodes); clNode = cl_qmap_next(clNode)) { - node = PARENT_STRUCT(clNode, NodeData, AllNodesEntry); - - if(!node || !node->valid) - continue; - - for(clPort = cl_qmap_head(&node->Ports); clPort != cl_qmap_end(&node->Ports); clPort = cl_qmap_next(clPort)) { - port = PARENT_STRUCT(clPort, PortData, NodePortsEntry); - - if(!port || !port->pBufCtrlTable) - continue; - - if(SmaSetBufferControlTable(oibPort, directedOnly ? 0 : port->EndPortLID, 0, directedOnly ? node->path : NULL, port->PortNum, port->PortNum, port->pBufCtrlTable) != FSUCCESS) { - logFailedSMP(node, "Set(BufCtrlTable)", parsableOutput); - - if(bail) - return FERROR; - } - } - } - } - - - // We need to know the current state of each port to check whether it is allowed to update SC2VL tables or not. - // In case PortInfo is one of attributes to program we can skip this step, as all information is already collected. - if ((attributesToProgram & (PROGRAM_ATTR_SCVLR | PROGRAM_ATTR_SCVLT | PROGRAM_ATTR_SCVLNT)) - && !(attributesToProgram & PROGRAM_ATTR_PORTINFO)) { - - if (updateFabricPortInfo(oibPort, fabric, directedOnly, bail, parsableOutput) != FSUCCESS) { - if (bail) - return FERROR; - } - } - - // Distribute SCVLr Tables - if(attributesToProgram & (PROGRAM_ATTR_SCVLR | PROGRAM_ATTR_ALL)) { - if(!parsableOutput) - fprintf(stdout, "Sending SCVLr Table(s)...\n"); - - for(clNode = cl_qmap_head(&fabric->AllNodes); clNode != cl_qmap_end(&fabric->AllNodes); clNode = cl_qmap_next(clNode)) { - node = PARENT_STRUCT(clNode, NodeData, AllNodesEntry); - - if(!node || !node->valid) - continue; - - // SCVLr is switch-wide, so send one Set(SCVLr) with - // AttrMod.AllPorts = 1 if SCVLr is same for all ports - if (node->NodeInfo.NodeType == STL_NODE_SW) { - STL_SCVLMAP *firstMap = NULL; - int allSame = 1; - - for(clPort = cl_qmap_head(&node->Ports); clPort != cl_qmap_end(&node->Ports); clPort = cl_qmap_next(clPort)) { - port = PARENT_STRUCT(clPort, PortData, NodePortsEntry); - if (!port || !port->pQOS || !getIsVLrSupported(node, port)) - continue; - - if (!firstMap) - firstMap = &port->pQOS->SC2VLMaps[Enum_SCVLr]; - else - allSame = memcmp(firstMap, &port->pQOS->SC2VLMaps[Enum_SCVLr], sizeof(STL_SCVLMAP)) == 0; - - if (!allSame) { - if (!parsableOutput) { - fprintf(stderr, "Error: Cannot set SCVLr on switch %s 0x%016"PRIx64 - ", switch per-port SCVLr tables must be the same.\n", - node->NodeDesc.NodeString, node->NodeInfo.NodeGUID); - } else { - fprintf(stderr, "error;snapshot;%s0x%016"PRIx64 - ";switch per-port SCVLr tables must be the same\n", - node->NodeDesc.NodeString, node->NodeInfo.NodeGUID); - } - - if (bail) - return FERROR; - - break; - } - } - - if (allSame && firstMap) { - port = FindNodePort(node, 0); - if (!port) { - if (!parsableOutput) { - fprintf(stderr, "Error: Unable to find port 0 on switch %s 0x%016"PRIx64"\n", - node->NodeDesc.NodeString, node->NodeInfo.NodeGUID); - } else { - fprintf(stderr, "error;application;%s0x%016"PRIx64 - ";unable to find port 0\n", - node->NodeDesc.NodeString, node->NodeInfo.NodeGUID); - } - return FERROR; - } - sc2vlUpdateType = getSC2VLUpdateType(node, port, Enum_SCVLr); - if (sc2vlUpdateType == SC2VL_UPDATE_TYPE_NONE) { - if (!parsableOutput) { - fprintf(stderr, "Error: Cannot set SCVLr on switch %s 0x%016"PRIx64 - ", switch ports must be in state Init or support asynchronous update\n", - node->NodeDesc.NodeString, node->NodeInfo.NodeGUID); - } else { - fprintf(stderr, "error;application;%s0x%016"PRIx64 - ";switch ports must be in state Init or support asynchronous update\n", - node->NodeDesc.NodeString, node->NodeInfo.NodeGUID); - } - if (bail) - return FERROR; - continue; - } - - if (SmaSetSCVLMappingTable(oibPort, - directedOnly ? 0 : port->EndPortLID, - 0, - directedOnly ? node->path : NULL, - sc2vlUpdateType == SC2VL_UPDATE_TYPE_ASYNC, - 1, - 0, - firstMap, - STL_MCLASS_ATTRIB_ID_SC_VLR_MAPPING_TABLE) != FSUCCESS) { - logFailedSMP(node, "Set(SCVLrMappingTable)", parsableOutput); - - if (bail) - return FERROR; - } - } - } else { - for (clPort = cl_qmap_head(&node->Ports); clPort != cl_qmap_end(&node->Ports);clPort = cl_qmap_next(clPort)) { - port = PARENT_STRUCT(clPort, PortData, NodePortsEntry); - - if (!port || !port->pQOS || !getIsVLrSupported(node, port)) - continue; - - sc2vlUpdateType = getSC2VLUpdateType(node, port, Enum_SCVLr); - if (sc2vlUpdateType == SC2VL_UPDATE_TYPE_NONE) { - if (!parsableOutput) { - fprintf(stderr, "Error: Cannot set SCVLr on port %d in state %s" - ", port must be in state Init or support asynchronous update\n", - port->PortNum, StlPortStateToText(port->PortInfo.PortStates.s.PortState)); - } else { - fprintf(stderr, "error;application;cannot set SCVLr on port %d in state %s" - ";port must be in state Init or support asynchronous update\n", - port->PortNum, StlPortStateToText(port->PortInfo.PortStates.s.PortState)); - } - if (bail) - return FERROR; - continue; - } - - if (SmaSetSCVLMappingTable(oibPort, - directedOnly ? 0 : port->EndPortLID, - 0, - directedOnly ? node->path : NULL, - sc2vlUpdateType == SC2VL_UPDATE_TYPE_ASYNC, - 0, - port->PortNum, - &port->pQOS->SC2VLMaps[Enum_SCVLr], - STL_MCLASS_ATTRIB_ID_SC_VLR_MAPPING_TABLE) != FSUCCESS) { - logFailedSMP(node, "Set(SCVLrMappingTable)", parsableOutput); - - if (bail) - return FERROR; - } - } - } - } - } - - // Distribute SCVLt Tables - if(attributesToProgram & (PROGRAM_ATTR_SCVLT | PROGRAM_ATTR_ALL)) { - if(!parsableOutput) - fprintf(stdout, "Sending SCVLt Table(s)...\n"); - - for(clNode = cl_qmap_head(&fabric->AllNodes); clNode != cl_qmap_end(&fabric->AllNodes); clNode = cl_qmap_next(clNode)) { - node = PARENT_STRUCT(clNode, NodeData, AllNodesEntry); - - if(!node || !node->valid) - continue; - - for(clPort = cl_qmap_head(&node->Ports); clPort != cl_qmap_end(&node->Ports); clPort = cl_qmap_next(clPort)) { - port = PARENT_STRUCT(clPort, PortData, NodePortsEntry); - - if(!port || !port->pQOS) - continue; - - sc2vlUpdateType = getSC2VLUpdateType(node, port, Enum_SCVLt); - if (sc2vlUpdateType == SC2VL_UPDATE_TYPE_NONE) { - if (!parsableOutput) { - fprintf(stderr, "Error: Cannot set SCVLt on port %d in state %s" - ", port must be in state Init or support asynchronous update\n", - port->PortNum, StlPortStateToText(port->PortInfo.PortStates.s.PortState)); - } else { - fprintf(stderr, "error;application;cannot set SCVLt on port %d in state %s" - ";port must be in state Init or support asynchronous update\n", - port->PortNum, StlPortStateToText(port->PortInfo.PortStates.s.PortState)); - } - if (bail) - return FERROR; - continue; - } - - if (SmaSetSCVLMappingTable(oibPort, - directedOnly ? 0 : port->EndPortLID, - 0, - directedOnly ? node->path : NULL, - sc2vlUpdateType == SC2VL_UPDATE_TYPE_ASYNC, - 0, - port->PortNum, - &port->pQOS->SC2VLMaps[Enum_SCVLt], - STL_MCLASS_ATTRIB_ID_SC_VLT_MAPPING_TABLE) != FSUCCESS) { - logFailedSMP(node, "Set(SCVLtMappingTable)", parsableOutput); - - if (bail) - return FERROR; - } - } - } - } - - // Distribute SCVLnt tables - if(attributesToProgram & (PROGRAM_ATTR_SCVLNT | PROGRAM_ATTR_ALL)) { - if(!parsableOutput) - fprintf(stdout, "Sending SCVLnt Table(s)...\n"); - - for(clNode = cl_qmap_head(&fabric->AllNodes); clNode != cl_qmap_end(&fabric->AllNodes); clNode = cl_qmap_next(clNode)) { - node = PARENT_STRUCT(clNode, NodeData, AllNodesEntry); - - if(!node || !node->valid) - continue; - - for(clPort = cl_qmap_head(&node->Ports); clPort != cl_qmap_end(&node->Ports); clPort = cl_qmap_next(clPort)) { - port = PARENT_STRUCT(clPort, PortData, NodePortsEntry); - - if(!port || !port->pQOS || (node->NodeInfo.NodeType == STL_NODE_SW && port->PortNum == 0)) - continue; - - sc2vlUpdateType = getSC2VLUpdateType(node, port, Enum_SCVLnt); - if (sc2vlUpdateType == SC2VL_UPDATE_TYPE_NONE) { - if (!parsableOutput) { - fprintf(stderr, "Error: Cannot set SCVLnt on port %d in state %s" - ", port must be in state Init or support asynchronous update\n", - port->PortNum, StlPortStateToText(port->PortInfo.PortStates.s.PortState)); - } else { - fprintf(stderr, "error;application;cannot set SCVLnt on port %d in state %s" - ";port must be in state Init or support asynchronous update\n", - port->PortNum, StlPortStateToText(port->PortInfo.PortStates.s.PortState)); - } - continue; - } - - // asynchronous update is taken by the SMA - if (sc2vlUpdateType == SC2VL_UPDATE_TYPE_ASYNC) - continue; - - if (SmaSetSCVLMappingTable(oibPort, - directedOnly ? 0 : port->EndPortLID, - 0, - directedOnly ? node->path : NULL, - sc2vlUpdateType == SC2VL_UPDATE_TYPE_ASYNC, - 0, - port->PortNum, - &port->pQOS->SC2VLMaps[Enum_SCVLnt], - STL_MCLASS_ATTRIB_ID_SC_VLNT_MAPPING_TABLE) != FSUCCESS) { - logFailedSMP(node, "Set(SCVLntMappingTable)", parsableOutput); - - if (bail) - return FERROR; - } - } - } - } - - - if(!parsableOutput) - fprintf(stdout, "Fabric Programming Completed\n"); - - return status; -} - -FSTATUS activateFabric(struct omgt_port* oibPort, FabricData_t* fabric, uint8_t directedOnly, uint8_t bail, uint8_t parsableOutput) { - FSTATUS status = FSUCCESS; - cl_map_item_t *clNode, *clPort; - NodeData* node; - PortData* port; - STL_PORT_INFO portInfo; - - if(!parsableOutput) - fprintf(stdout, "Arming Ports...\n"); - - for(clNode = cl_qmap_head(&fabric->AllNodes); clNode != cl_qmap_end(&fabric->AllNodes); clNode = cl_qmap_next(clNode)) { - node = PARENT_STRUCT(clNode, NodeData, AllNodesEntry); - - if(!node || !node->valid) - continue; - - for(clPort = cl_qmap_head(&node->Ports); clPort != cl_qmap_end(&node->Ports); clPort = cl_qmap_next(clPort)) { - port = PARENT_STRUCT(clPort, PortData, NodePortsEntry); - - if(!port) - continue; - - if(!port->neighbor) { - /* exclude switch port 0 */ - if (!(node->NodeInfo.NodeType == STL_NODE_SW && port->PortNum == 0)) - continue; - } - - if(port->neighbor && !port->neighbor->nodep->valid) - continue; - - memset(&portInfo, 0, sizeof(portInfo)); - - if(SmaGetPortInfo(oibPort, directedOnly ? 0 : port->EndPortLID, 0, directedOnly ? node->path : NULL, port->PortNum, 1, &portInfo) != FSUCCESS) { - logFailedSMP(node, "Get(PortInfo)", parsableOutput); - - if(bail) - return FERROR; - } - - if(portInfo.PortStates.s.PortState != IB_PORT_INIT) - continue; - - // Set the "No chang'e" attributes - portInfo.LinkSpeed.Enabled = 0; - portInfo.LinkWidth.Enabled = 0; - portInfo.PortStates.s.PortPhysicalState = IB_PORT_PHYS_NOP; - portInfo.s4.OperationalVL = 0; - portInfo.PortStates.s.PortState = IB_PORT_ARMED; - - if(SmaSetPortInfo(oibPort, directedOnly ? 0 : port->EndPortLID, 0, directedOnly ? node->path : NULL, port->PortNum, &portInfo) != FSUCCESS) { - logFailedSMP(node, "Set(PortInfo)", parsableOutput); - - if(bail) - return FERROR; - } - } - } - - if(!parsableOutput) - fprintf(stdout, "Activating Ports...\n"); - - for(clNode = cl_qmap_head(&fabric->AllNodes); clNode != cl_qmap_end(&fabric->AllNodes); clNode = cl_qmap_next(clNode)) { - node = PARENT_STRUCT(clNode, NodeData, AllNodesEntry); - - if(!node || !node->valid) - continue; - - for(clPort = cl_qmap_head(&node->Ports); clPort != cl_qmap_end(&node->Ports); clPort = cl_qmap_next(clPort)) { - port = PARENT_STRUCT(clPort, PortData, NodePortsEntry); - - if(!port) - continue; - - if(!port->neighbor) { - /* exclude switch port 0 */ - if (!(node->NodeInfo.NodeType == STL_NODE_SW && port->PortNum == 0)) - continue; - } - - if(port->neighbor && !port->neighbor->nodep->valid) - continue; - - memset(&portInfo, 0, sizeof(portInfo)); - - if(SmaGetPortInfo(oibPort, directedOnly ? 0 : port->EndPortLID, 0, directedOnly ? node->path : NULL, port->PortNum, 0, &portInfo) != FSUCCESS) { - logFailedSMP(node, "Get(PortInfo)", parsableOutput); - - if(bail) - return FERROR; - } - - if(portInfo.PortStates.s.PortState != IB_PORT_ARMED) - continue; - - // Set the "No change" attributes - portInfo.LinkSpeed.Enabled = 0; - portInfo.LinkWidth.Enabled = 0; - portInfo.PortStates.s.PortPhysicalState = IB_PORT_PHYS_NOP; - portInfo.s4.OperationalVL = 0; - portInfo.PortStates.s.PortState = IB_PORT_ACTIVE; - - if(SmaSetPortInfo(oibPort, directedOnly ? 0 : port->EndPortLID, 0, directedOnly ? node->path : NULL, port->PortNum, &portInfo) != FSUCCESS) { - logFailedSMP(node, "Set(PortInfo)", parsableOutput); - - if(bail) - return FERROR; - } - } - } - - return status; -} - -int main(int argc, char ** argv) -{ - int c; - int index; - FSTATUS status = 0; - int exitStatus = 0; - struct omgt_port* oibPort; - FabricData_t fabric = { 0 }; - char attributeString[100]; - memset(attributeString, 0, 100); - NodeData* localNode = NULL; - cl_map_item_t *mapPort; - PortData* portData; - - uint8_t filenameOptind = 0; - uint8_t verbose = 0; - uint8_t hfi = 0; - uint8_t port = 0; - uint8_t programOnly = 0; - uint8_t activateOnly = 0; - uint32_t attributesToProgram = PROGRAM_ATTR_ALL; - uint8_t sendAttempts = 2; - uint8_t directedOnly = 0; - uint8_t strictMatching = 0; - uint8_t bailOnError = 0; - uint8_t parsableOutput = 0; - - Top_setcmdname("opasnapconfig"); - - // process command line arguments - while (-1 != (c = getopt_long(argc,argv, "vh:p:PAa:c:dsbg", - options, &index))) - { - switch (c) - { - case '$': - Usage_full(); - break; - case 'v': - verbose++; - setTopologyMadVerboseFile(stdout); - if (verbose > 3) umad_debug(verbose - 3); - break; - case 'h': - if (FSUCCESS != StringToUint8(&hfi, optarg, NULL, 0, TRUE)) { - fprintf(stderr, "opasnapconfig: Invalid HFI Number: %s\n", optarg); - Usage(); - } - break; - case 'p': - if (FSUCCESS != StringToUint8(&port, optarg, NULL, 0, TRUE)) { - fprintf(stderr, "opasnapconfig: Invalid Port Number: %s\n", optarg); - Usage(); - } - break; - case 'P': - if(activateOnly) { - fprintf(stderr, "opasnapconfig: Cannot specify both -P and -A flag together\n"); - Usage(); - } - programOnly = 1; - break; - case 'A': - if(programOnly) { - fprintf(stderr, "opasnapconfig: Cannot specify both -P and -A flag together\n"); - Usage(); - } - activateOnly = 1; - break; - case 'a': - attributesToProgram &= ~PROGRAM_ATTR_ALL; - attributesToProgram |= attributeToFlag(optarg); - break; - case 'c': - if (FSUCCESS != StringToUint8(&sendAttempts, optarg, NULL, 0, TRUE)) { - fprintf(stderr, "opasnapconfig: Invalid Number of Attempts: %s\n", optarg); - Usage(); - } - setTopologyMadRetryCount(sendAttempts); - break; - case 'd': - directedOnly = 1; - break; - case 's': - strictMatching = 1; - break; - case 'b': - bailOnError = 1; - break; - case 'g': - parsableOutput = 1; - break; - default: - fprintf(stderr, "opasnapconfig: Invalid option -%c\n", c); - Usage(); - break; - } - } /* end while */ - - // Check the and make sure there is exactly one input snapshot file - if (optind == argc - 1) - { - filenameOptind = optind; - } else if (optind == argc){ - fprintf(stderr, "opasnapconfig: no input snapshot file specified\n"); - Usage(); - } else { - fprintf(stderr, "opasnapconfig: multiple input snapshot files unsupported\n"); - Usage(); - } - - if (!(*argv[filenameOptind])) { - fprintf(stderr, "opasnapconfig: Error: null input filename\n"); - exitStatus = EXIT_STATUS_BAD_FILENAME; - Usage(); - } - - // Output run summary info - if(!parsableOutput) { - fprintf(stdout, "Input file: %s\n", argv[filenameOptind]); - fprintf(stdout, "Programming Phase: %s\n", activateOnly ? "No" : "Yes"); - fprintf(stdout, "Activation Phase: %s\n", programOnly ? "No" : "Yes"); - attributeFlagsToString(attributesToProgram, attributeString, 100); - fprintf(stdout, "Selected Attributes: %s\n", attributeString); - - // Parse snapshot file - fprintf(stdout, "\n"); - fprintf(stdout, "Parsing snapshot file... "); - } - - if (FSUCCESS != Xml2ParseSnapshot(argv[filenameOptind], 1, &fabric, FF_NONE, 0)) { - if(parsableOutput) - fprintf(stderr, "error;application;Xml2ParseSnapshot;Failed to parse snapshot\n"); - else - fprintf(stderr, "ERROR: Failed to parse input snapshot file\n"); - - exitStatus = EXIT_STATUS_FAILED_PARSE; - goto done; - } - if(!parsableOutput) - fprintf(stdout, "Done\n"); - - // Open a port to the fabric - struct omgt_params params = {.debug_file = (verbose > 2 ? stdout : NULL)}; - status = omgt_open_port_by_num (&oibPort, hfi, port, ¶ms); - if (status == OMGT_STATUS_NOT_DONE) { - // Wildcard search for either/or port & hfi yielded no ACTIVE ports. - if (!port) { - if(!hfi) { - // System wildcard search for Active port failed. - // Fallback and query default hfi:1, port:1 - if(!parsableOutput) - fprintf(stderr, "No Active port found in system. Trying default hfi:1 port:1\n"); - hfi = 1; - port = 1; - status = omgt_open_port_by_num(&oibPort, hfi, port, ¶ms); - } else { - if(parsableOutput) - fprintf(stderr, "error;application;openLocalPort;No active port found on hfi:%d\n", hfi); - else - fprintf(stderr, "No Active port found on hfi:%d\n", hfi); - exit (EXIT_STATUS_FAILED_OPEN_PORT); - } - } - } - if (status != 0) { - if(parsableOutput) - fprintf(stderr, "error;application;openLocalPort;Failed to open port hfi:%d:%d: %s\n", hfi, port, strerror(status)); - else - fprintf(stderr, "Failed to open port hfi %d:%d: %s\n", hfi, port, strerror(status)); - - exit(EXIT_STATUS_FAILED_OPEN_PORT); - } - - // Perform pre-programming prep - localNode = locateLocalNode(oibPort, &fabric, strictMatching, parsableOutput); - if(localNode == NULL) { - if(parsableOutput) - fprintf(stderr, "error;snapshot;locateLocalNode;Failed to properly locate local node in snapshot file\n"); - else - fprintf(stderr, "ERROR: Failed to properly locate local node in snapshot file. Unable to calculate packet routes.\n"); - - exitStatus = EXIT_STATUS_NO_LOCAL_NODE; - goto done; - } - - - // Recursivly verify the identities of all nodes in our snapshot file - for (mapPort = cl_qmap_head(&localNode->Ports); mapPort != cl_qmap_end(&localNode->Ports); mapPort = cl_qmap_next(mapPort)) { - portData = PARENT_STRUCT(mapPort, PortData, NodePortsEntry); - - if(portData->neighbor != NULL && portData->neighbor->nodep != NULL && portData->PortNum != 0) { - FSTATUS status; - uint8_t path[DR_PATH_SIZE]; - memset(path, 0, sizeof(path)); - - // Set the path port number and hop count - path[0] = 1; - path[1] = portData->PortNum; - - status = verifyNodeIdentityRecurse(oibPort, portData->neighbor->nodep, path, strictMatching, bailOnError, parsableOutput); - if(status != FSUCCESS){ - exitStatus = EXIT_STATUS_FAILED_IDENTITY_VERIFICATION; - goto done; - } - } - } - status = checkAllNodesVerified(&fabric, parsableOutput); - if(status != FSUCCESS){ - exitStatus = EXIT_STATUS_FAILED_IDENTITY_VERIFICATION; - goto done; - } - - // Program the fabric using the SMP information we have - if(!activateOnly) { - status = distributeSMPs(oibPort, &fabric, attributesToProgram, directedOnly, bailOnError, parsableOutput); - if(status != FSUCCESS) { - if(parsableOutput) - fprintf(stderr, "error;application;distributeSMPs;Failed to distribute all SMPs\n"); - else - fprintf(stderr, "ERROR: Failed to distribute all SMPs\n"); - - exitStatus = EXIT_STATUS_FAILED_SMP_DISTRIBUTION; - goto done; - } - } - - // Perform fabric activation - if(!programOnly) { - status = activateFabric(oibPort, &fabric, directedOnly, bailOnError, parsableOutput); - if(status != FSUCCESS) { - if(parsableOutput) - fprintf(stderr, "error;application;activateFabric;Failed to activate all nodes in fabric\n"); - else - fprintf(stderr, "ERROR: Failed to activate all nodes in fabric\n"); - - exitStatus = EXIT_STATUS_FAILED_ACTIVATION; - goto done; - } - } - -done: - DestroyFabricData(&fabric); - - if (exitStatus == EXIT_STATUS_BADOPTIONS) - Usage(); - - return exitStatus; -} diff --git a/IbaTools/opatop/opatop.c b/IbaTools/opatop/opatop.c index 4722b26..751783e 100644 --- a/IbaTools/opatop/opatop.c +++ b/IbaTools/opatop/opatop.c @@ -340,7 +340,7 @@ uint32 g_focusVFArrayEndIdx = 13; * *******************************************************************************/ static int get_input( uint32 n_optn, uint32 n_chars, char *bf_input, - char *bf_multi ) + char *bf_multi, boolean *isdelchar ) { int32 ret_val = 0; static uint32 ct_hold = 0; @@ -364,8 +364,15 @@ static int get_input( uint32 n_optn, uint32 n_chars, char *bf_input, time_select.tv_sec = 0; time_select.tv_usec = 10000; // 10 mSec - if (select(1, &fd_set_read, NULL, NULL, &time_select) > 0) - bf_hold[ct_hold++] = fgetc(stdin); + if (select(1, &fd_set_read, NULL, NULL, &time_select) > 0) { + char input = fgetc(stdin); + if (ct_hold > 0 && (input == 0x08 || input == 127)) { // BackSpace Or Del + bf_hold[ct_hold--] = 0; + *isdelchar = TRUE; // reprint line so we can handle delchar. + } else if (isprint(input) || input == 0x0A) { + bf_hold[ct_hold++] = input; + } + } if (ct_hold >= n_chars) bf_hold[(ct_hold = n_chars) - 1] = 0x0A; @@ -379,6 +386,10 @@ static int get_input( uint32 n_optn, uint32 n_chars, char *bf_input, memcpy(bf_input, bf_hold, ct_hold); ret_val = ct_hold; ct_hold = 0; + } else if (ct_hold > 0) { + // Return input string, so we can reprint on screen refresh + memcpy(bf_input, bf_hold, ct_hold); + bf_input[ct_hold] = 0; } return (ret_val); @@ -818,7 +829,7 @@ void DisplayScreen_Help(const char* helpfile) } // End of while (TRUE) } -void DisplayScreen(void) +void DisplayScreen(char *text_input) { int ix; int ct_lines; @@ -2531,10 +2542,10 @@ void DisplayScreen(void) for ( ; ct_lines > 0; ct_lines--) printf("\n"); - printf("Quit up Live/rRev/fFwd/bookmrked Bookmrk Unbookmrk ?help |%c", + printf("Quit up Live/rRev/fFwd/time/bookmrked Bookmrk Unbookmrk ?help |%c", (tb_menu[n_level_menu] == SCREEN_VF_SUMMARY || tb_menu[n_level_menu] == SCREEN_SUMMARY) ? '\n' : ' '); - p_multi_input = "qQ"; + p_multi_input = "qQt"; switch (tb_menu[n_level_menu]) { @@ -2555,19 +2566,19 @@ void DisplayScreen(void) if (g_expr_funct) { printf("cC I0-n N0-n Detail:\n"); - p_multi_input = "iInNqQ"; + p_multi_input = "iInNqQt"; } else { printf("cC N0-n Detail:\n"); - p_multi_input = "nNqQ"; + p_multi_input = "nNqQt"; } break; case SCREEN_VF_CONFIG: case SCREEN_GROUP_CONFIG: printf("sS P0-n:\n"); - p_multi_input = "pPqQ"; + p_multi_input = "pPqQt"; break; case SCREEN_VF_FOCUS: @@ -2575,12 +2586,12 @@ void DisplayScreen(void) if (g_expr_funct) { printf("sS cC I0-n N0-n P0-n:\n"); - p_multi_input = "iInNpPqQ"; + p_multi_input = "iInNpPqQt"; } else { printf("sS cC N0-n P0-n:\n"); - p_multi_input = "nNpPqQ"; + p_multi_input = "nNpPqQt"; } break; @@ -2593,7 +2604,6 @@ void DisplayScreen(void) } printf("sS%s:\n", ((tb_menu[n_level_menu - 1] == SCREEN_VF_FOCUS )|| (tb_menu[n_level_menu - 1] == SCREEN_VF_CONFIG)) ? " vV" : ""); - fflush(stdout); break; case SCREEN_VF_PORT_STATS: @@ -2604,7 +2614,6 @@ void DisplayScreen(void) printf("Neighbor "); } printf("vV:\n"); - fflush(stdout); break; default: @@ -2613,6 +2622,10 @@ void DisplayScreen(void) } // End of switch (tb_menu[n_level_menu]) + // Print stdin input buffer after screen refresh + if (text_input) printf("%s", text_input); + fflush(stdout); + } // End of DisplayScreen() // command line options, each has a short and long flag name @@ -2680,7 +2693,7 @@ int main(int argc, char ** argv) long int temp2 = 0; char *endptr; int n_cmd; - char tb_cmd[64]; + char tb_cmd[64] = ""; time_t time_start; int pa_service_state = OMGT_SERVICE_STATE_UNKNOWN; int ms_timeout = OMGT_DEF_TIMEOUT_MS; @@ -2816,11 +2829,12 @@ int main(int argc, char ** argv) { time_start = time(NULL); ct_interval += 1; - DisplayScreen(); + DisplayScreen(tb_cmd); while ((time(NULL) - time_start) < g_interval) { - if (get_input(0, 7, tb_cmd, p_multi_input) > 0) + boolean isdelchar = FALSE; + if (get_input(0, sizeof(tb_cmd)-1, tb_cmd, p_multi_input, &isdelchar) > 0) { // Clear displayed error if (fb_error_displayed) @@ -2942,6 +2956,72 @@ int main(int argc, char ** argv) "NO IMAGE FROM WHICH TO SELECT" ); } + else if ( n_cmd == 't' ) { + uint32 time_val = 0; + + char *ret = strchr(tb_cmd+1, 0x0A); + if (ret) *ret = 0; // clear after enter + + if (( fstatus = StringToDateTime(&time_val, tb_cmd+1)) == FSUCCESS && time_val > 0) + { + if ( g_imageIdQuery.imageNumber == PACLIENT_IMAGE_CURRENT ) + { + g_imageIdTemp.imageNumber = PACLIENT_IMAGE_TIMED; + g_imageIdTemp.imageOffset = 0; + g_imageIdTemp.imageTime.absoluteTime = time_val; + + if ( ( fstatus = omgt_pa_freeze_image(g_portHandle, g_imageIdTemp, + &g_imageIdResp) ) == FSUCCESS ) + { + g_imageIdQuery = g_imageIdFreeze = g_imageIdResp; + g_offset = 0; + } else { + snprintf( &bf_error[strlen(bf_error)], sizeof(bf_error)-strlen(bf_error), + "TIME (%s) IMAGE NOT AVAILABLE fstatus:%u %s", + tb_cmd+1, fstatus, iba_fstatus_msg(fstatus) ); + } + } + else if ( g_imageIdFreeze.imageNumber != PACLIENT_IMAGE_CURRENT ) + { + g_imageIdTemp.imageNumber = PACLIENT_IMAGE_TIMED; + g_imageIdTemp.imageOffset = 0; + g_imageIdTemp.imageTime.absoluteTime = time_val; + + if ( ( fstatus = omgt_pa_move_image_freeze(g_portHandle, g_imageIdFreeze, + &g_imageIdTemp) ) == FSUCCESS ) + { + g_imageIdQuery = g_imageIdFreeze = g_imageIdTemp; + g_offset = 0; + } else { + snprintf( &bf_error[strlen(bf_error)], sizeof(bf_error)-strlen(bf_error), + "TIME (%s) IMAGE NOT AVAILABLE fstatus:%u %s", + tb_cmd+1, fstatus, iba_fstatus_msg(fstatus) ); + } + } + else if ( g_imageIdBookmark.imageNumber != PACLIENT_IMAGE_CURRENT ) + { + g_imageIdTemp.imageNumber = PACLIENT_IMAGE_TIMED; + g_imageIdTemp.imageOffset = 0; + g_imageIdTemp.imageTime.absoluteTime = time_val; + + if ( ( fstatus = omgt_pa_freeze_image( g_portHandle, g_imageIdTemp, + &g_imageIdResp) ) == FSUCCESS ) + { + g_imageIdQuery = g_imageIdFreeze = g_imageIdResp; + g_offset = 0; + } else { + snprintf( &bf_error[strlen(bf_error)], sizeof(bf_error)-strlen(bf_error), + "TIME (%s) IMAGE NOT AVAILABLE fstatus:%u %s", + tb_cmd+1, fstatus, iba_fstatus_msg(fstatus) ); + } + } + } else { + snprintf(&bf_error[strlen(bf_error)], sizeof(bf_error)-strlen(bf_error), + "TIME (%s) FORMAT INVALID fstatus:%u %s", + tb_cmd+1, fstatus, iba_fstatus_msg(fstatus) ); + } + } + else if ( (n_cmd == 'b') && ( g_imageIdBookmark.imageNumber != PACLIENT_IMAGE_CURRENT ) ) @@ -2956,7 +3036,7 @@ int main(int argc, char ** argv) g_imageIdQuery.imageNumber = g_imageIdBookmark.imageNumber; g_offset = g_imageIdQuery.imageOffset = 0; } - + else if ( (n_cmd == 'B') && ( g_imageIdBookmark.imageNumber == PACLIENT_IMAGE_CURRENT ) ) @@ -3403,11 +3483,14 @@ int main(int argc, char ** argv) --n_level_menu; } } - - DisplayScreen(); + tb_cmd[0] = 0; + DisplayScreen(NULL); } // End of if ((temp2 = select(1, &fd_set_read, NULL, NULL - + else if (isdelchar) { + printf("\b \b"); + fflush(stdout); + } } // End of while ((time(NULL) - time_start) < g_interval) // Renew frozen image if present @@ -3417,7 +3500,7 @@ int main(int argc, char ** argv) // Renew bookmark image if present if (g_imageIdBookmark.imageNumber != PACLIENT_IMAGE_CURRENT) omgt_pa_renew_image(g_portHandle, g_imageIdBookmark); - + } // End of while (TRUE) quit: diff --git a/IbaTools/opatop/opatop_summary.hlp b/IbaTools/opatop/opatop_summary.hlp index a992b67..e12bbde 100644 --- a/IbaTools/opatop/opatop_summary.hlp +++ b/IbaTools/opatop/opatop_summary.hlp @@ -116,6 +116,7 @@ The following input commands are available in every screen: L: Select Live image R: Navigate reverse 1 (r*) or 5 (R*) sweeps F: Navigate forward 1 (f*) or 5 (F*) sweeps + t*: Navigate to a provided time b*: Select (previously) Bookmarked image B*: Bookmark currently selected image U*: Unbookmark Bookmarked image diff --git a/IbaTools/opaxmlextract/Makefile b/IbaTools/opaxmlextract/Makefile index ed9c0e3..c1ada61 100644 --- a/IbaTools/opaxmlextract/Makefile +++ b/IbaTools/opaxmlextract/Makefile @@ -81,8 +81,8 @@ LIB_TARGETS_MISC = # targets to build during CMDS phase CMD_TARGETS_SHLIB = CMD_TARGETS_EXE = $(EXECUTABLE) -CMD_TARGETS_MISC = opaextracterror opaextractperf \ - opaextractstat opaextractstat2 opaextractlink +CMD_TARGETS_MISC = opaextracterror opaextractperf opaextractperf2 \ + opaextractstat opaextractstat2 opaextractlink opamergeperf2 # files to remove during clean phase CLEAN_TARGETS_MISC = CLEAN_TARGETS = $(OBJECTS) $(RSCOBJECTS) $(IDL_TARGETS) $(CLEAN_TARGETS_MISC) @@ -149,7 +149,7 @@ include $(TL_DIR)/Makerules/Maketargets.install # install for stage phase #include $(TL_DIR)/Makerules/Maketargets.stage STAGE:: - $(VS)$(STAGE_INSTALL) $(STAGE_INSTALL_DIR_OPT) $(PROJ_STAGE_FASTFABRIC_DIR) $(EXECUTABLE) opaextracterror opaextractperf opaextractstat opaextractstat2 opaextractlink + $(VS)$(STAGE_INSTALL) $(STAGE_INSTALL_DIR_OPT) $(PROJ_STAGE_FASTFABRIC_DIR) $(EXECUTABLE) opaextracterror opaextractperf opaextractperf2 opaextractstat opaextractstat2 opaextractlink opamergeperf2 # Unit test execution #include $(TL_DIR)/Makerules/Maketargets.runtest diff --git a/IbaTools/opaxmlextract/opaextractlink.sh b/IbaTools/opaxmlextract/opaextractlink.sh index 26aaef3..9b6e769 100755 --- a/IbaTools/opaxmlextract/opaextractlink.sh +++ b/IbaTools/opaxmlextract/opaextractlink.sh @@ -183,7 +183,7 @@ function genReport() tempresults=$RateStr";"$LinkDetailsStr";"$CableValuesStr";"$CableInfoValuesStr";"$Port1ValuesStr";"$Port2ValuesStr fi fi - done < <(/usr/sbin/opareport -x -o links "$@" -d 3 | \ + done < <(/usr/sbin/opareport -x -Q -o links "$@" -d 3 | \ /usr/sbin/opaxmlextract -H -d \; -e Link:id -e Rate -e LinkDetails -e CableLength \ -e CableLabel -e CableDetails -e DeviceTechShort -e CableInfo.Length \ -e CableInfo.VendorName -e CableInfo.VendorPN -e CableInfo.VendorRev \ diff --git a/IbaTools/opaxmlextract/opaextractperf2.sh b/IbaTools/opaxmlextract/opaextractperf2.sh new file mode 100755 index 0000000..bfefc4b --- /dev/null +++ b/IbaTools/opaxmlextract/opaextractperf2.sh @@ -0,0 +1,122 @@ +#!/bin/bash +# BEGIN_ICS_COPYRIGHT8 **************************************** +# +# Copyright (c) 2019, Intel Corporation +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, +# this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of Intel Corporation nor the names of its contributors +# may be used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# END_ICS_COPYRIGHT8 **************************************** + +# [ICS VERSION STRING: unknown] + +# Run opareport with standard options and pipe output to opaxmlextract to +# extract all performance counters into a csv file format +tempfile="$(mktemp)" +trap "rm -f $tempfile; exit 1" SIGHUP SIGTERM SIGINT +trap "rm -f $tempfile" EXIT + + +Usage_full() +{ + echo "Usage: ${cmd} [opareport options]" >&2 + echo " or" >&2 + echo " ${cmd} --help" >&2 + echo " --help - produce full help text." >&2 + echo " opareport options - options will be passed to opareport." >&2 + echo >&2 + echo "${cmd} provides a report of all performance counters in a " >&2 + echo "CSV format suitable for importing into a spreadsheet or parsed by" >&2 + echo "other scripts." >&2 + echo >&2 + echo "for example:" >&2 + echo " ${cmd}" >&2 + echo >&2 + echo " ${cmd} -h 1 -p 2" >&2 + echo >&2 + echo "See the man page for \"opareport\" for the full set of options.">&2 + echo "Do no use \"-o/--output\" report option." >&2 + echo >&2 + exit 0 +} + +Usage() +{ + echo "Usage: ${cmd} [opareport options]" >&2 + echo " or" >&2 + echo " ${cmd} --help" >&2 + echo " --help - produce full help text." >&2 + echo " opareport options - options will be passed to opareport." >&2 + echo "for example:" >&2 + echo " ${cmd}" >&2 + echo >&2 + exit 2 +} + +## Main function + +cmd=`basename $0` +if [ x"$1" = "x--help" ] +then + Usage_full +fi + +IFS=';' +/usr/sbin/opareport -o comps -s -x -Q -d 10 "$@" > $tempfile +if [ -s $tempfile ] +then + # minor reformatting of header line to condense column names + echo "NodeDesc;NodeType;NodeGUID;PortNum;nNodeDesc;nNodeType;nNodeGUID;nPortNum;LinkSpeedActive;LinkWidthDnGradeTxActive;LinkWidthDnGradeRxActive;XmitDataMB;XmitData;XmitPkts;MulticastXmitPkts;RcvDataMB;RcvData;RcvPkts;MulticastRcvPkts;XmitWait;CongDiscards;XmitTimeCong;MarkFECN;RcvFECN;RcvBECN;RcvBubble;XmitWastedBW;XmitWaitData;LinkQualityIndicator;LocalLinkIntegrityErrors;RcvErrors;ExcessiveBufferOverruns;LinkErrorRecovery;LinkDowned;UncorrectableErrors;FMConfigErrors;XmitConstraintErrors;RcvConstraintErrors;RcvSwitchRelayErrors;XmitDiscards;RcvRemotePhysicalErrors" + cat $tempfile | /usr/sbin/opaxmlextract -H -d \; -e Node.NodeDesc -e Node.NodeType -e Node.NodeGUID -e PortInfo.PortNum -e Neighbor.Port.NodeDesc -e Neighbor.Port.NodeType -e Neighbor.Port.NodeGUID -e Neighbor.Port.PortNum -e LinkSpeedActive -e LinkWidthDnGradeTxActive -e LinkWidthDnGradeRxActive -e XmitDataMB -e XmitData -e XmitPkts -e MulticastXmitPkts -e RcvDataMB -e RcvData -e RcvPkts -e MulticastRcvPkts -e XmitWait -e CongDiscards -e XmitTimeCong -e MarkFECN -e RcvFECN -e RcvBECN -e RcvBubble -e XmitWastedBW -e XmitWaitData -e LinkQualityIndicator -e LocalLinkIntegrityErrors -e RcvErrors -e ExcessiveBufferOverruns -e LinkErrorRecovery -e LinkDowned -e UncorrectableErrors -e FMConfigErrors -e XmitConstraintErrors -e RcvConstraintErrors -e RcvSwitchRelayErrors -e XmitDiscards -e RcvRemotePhysicalErrors -s SMs | \ + while read NodeDesc NodeType NodeGUID PortNum nNodeDesc nNodeType nNodeGUID nPortNum LinkSpeedActive LinkWidthDnGradeTxActive LinkWidthDnGradeRxActive XmitDataMB XmitData XmitPkts MulticastXmitPkts RcvDataMB RcvData RcvPkts MulticastRcvPkts XmitWait CongDiscards XmitTimeCong MarkFECN RcvFECN RcvBECN RcvBubble XmitWastedBW XmitWaitData LinkQualityIndicator LocalLinkIntegrityErrors RcvErrors ExcessiveBufferOverruns LinkErrorRecovery LinkDowned UncorrectableErrors FMConfigErrors XmitConstraintErrors RcvConstraintErrors RcvSwitchRelayErrors XmitDiscards RcvRemotePhysicalErrors + do + # output will be: + # for switch port 0 + # just 1 line, no neighbor + # for other links + # 1st line with neighbor + # 2nd line with most fields except neighbor fields + # both lines will have NodeDesc, NodeType, NodeGUID, PortNum + lineno=$(($lineno + 1)) + if [ x"$nNodeGUID" = x ] + then + # must be a port without a neighbor (switch port 0) + echo "$NodeDesc;$NodeType;$NodeGUID;$PortNum;$nNodeDesc;$nNodeType;$nNodeGUID;$nPortNum;$LinkSpeedActive;$LinkWidthDnGradeTxActive;$LinkWidthDnGradeRxActive;$XmitDataMB;$XmitData;$XmitPkts;$MulticastXmitPkts;$RcvDataMB;$RcvData;$RcvPkts;$MulticastRcvPkts;$XmitWait;$CongDiscards;$XmitTimeCong;$MarkFECN;$RcvFECN;$RcvBECN;$RcvBubble;$XmitWastedBW;$XmitWaitData;$LinkQualityIndicator;$LocalLinkIntegrityErrors;$RcvErrors;$ExcessiveBufferOverruns;$LinkErrorRecovery;$LinkDowned;$UncorrectableErrors;$FMConfigErrors;$XmitConstraintErrors;$RcvConstraintErrors;$RcvSwitchRelayErrors;$XmitDiscards;$RcvRemotePhysicalErrors" + else + # port with a neighbor will have a second line + read NodeDesc_2 NodeType_2 NodeGUID_2 PortNum_2 nNodeDesc_2 nNodeType_2 nNodeGUID_2 nPortNum_2 LinkSpeedActive_2 LinkWidthDnGradeTxActive_2 LinkWidthDnGradeRxActive_2 XmitDataMB_2 XmitData_2 XmitPkts_2 MulticastXmitPkts_2 RcvDataMB_2 RcvData_2 RcvPkts_2 MulticastRcvPkts_2 XmitWait_2 CongDiscards_2 XmitTimeCong_2 MarkFECN_2 RcvFECN_2 RcvBECN_2 RcvBubble_2 XmitWastedBW_2 XmitWaitData_2 LinkQualityIndicator_2 LocalLinkIntegrityErrors_2 RcvErrors_2 ExcessiveBufferOverruns_2 LinkErrorRecovery_2 LinkDowned_2 UncorrectableErrors_2 FMConfigErrors_2 XmitConstraintErrors_2 RcvConstraintErrors_2 RcvSwitchRelayErrors_2 XmitDiscards_2 RcvRemotePhysicalErrors_2 + if [ x"$NodeGUID" != x"$NodeGUID_2" -o x"$PortNum" != x"$PortNum_2" ] + then + echo "line: $lineno: Out of synchronization" >&2 + fi + echo "$NodeDesc;$NodeType;$NodeGUID;$PortNum;$nNodeDesc;$nNodeType;$nNodeGUID;$nPortNum;$LinkSpeedActive_2;$LinkWidthDnGradeTxActive_2;$LinkWidthDnGradeRxActive_2;$XmitDataMB_2;$XmitData_2;$XmitPkts_2;$MulticastXmitPkts_2;$RcvDataMB_2;$RcvData_2;$RcvPkts_2;$MulticastRcvPkts_2;$XmitWait_2;$CongDiscards_2;$XmitTimeCong_2;$MarkFECN_2;$RcvFECN_2;$RcvBECN_2;$RcvBubble_2;$XmitWastedBW_2;$XmitWaitData_2;$LinkQualityIndicator_2;$LocalLinkIntegrityErrors_2;$RcvErrors_2;$ExcessiveBufferOverruns_2;$LinkErrorRecovery_2;$LinkDowned_2;$UncorrectableErrors_2;$FMConfigErrors_2;$XmitConstraintErrors_2;$RcvConstraintErrors_2;$RcvSwitchRelayErrors_2;$XmitDiscards_2;$RcvRemotePhysicalErrors_2" + fi + done + res=0 +else + echo "${cmd}: Unable to get performance report" >&2 + Usage + res=1 +fi +rm -rf $tempfile +exit $res diff --git a/IbaTools/opaxmlextract/opaextractstat.sh b/IbaTools/opaxmlextract/opaextractstat.sh index 3817c77..405374f 100755 --- a/IbaTools/opaxmlextract/opaextractstat.sh +++ b/IbaTools/opaxmlextract/opaextractstat.sh @@ -207,7 +207,7 @@ do fi fi -done < <(/usr/sbin/opareport -x -d 10 -s -o errors -T "$@" | \ +done < <(/usr/sbin/opareport -x -Q -d 10 -s -o errors -T "$@" | \ /usr/sbin/opaxmlextract -H -d \; -e Link:id -e Rate -e LinkDetails -e CableLength \ -e CableLabel -e CableDetails -e Port.NodeDesc -e Port.PortNum \ -e LinkQualityIndicator.Value) diff --git a/IbaTools/opaxmlextract/opaextractstat2.sh b/IbaTools/opaxmlextract/opaextractstat2.sh index b10bf3d..bdf8b4c 100755 --- a/IbaTools/opaxmlextract/opaextractstat2.sh +++ b/IbaTools/opaxmlextract/opaextractstat2.sh @@ -197,7 +197,7 @@ do fi fi -done < <(/usr/sbin/opareport -x -d 10 -s -o errors -T "$@" | \ +done < <(/usr/sbin/opareport -x -Q -d 10 -s -o errors -T "$@" | \ /usr/sbin/opaxmlextract -d \; -e Link:id -e Rate -e Internal -e LinkDetails \ -e CableLength -e CableLabel -e CableDetails -e Port.NodeGUID \ -e Port.PortGUID -e Port.PortNum -e Port.NodeType -e Port.NodeDesc \ diff --git a/IbaTools/opaxmlextract/opamergeperf2.sh b/IbaTools/opaxmlextract/opamergeperf2.sh new file mode 100755 index 0000000..0ec0bbc --- /dev/null +++ b/IbaTools/opaxmlextract/opamergeperf2.sh @@ -0,0 +1,243 @@ +#!/bin/bash +# BEGIN_ICS_COPYRIGHT8 **************************************** +# +# Copyright (c) 2019, Intel Corporation +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, +# this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of Intel Corporation nor the names of its contributors +# may be used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# END_ICS_COPYRIGHT8 **************************************** + +# [ICS VERSION STRING: unknown] + +# take output from two runs of opaextractperf2 and merge them by computing +# differences in performance counters +tempfile="$(mktemp)" +trap "rm -f ${tempfile}.prefix1 ${tempfile}.prefix2; exit 1" SIGHUP SIGTERM SIGINT +trap "rm -f ${tempfile}.prefix1 ${tempfile}.prefix2" EXIT + + +Usage_full() +{ + echo "Usage: ${cmd} before.csv after.csv" >&2 + echo " or" >&2 + echo " ${cmd} --help" >&2 + echo " --help - produce full help text." >&2 + echo " before.csv - output from a opaextractperf2 run" >&2 + echo " after.csv - output from a opaextractperf2 run" >&2 + echo >&2 + echo "${cmd} merges output from two opaextactperf2 runs from the same fabric" >&2 + echo "Counters for matching links will be computed (before subtracted from after)" >&2 + echo "and a CSV file equivalent to opaextractperf2's output format will be generated" >&2 + echo "suitable for importing into a spreadsheet or parsing by other scripts." >&2 + echo >&2 + echo "The before.csv and after.csv input files must be generated from the same" >&2 + echo "fabric, with before.csv containing counters prior to after.csv." >&2 + echo "Both files must have been generated to contain the running counters without" >&2 + echo "any counter clears between before.csv and after.csv and without using any" >&2 + echo "interval options to opareport which might report delta counters as" >&2 + echo "opposed to running counters, such as opareport -i" >&2 + echo "or opareport with both --begin and --end options." >&2 + echo >&2 + echo "for example:" >&2 + echo " ${cmd} before.csv after.csv > delta.csv" >&2 + echo >&2 + exit 0 +} + +Usage() +{ + echo "Usage: ${cmd} before.csv after.csv" >&2 + echo " or" >&2 + echo " ${cmd} --help" >&2 + echo " --help - produce full help text." >&2 + echo " before.csv - output from a opaextractperf2 run" >&2 + echo " after.csv - output from a opaextractperf2 run" >&2 + echo >&2 + echo "for example:" >&2 + echo " ${cmd} before.csv after.csv > delta.csv" >&2 + echo >&2 + exit 2 +} + +## Main function +res=0 + +cmd=`basename $0` +if [ x"$1" = "x--help" ] +then + Usage_full +fi + +if [ "$#" != 2 ] +then + Usage +fi + +f1="$1" +f2="$2" +if [ ! -e "$f1" ] +then + echo "$f1: Not Found" >&2 + Usage +fi +if [ ! -e "$f2" ] +then + echo "$f2: Not Found" >&2 + Usage +fi + +IFS=';' + +# omit heading line +# add sequencing number and line number before desc;type;guid;port so same +# device in each file will sort next to eachother and f1 sorts before f2. +nl -s';' "$f1"|tail -n+2 | sed -e 's/^ */1;/'|sort --field-separator=';' --key='5,6' > ${tempfile}.prefix1 +nl -s';' "$f2"|tail -n+2 | sed -e 's/^ */2;/'|sort --field-separator=';' --key='5,6' > ${tempfile}.prefix2 +# some debug code which can help identify nodes which are not in both files +#cut -f3-6 -d';' ${tempfile}.prefix1 > ${tempfile}.nodes1 +#cut -f3-6 -d';' ${tempfile}.prefix2 > ${tempfile}.nodes2 +#if ! diff ${tempfile}.nodes1 ${tempfile}.nodes2 > /dev/null +#then +# echo "$cmd: Warning: node list mismatch" >&2 +# #diff -c ${tempfile}.nodes1 ${tempfile}.nodes2 | head -20 +#fi + +IFS=';' +{ +# output heading +head -1 "$f1" +# compute counter differences f2 - f1 +use_2=n # do _2 variables potentially have 1st line ("1") for a port +# sort by guid;port then prefix, this puts same ports next to eachother with +# line from f1 before line from f2 +# the loop must handle cases where a device appears only in f1 or f2 +# as well as where the neighbor to a device has changed between f1 and f2 +# in a stable fabric these will not happen. However in a fabric with a few +# bad links, devices offline or where cables have been moved, this can happen +( cat ${tempfile}.prefix1 ${tempfile}.prefix2|sort --field-separator=';' --key='5,6' --key '1,1'; echo "END" ) | \ + while read num_1 lineno_1 NodeDesc_1 NodeType_1 NodeGUID_1 PortNum_1 nNodeDesc_1 nNodeType_1 nNodeGUID_1 nPortNum_1 LinkSpeedActive_1 LinkWidthDnGradeTxActive_1 LinkWidthDnGradeRxActive_1 XmitDataMB_1 XmitData_1 XmitPkts_1 MulticastXmitPkts_1 RcvDataMB_1 RcvData_1 RcvPkts_1 MulticastRcvPkts_1 XmitWait_1 CongDiscards_1 XmitTimeCong_1 MarkFECN_1 RcvFECN_1 RcvBECN_1 RcvBubble_1 XmitWastedBW_1 XmitWaitData_1 LinkQualityIndicator_1 LocalLinkIntegrityErrors_1 RcvErrors_1 ExcessiveBufferOverruns_1 LinkErrorRecovery_1 LinkDowned_1 UncorrectableErrors_1 FMConfigErrors_1 XmitConstraintErrors_1 RcvConstraintErrors_1 RcvSwitchRelayErrors_1 XmitDiscards_1 RcvRemotePhysicalErrors_1 +do + if [ x"$num_1" = x"END" ] + then + # normal end of file + break + fi + if ! [[ x"$RcvRemotePhysicalErrors_1" =~ ^x[0-9]+$ ]] + then + # lines with insufficient columns, extra columns or non-numeric in + # last column will fail the test. To balance performance and input + # checking we only check the last column since invalid input files + # will typically have the wrong number of columns + if [ x"$num_1" = x"1" ] + then + echo "$cmd: Invalid input line: $lineno_1 file: $f1" >&2 + else + echo "$cmd: Invalid input line: $lineno_1 file: $f2" >&2 + fi + exit 1 + fi + if [ x"$num_1" = x"2" ] + then + #echo "process num_1=2" >&2 + if [ "$use_2" != y ] + then + # "2" without a preceeding "1", skip line just read into _1 + echo "$cmd: Warning: skipping unmatched line $lineno_1 in after: $NodeDesc_1;$NodeType_1;$NodeGUID_1;$PortNum_1" >&2 + else + # _2 has our "1", _1 has our "2" + if [ x"$NodeGUID_1" != x"$NodeGUID_2" -o x"$PortNum_1" != x"$PortNum_2" ] + then + # got a "1" followed by a "2" and they don't match, skip both + echo "$cmd: Warning: skipping unmatched line $lineno_2 in before: $NodeDesc_2;$NodeType_2;$NodeGUID_2;$PortNum_2" >&2 + echo "$cmd: Warning: skipping unmatched line $lineno_1 in after: $NodeDesc_1;$NodeType_1;$NodeGUID_1;$PortNum_1" >&2 + elif [ x"$nNodeGUID_1" != x"$nNodeGUID_2" -o x"$nPortNum_1" != x"$nPortNum_2" ] + then + # we got a "1" followed by "2", however neighbor changed + echo "$cmd: Warning: skipping changed line $lineno_2 in before: $NodeDesc_2;$NodeType_2;$NodeGUID_2;$PortNum_2;$nNodeDesc_2;$nNodeType_2;$nNodeGUID_2;$nPortNum_2" >&2 + echo "$cmd: Warning: skipping changed line $lineno_1 in after: $NodeDesc_1;$NodeType_1;$NodeGUID_1;$PortNum_1;$nNodeDesc_1;$nNodeType_1;$nNodeGUID_1;$nPortNum_1" >&2 + else + #echo "process num_1=2 use_2" >&2 + # use _2 as before and _1 as after when compute delta + # for fields not subtracted, show after (_1) as more recent + echo "$NodeDesc_1;$NodeType_1;$NodeGUID_1;$PortNum_1;$nNodeDesc_1;$nNodeType_1;$nNodeGUID_1;$nPortNum_1;$LinkSpeedActive_1;$LinkWidthDnGradeTxActive_1;$LinkWidthDnGradeRxActive_1;$(($XmitDataMB_1 - $XmitDataMB_2));$(($XmitData_1 - $XmitData_2));$(($XmitPkts_1 - $XmitPkts_2));$(($MulticastXmitPkts_1 - $MulticastXmitPkts_2));$(($RcvDataMB_1 - $RcvDataMB_2));$(($RcvData_1 - $RcvData_2));$(($RcvPkts_1 - $RcvPkts_2));$(($MulticastRcvPkts_1 - $MulticastRcvPkts_2));$(($XmitWait_1 - $XmitWait_2));$(($CongDiscards_1 - $CongDiscards_2));$(($XmitTimeCong_1 - $XmitTimeCong_2));$(($MarkFECN_1 - $MarkFECN_2));$(($RcvFECN_1 - $RcvFECN_2));$(($RcvBECN_1 - $RcvBECN_2));$(($RcvBubble_1 - $RcvBubble_2));$(($XmitWastedBW_1 - $XmitWastedBW_2));$(($XmitWaitData_1 - $XmitWaitData_2));$(($LinkQualityIndicator_1 < $LinkQualityIndicator_2?$LinkQualityIndicator_1:$LinkQualityIndicator_2));$(($LocalLinkIntegrityErrors_1 - $LocalLinkIntegrityErrors_2));$(($RcvErrors_1 - $RcvErrors_2));$(($ExcessiveBufferOverruns_1 - $ExcessiveBufferOverruns_2));$(($LinkErrorRecovery_1 - $LinkErrorRecovery_2));$(($LinkDowned_1 - $LinkDowned_2));$(($UncorrectableErrors_1 - $UncorrectableErrors_2));$(($FMConfigErrors_1 - $FMConfigErrors_2));$(($XmitConstraintErrors_1 - $XmitConstraintErrors_2));$(($RcvConstraintErrors_1 - $RcvConstraintErrors_2));$(($RcvSwitchRelayErrors_1 - $RcvSwitchRelayErrors_2));$(($XmitDiscards_1 - $XmitDiscards_2));$(($RcvRemotePhysicalErrors_1 - $RcvRemotePhysicalErrors_2))" + fi + fi + else + # num_1 is "1" + read num_2 lineno_2 NodeDesc_2 NodeType_2 NodeGUID_2 PortNum_2 nNodeDesc_2 nNodeType_2 nNodeGUID_2 nPortNum_2 LinkSpeedActive_2 LinkWidthDnGradeTxActive_2 LinkWidthDnGradeRxActive_2 XmitDataMB_2 XmitData_2 XmitPkts_2 MulticastXmitPkts_2 RcvDataMB_2 RcvData_2 RcvPkts_2 MulticastRcvPkts_2 XmitWait_2 CongDiscards_2 XmitTimeCong_2 MarkFECN_2 RcvFECN_2 RcvBECN_2 RcvBubble_2 XmitWastedBW_2 XmitWaitData_2 LinkQualityIndicator_2 LocalLinkIntegrityErrors_2 RcvErrors_2 ExcessiveBufferOverruns_2 LinkErrorRecovery_2 LinkDowned_2 UncorrectableErrors_2 FMConfigErrors_2 XmitConstraintErrors_2 RcvConstraintErrors_2 RcvSwitchRelayErrors_2 XmitDiscards_2 RcvRemotePhysicalErrors_2 + #echo "process num_2=$num_2" >&2 + if [ x"$num_2" = x"END" ] + then + # "1" without a "2" at end of file + echo "$cmd: Warning: skipping unmatched line $lineno_1 in before: $NodeDesc_1;$NodeType_1;$NodeGUID_1;$PortNum_1" >&2 + break + fi + if ! [[ x"$RcvRemotePhysicalErrors_2" =~ ^x[0-9]+$ ]] + then + # lines with insufficient columns, extra columns or non-numeric in + # last column will fail the test. To balance performance and input + # checking we only check the last column since invalid input files + # will typically have the wrong number of columns + if [ x"$num_2" = x"1" ] + then + echo "$cmd: Invalid input line: $lineno_2 file: $f1" >&2 + else + echo "$cmd: Invalid input line: $lineno_2 file: $f2" >&2 + fi + exit 1 + fi + if [ x"$num_2" = x"1" ] + then + # two "1" in a row, skip _1, use this line for next pairing + echo "$cmd: Warning: skipping unmatched line $lineno_1 in before: $NodeDesc_1;$NodeType_1;$NodeGUID_1;$PortNum_1" >&2 + use_2=y + continue + elif [ x"$num_1" != "x1" -o x"$num_2" != "x2" ] # paranoid check + then + echo "$num_1 $num_2" >&2 + echo "$cmd: Script Error: Incorrect sort order" >&2 + exit 1 + else + if [ x"$NodeGUID_1" != x"$NodeGUID_2" -o x"$PortNum_1" != x"$PortNum_2" ] + then + # "1" followed by non-matching "2", skip both + echo "$cmd: Warning: skipping unmatched line $lineno_1 in before: $NodeDesc_1;$NodeType_1;$NodeGUID_1;$PortNum_1" >&2 + echo "$cmd: Warning: skipping unmatched line $lineno_2 in after: $NodeDesc_2;$NodeType_2;$NodeGUID_2;$PortNum_2" >&2 + elif [ x"$nNodeGUID_1" != x"$nNodeGUID_2" -o x"$nPortNum_1" != x"$nPortNum_2" ] + then + # we got a "1" followed by "2", however neighbor changed + echo "$cmd: Warning: skipping changed line $lineno_1 in before: $NodeDesc_1;$NodeType_1;$NodeGUID_1;$PortNum_1;$nNodeDesc_1;$nNodeType_1;$nNodeGUID_1;$nPortNum_1" >&2 + echo "$cmd: Warning: skipping changed line $lineno_2 in after: $NodeDesc_2;$NodeType_2;$NodeGUID_2;$PortNum_2;$nNodeDesc_2;$nNodeType_2;$nNodeGUID_2;$nPortNum_2" >&2 + else + # for fields not subtracted, show after (_2) as more recent + echo "$NodeDesc_2;$NodeType_2;$NodeGUID_2;$PortNum_2;$nNodeDesc_2;$nNodeType_2;$nNodeGUID_2;$nPortNum_2;$LinkSpeedActive_2;$LinkWidthDnGradeTxActive_2;$LinkWidthDnGradeRxActive_2;$(($XmitDataMB_2 - $XmitDataMB_1));$(($XmitData_2 - $XmitData_1));$(($XmitPkts_2 - $XmitPkts_1));$(($MulticastXmitPkts_2 - $MulticastXmitPkts_1));$(($RcvDataMB_2 - $RcvDataMB_1));$(($RcvData_2 - $RcvData_1));$(($RcvPkts_2 - $RcvPkts_1));$(($MulticastRcvPkts_2 - $MulticastRcvPkts_1));$(($XmitWait_2 - $XmitWait_1));$(($CongDiscards_2 - $CongDiscards_1));$(($XmitTimeCong_2 - $XmitTimeCong_1));$(($MarkFECN_2 - $MarkFECN_1));$(($RcvFECN_2 - $RcvFECN_1));$(($RcvBECN_2 - $RcvBECN_1));$(($RcvBubble_2 - $RcvBubble_1));$(($XmitWastedBW_2 - $XmitWastedBW_1));$(($XmitWaitData_2 - $XmitWaitData_1));$(($LinkQualityIndicator_2 < $LinkQualityIndicator_1?$LinkQualityIndicator_2:$LinkQualityIndicator_1));$(($LocalLinkIntegrityErrors_2 - $LocalLinkIntegrityErrors_1));$(($RcvErrors_2 - $RcvErrors_1));$(($ExcessiveBufferOverruns_2 - $ExcessiveBufferOverruns_1));$(($LinkErrorRecovery_2 - $LinkErrorRecovery_1));$(($LinkDowned_2 - $LinkDowned_1));$(($UncorrectableErrors_2 - $UncorrectableErrors_1));$(($FMConfigErrors_2 - $FMConfigErrors_1));$(($XmitConstraintErrors_2 - $XmitConstraintErrors_1));$(($RcvConstraintErrors_2 - $RcvConstraintErrors_1));$(($RcvSwitchRelayErrors_2 - $RcvSwitchRelayErrors_1));$(($XmitDiscards_2 - $XmitDiscards_1));$(($RcvRemotePhysicalErrors_2 - $RcvRemotePhysicalErrors_1))" + fi + fi + fi + use_2=n +done +} +res=$? +rm -rf ${tempfile}.prefix1 ${tempfile}.prefix2 +exit $res diff --git a/IbaTools/saquery/saquery.c b/IbaTools/saquery/saquery.c index 1cb008e..bf9a084 100644 --- a/IbaTools/saquery/saquery.c +++ b/IbaTools/saquery/saquery.c @@ -453,7 +453,7 @@ InputFlags_t PathInput = {{InputTypeNoInput, InputTypeLid,InputTypePKey,InputTyp InputFlags_t ServiceInput = {{InputTypeNoInput,InputTypePortGuid,InputTypePortGid,InputTypeServiceId,END_INPUT_TYPE}}; InputFlags_t McmemberInput = {{InputTypeNoInput, InputTypeLid, InputTypePKey,InputTypePortGuid,InputTypePortGid,InputTypeMcGid,InputTypeSL,END_INPUT_TYPE}}; InputFlags_t InformInput = {{InputTypeNoInput,InputTypePortGuid,InputTypePortGid,InputTypeLid,END_INPUT_TYPE}}; -InputFlags_t TraceInput = {{InputTypePortGuid,InputTypePortGid,InputTypePortGuidPair,InputTypeGidPair,END_INPUT_TYPE}}; +InputFlags_t TraceInput = {{InputTypePortGuid,InputTypePortGid,InputTypePortGuidPair,InputTypeGidPair,InputTypeLid,END_INPUT_TYPE}}; InputFlags_t VfinfoInput = {{InputTypeNoInput,InputTypePKey,InputTypeIndex,InputTypeMcGid,InputTypeServiceId,InputTypeSL,InputTypeNodeDesc,END_INPUT_TYPE}}; InputFlags_t MiscInput = {{InputTypeNoInput,InputTypeLid,END_INPUT_TYPE}}; InputFlags_t DgMemberInput = {{InputTypeNoInput,InputTypeLid, InputTypePortGuid, InputTypeNodeDesc,InputTypeDeviceGroup,END_INPUT_TYPE}}; diff --git a/Iih/icsImageHeader.h b/Iih/icsImageHeader.h index 88434b7..8e05d95 100644 --- a/Iih/icsImageHeader.h +++ b/Iih/icsImageHeader.h @@ -1,4 +1,4 @@ -/* BEGIN_ICS_COPYRIGHT7 **************************************** +/* BEGIN_ICS_COPYRIGHT7 **************************************** Copyright (c) 2015-2017, Intel Corporation @@ -25,125 +25,125 @@ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -** END_ICS_COPYRIGHT7 ****************************************/ - -/* [ICS VERSION STRING: unknown] */ - -#ifndef ICS_IMAGE_HEADER_H_INCLUDED -#define ICS_IMAGE_HEADER_H_INCLUDED - -/* - icsImageHeader.h - - This include file defines the Ics Image Header file format, which is - designed to be prepended to a loadable image, e.g. an ELF file. - - The header is composed of records, each of which has a type field, a - size field, and a payload. The size field indicates the size of the - payload in bytes. Many record types may be defined, and may occur - in the actual header in any order, except that the first record in - the header must be the Info record, and the last record in the - header must be the Terminator record. - - The endianness of the image header is the endianness of the target - system - i.e. the endianness of the system that the attached image - is to be loaded on. - -*/ - - -#include - -#if defined(VXWORKS) -#include "vxWorks.h" -#else -#include -#define UINT8 uint8_t -#define UINT32 uint32_t -#endif - -#define ICS_IMAGE_HEADER_RECORD_TYPE_INFO 0x49435301 /* file magic number - 'I' 'C' 'S' 0x01 */ -#define ICS_IMAGE_HEADER_RECORD_TYPE_INFO_WRONG_ENDIAN 0x01534349 /* what you would see in the wrong endian */ -#define ICS_IMAGE_HEADER_RECORD_TYPE_MD5 1 -#define ICS_IMAGE_HEADER_RECORD_TYPE_TERMINATOR 2 -#define ICS_IMAGE_HEADER_RECORD_TYPE_VXWORKSIMAGETYPE 3 -#define ICS_IMAGE_HEADER_RECORD_TYPE_CBC_FILE_INFO 4 -#define ICS_IMAGE_HEADER_RECORD_TYPE_MBC_FILE_INFO 5 -#define ICS_IMAGE_HEADER_RECORD_TYPE_ACM_FILE_INFO 6 -#define ICS_IMAGE_HEADER_RECORD_TYPE_XIO_FPGA_CFG 7 -#define ICS_IMAGE_HEADER_RECORD_TYPE_Q7IMAGETYPE 8 - -#define ICS_IMAGE_HEADER_VERSION_SIZE 20 -#define ICS_IMAGE_HEADER_FILE_VERSION_SIZE 40 - -#define ICS_IMAGE_HEADER_FILE_INFO_FLAG_NONE 0 -#define ICS_IMAGE_HEADER_FILE_INFO_FLAG_GZIPPED 1 -#define ICS_IMAGE_HEADER_FILE_INFO_FLAG_VXDEFLATED 2 - -#define ICS_IMAGE_HEADER_PAYLOAD_SIZE(record_name) (sizeof(IcsImageHeader_##record_name##Payload_t)) -#define ICS_IMAGE_HEADER_PAYLOAD_SIZE_INFO ICS_IMAGE_HEADER_PAYLOAD_SIZE(Info) -#define ICS_IMAGE_HEADER_PAYLOAD_SIZE_MD5 ICS_IMAGE_HEADER_PAYLOAD_SIZE(Md5) -#define ICS_IMAGE_HEADER_PAYLOAD_SIZE_TERMINATOR ICS_IMAGE_HEADER_PAYLOAD_SIZE(Terminator) -#define ICS_IMAGE_HEADER_PAYLOAD_SIZE_VXWORKSIMAGETYPE ICS_IMAGE_HEADER_PAYLOAD_SIZE(VxWorksImageType) -#define ICS_IMAGE_HEADER_PAYLOAD_SIZE_CBC_FILE_INFO ICS_IMAGE_HEADER_PAYLOAD_SIZE(FileInfo) -#define ICS_IMAGE_HEADER_PAYLOAD_SIZE_MBC_FILE_INFO ICS_IMAGE_HEADER_PAYLOAD_SIZE(FileInfo) -#define ICS_IMAGE_HEADER_PAYLOAD_SIZE_ACM_FILE_INFO ICS_IMAGE_HEADER_PAYLOAD_SIZE(FileInfo) -#define ICS_IMAGE_HEADER_PAYLOAD_SIZE_XIO_FPGA_CFG ICS_IMAGE_HEADER_PAYLOAD_SIZE(XioFpgaCfgType) -#define ICS_IMAGE_HEADER_PAYLOAD_SIZE_Q7IMAGETYPE ICS_IMAGE_HEADER_PAYLOAD_SIZE(q7ImageType) - -#define ICS_IMAGE_HEADER_ENUM_VXWORKSIMAGETYPE_BOOTROM 1 -#define ICS_IMAGE_HEADER_ENUM_VXWORKSIMAGETYPE_LOADABLE 2 -#define ICS_IMAGE_HEADER_ENUM_Q7IMAGETYPE_BIOS 3 -#define ICS_IMAGE_HEADER_ENUM_Q7IMAGETYPE_BOARD_CONTROLLER 4 -#define ICS_IMAGE_HEADER_ENUM_XIO_FPGA_CFG_SUBTYPE 1 - -typedef struct IcsImageHeaderInfoPayloadStruct { - UINT32 productCode; - UINT32 bspCode; - char version[ICS_IMAGE_HEADER_VERSION_SIZE]; - UINT32 headerSize; - UINT32 recordCount; - UINT32 imageSize; -} __attribute__ ((packed)) IcsImageHeader_InfoPayload_t ; - - -typedef UINT8 IcsImageHeader_Md5Payload_t[16]; - - -typedef struct IcsImageHeaderTerminatorPayloadStruct { - UINT32 recordCount; -} __attribute__ ((packed)) IcsImageHeader_TerminatorPayload_t ; - - -typedef UINT32 IcsImageHeader_VxWorksImageTypePayload_t; - -typedef UINT32 IcsImageHeader_XioFpgaCfgTypePayload_t; - -typedef UINT32 IcsImageHeader_q7ImageTypePayload_t; - -typedef struct FileInfoPayloadStruct { - UINT32 offset; - UINT32 size; - UINT32 flags; - char version[ICS_IMAGE_HEADER_FILE_VERSION_SIZE]; -} __attribute__ ((packed)) IcsImageHeader_FileInfoPayload_t ; - - -typedef struct IcsImageHeaderRecordStruct { - UINT32 type; - UINT32 size; - union IcsImageHeaderRecordPayloadUnion { - IcsImageHeader_InfoPayload_t info; - IcsImageHeader_Md5Payload_t md5; - IcsImageHeader_TerminatorPayload_t terminator; - IcsImageHeader_VxWorksImageTypePayload_t vxWorksImageType; - IcsImageHeader_FileInfoPayload_t fileInfo; - IcsImageHeader_XioFpgaCfgTypePayload_t xioFpgaCfgType; - IcsImageHeader_q7ImageTypePayload_t q7ImageType; - } payload; -} __attribute__ ((packed)) IcsImageHeader_Record_t ; - - -#endif /* ICS_IMAGE_HEADER_H_INCLUDED */ - - +** END_ICS_COPYRIGHT7 ****************************************/ + +/* [ICS VERSION STRING: unknown] */ + +#ifndef ICS_IMAGE_HEADER_H_INCLUDED +#define ICS_IMAGE_HEADER_H_INCLUDED + +/* + icsImageHeader.h + + This include file defines the Ics Image Header file format, which is + designed to be prepended to a loadable image, e.g. an ELF file. + + The header is composed of records, each of which has a type field, a + size field, and a payload. The size field indicates the size of the + payload in bytes. Many record types may be defined, and may occur + in the actual header in any order, except that the first record in + the header must be the Info record, and the last record in the + header must be the Terminator record. + + The endianness of the image header is the endianness of the target + system - i.e. the endianness of the system that the attached image + is to be loaded on. + +*/ + + +#include + +#if defined(VXWORKS) +#include "vxWorks.h" +#else +#include +#define UINT8 uint8_t +#define UINT32 uint32_t +#endif + +#define ICS_IMAGE_HEADER_RECORD_TYPE_INFO 0x49435301 /* file magic number - 'I' 'C' 'S' 0x01 */ +#define ICS_IMAGE_HEADER_RECORD_TYPE_INFO_WRONG_ENDIAN 0x01534349 /* what you would see in the wrong endian */ +#define ICS_IMAGE_HEADER_RECORD_TYPE_MD5 1 +#define ICS_IMAGE_HEADER_RECORD_TYPE_TERMINATOR 2 +#define ICS_IMAGE_HEADER_RECORD_TYPE_VXWORKSIMAGETYPE 3 +#define ICS_IMAGE_HEADER_RECORD_TYPE_CBC_FILE_INFO 4 +#define ICS_IMAGE_HEADER_RECORD_TYPE_MBC_FILE_INFO 5 +#define ICS_IMAGE_HEADER_RECORD_TYPE_ACM_FILE_INFO 6 +#define ICS_IMAGE_HEADER_RECORD_TYPE_XIO_FPGA_CFG 7 +#define ICS_IMAGE_HEADER_RECORD_TYPE_Q7IMAGETYPE 8 + +#define ICS_IMAGE_HEADER_VERSION_SIZE 20 +#define ICS_IMAGE_HEADER_FILE_VERSION_SIZE 40 + +#define ICS_IMAGE_HEADER_FILE_INFO_FLAG_NONE 0 +#define ICS_IMAGE_HEADER_FILE_INFO_FLAG_GZIPPED 1 +#define ICS_IMAGE_HEADER_FILE_INFO_FLAG_VXDEFLATED 2 + +#define ICS_IMAGE_HEADER_PAYLOAD_SIZE(record_name) (sizeof(IcsImageHeader_##record_name##Payload_t)) +#define ICS_IMAGE_HEADER_PAYLOAD_SIZE_INFO ICS_IMAGE_HEADER_PAYLOAD_SIZE(Info) +#define ICS_IMAGE_HEADER_PAYLOAD_SIZE_MD5 ICS_IMAGE_HEADER_PAYLOAD_SIZE(Md5) +#define ICS_IMAGE_HEADER_PAYLOAD_SIZE_TERMINATOR ICS_IMAGE_HEADER_PAYLOAD_SIZE(Terminator) +#define ICS_IMAGE_HEADER_PAYLOAD_SIZE_VXWORKSIMAGETYPE ICS_IMAGE_HEADER_PAYLOAD_SIZE(VxWorksImageType) +#define ICS_IMAGE_HEADER_PAYLOAD_SIZE_CBC_FILE_INFO ICS_IMAGE_HEADER_PAYLOAD_SIZE(FileInfo) +#define ICS_IMAGE_HEADER_PAYLOAD_SIZE_MBC_FILE_INFO ICS_IMAGE_HEADER_PAYLOAD_SIZE(FileInfo) +#define ICS_IMAGE_HEADER_PAYLOAD_SIZE_ACM_FILE_INFO ICS_IMAGE_HEADER_PAYLOAD_SIZE(FileInfo) +#define ICS_IMAGE_HEADER_PAYLOAD_SIZE_XIO_FPGA_CFG ICS_IMAGE_HEADER_PAYLOAD_SIZE(XioFpgaCfgType) +#define ICS_IMAGE_HEADER_PAYLOAD_SIZE_Q7IMAGETYPE ICS_IMAGE_HEADER_PAYLOAD_SIZE(q7ImageType) + +#define ICS_IMAGE_HEADER_ENUM_VXWORKSIMAGETYPE_BOOTROM 1 +#define ICS_IMAGE_HEADER_ENUM_VXWORKSIMAGETYPE_LOADABLE 2 +#define ICS_IMAGE_HEADER_ENUM_Q7IMAGETYPE_BIOS 3 +#define ICS_IMAGE_HEADER_ENUM_Q7IMAGETYPE_BOARD_CONTROLLER 4 +#define ICS_IMAGE_HEADER_ENUM_XIO_FPGA_CFG_SUBTYPE 1 + +typedef struct IcsImageHeaderInfoPayloadStruct { + UINT32 productCode; + UINT32 bspCode; + char version[ICS_IMAGE_HEADER_VERSION_SIZE]; + UINT32 headerSize; + UINT32 recordCount; + UINT32 imageSize; +} __attribute__ ((packed)) IcsImageHeader_InfoPayload_t ; + + +typedef UINT8 IcsImageHeader_Md5Payload_t[16]; + + +typedef struct IcsImageHeaderTerminatorPayloadStruct { + UINT32 recordCount; +} __attribute__ ((packed)) IcsImageHeader_TerminatorPayload_t ; + + +typedef UINT32 IcsImageHeader_VxWorksImageTypePayload_t; + +typedef UINT32 IcsImageHeader_XioFpgaCfgTypePayload_t; + +typedef UINT32 IcsImageHeader_q7ImageTypePayload_t; + +typedef struct FileInfoPayloadStruct { + UINT32 offset; + UINT32 size; + UINT32 flags; + char version[ICS_IMAGE_HEADER_FILE_VERSION_SIZE]; +} __attribute__ ((packed)) IcsImageHeader_FileInfoPayload_t ; + + +typedef struct IcsImageHeaderRecordStruct { + UINT32 type; + UINT32 size; + union IcsImageHeaderRecordPayloadUnion { + IcsImageHeader_InfoPayload_t info; + IcsImageHeader_Md5Payload_t md5; + IcsImageHeader_TerminatorPayload_t terminator; + IcsImageHeader_VxWorksImageTypePayload_t vxWorksImageType; + IcsImageHeader_FileInfoPayload_t fileInfo; + IcsImageHeader_XioFpgaCfgTypePayload_t xioFpgaCfgType; + IcsImageHeader_q7ImageTypePayload_t q7ImageType; + } payload; +} __attribute__ ((packed)) IcsImageHeader_Record_t ; + + +#endif /* ICS_IMAGE_HEADER_H_INCLUDED */ + + diff --git a/MakeTemplates/Makerules.module b/MakeTemplates/Makerules.module index f5297af..8603561 100755 --- a/MakeTemplates/Makerules.module +++ b/MakeTemplates/Makerules.module @@ -61,7 +61,7 @@ MOD_STAGE_DRIVER_BIN_DIR=$(PROJ_STAGE_DRIVER_BIN_DIR) MOD_BIN_SUBDIR = MOD_DRIVER_BIN_SUBDIR = -MOD_INCLUDE_SUBDIR = # or module_name +MOD_INCLUDE_SUBDIR = # or module_name MOD_INCLUDE_DIRS = # or $(GLOBAL_INCLUDE_DIR)/$(MOD_INCLUDE_SUBDIR) MOD_LIB_DIRS = # or $(MOD_LIB_DIR) diff --git a/MakeTools/rm_version/rm_version.c b/MakeTools/rm_version/rm_version.c index 7d7ec34..cc99c60 100755 --- a/MakeTools/rm_version/rm_version.c +++ b/MakeTools/rm_version/rm_version.c @@ -119,7 +119,7 @@ int fix_file(char* filename) /* unfortunately CYGWIN or NT seem to be off on st_size since * you typically can't read size bytes here. Linux is fine */ - /*if (read(fd, buffer, size) != size) */ + /*if (read(fd, buffer, size) != size)*/ if (read(fd, buffer, size) == -1) { fprintf(stderr, "rm_version: Can't read: "); diff --git a/MpiApps/apps/pgfile_test/pgfile_test1.c b/MpiApps/apps/pgfile_test/pgfile_test1.c index a1cbea6..2971408 100644 --- a/MpiApps/apps/pgfile_test/pgfile_test1.c +++ b/MpiApps/apps/pgfile_test/pgfile_test1.c @@ -28,92 +28,92 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ** END_ICS_COPYRIGHT7 ****************************************/ /* [ICS VERSION STRING: unknown] */ -/* - * The purpose of these programs (pgfile_test1 and pgfile_test2) - * is to demonstrate how to use the pgfile capability in mpirun_rsh. - * - * pgfile_test1 should be the first program in the pgfile. It accepts - * numeric arguments from the pgfile and passes them to the next program in - * the pgfile, which should be pgfile_test2. - * - * pgfile_test2 accepts a message containing a set of numbers from the previous - * program in the pgfile, adds them to its own arguments and passes the - * result to the following program. The last instance then passes its result - * back to pgfile_test1, which prints the final result. - */ -#include -#include - -main(int argc, char *argv[]) -{ - int my_rank; - int n, num_tasks, i, final_n, msgtype; - float data[100], result[100]; - char sbuff[1000], rbuff[1000]; - int position; - MPI_Status status; - - /* Initialize MPI */ - MPI_Init(&argc, &argv); - - /* Get our task id (our rank in the basic group) */ - MPI_Comm_rank(MPI_COMM_WORLD, &my_rank); - - /* Get the number of MPI tasks and slaves */ - MPI_Comm_size(MPI_COMM_WORLD, &num_tasks); - - if (my_rank != 0) { - fprintf(stderr,"%s should only be the first program.\n",argv[0]); - return -1; - } - - fprintf(stderr,"num_tasks = %d\n",num_tasks); - - /* Begin User Program */ - - /* actual argument run from 1 to argc. */ - n = (argc < 100)?argc:100; - for( i=1 ; i +#include + +main(int argc, char *argv[]) +{ + int my_rank; + int n, num_tasks, i, final_n, msgtype; + float data[100], result[100]; + char sbuff[1000], rbuff[1000]; + int position; + MPI_Status status; + + /* Initialize MPI */ + MPI_Init(&argc, &argv); + + /* Get our task id (our rank in the basic group) */ + MPI_Comm_rank(MPI_COMM_WORLD, &my_rank); + + /* Get the number of MPI tasks and slaves */ + MPI_Comm_size(MPI_COMM_WORLD, &num_tasks); + + if (my_rank != 0) { + fprintf(stderr,"%s should only be the first program.\n",argv[0]); + return -1; + } + + fprintf(stderr,"num_tasks = %d\n",num_tasks); + + /* Begin User Program */ + + /* actual argument run from 1 to argc. */ + n = (argc < 100)?argc:100; + for( i=1 ; i -#include -main(int argc, char *argv[]) -{ - int my_rank; - int n, n2, i, min, dest, num_tasks, msgtype; - float args[100], data[100], result[100]; - char rbuff[1000], sbuff[1000]; - int position; - MPI_Status status; - - /* Initialize MPI */ - MPI_Init(&argc, &argv); - - /* Get our task id (our rank in the basic group) */ - MPI_Comm_rank(MPI_COMM_WORLD, &my_rank); - - /* Get the number of MPI tasks */ - MPI_Comm_size(MPI_COMM_WORLD, &num_tasks); - - if (my_rank == 0) { - fprintf(stderr,"%s cannot be the first program.\n",argv[0]); - return -1; - } - - /* Just to make the print outs easier to read. */ - sleep(my_rank); - - /* process arguments, skipping argv[0] */ - n = (argc < 100)?argc:100; - for( i=1 ; i= num_tasks) { - dest = 0; - } - - fprintf(stderr,"Task %d sending to task %d\n",my_rank, dest); - msgtype = 0; - MPI_Send(sbuff, position, MPI_PACKED, dest, msgtype, - MPI_COMM_WORLD); - - /* Program finished. Exit from MPI */ - MPI_Barrier(MPI_COMM_WORLD); - MPI_Finalize(); -} - +/* + * The purpose of these programs (pgfile_test1 and pgfile_test2) + * is to demonstrate how to use the pgfile capability in mpirun_rsh. + * + * pgfile_test1 should be the first program in the pgfile. It accepts + * numeric arguments from the pgfile and passes them to the next program in + * the pgfile, which should be pgfile_test2. + * + * pgfile_test2 accepts a message containing a set of numbers from the previous + * program in the pgfile, adds them to its own arguments and passes the + * result to the following program. The last instance then passes its result + * back to pgfile_test1, which prints the final result. + */ +#include +#include +main(int argc, char *argv[]) +{ + int my_rank; + int n, n2, i, min, dest, num_tasks, msgtype; + float args[100], data[100], result[100]; + char rbuff[1000], sbuff[1000]; + int position; + MPI_Status status; + + /* Initialize MPI */ + MPI_Init(&argc, &argv); + + /* Get our task id (our rank in the basic group) */ + MPI_Comm_rank(MPI_COMM_WORLD, &my_rank); + + /* Get the number of MPI tasks */ + MPI_Comm_size(MPI_COMM_WORLD, &num_tasks); + + if (my_rank == 0) { + fprintf(stderr,"%s cannot be the first program.\n",argv[0]); + return -1; + } + + /* Just to make the print outs easier to read. */ + sleep(my_rank); + + /* process arguments, skipping argv[0] */ + n = (argc < 100)?argc:100; + for( i=1 ; i= num_tasks) { + dest = 0; + } + + fprintf(stderr,"Task %d sending to task %d\n",my_rank, dest); + msgtype = 0; + MPI_Send(sbuff, position, MPI_PACKED, dest, msgtype, + MPI_COMM_WORLD); + + /* Program finished. Exit from MPI */ + MPI_Barrier(MPI_COMM_WORLD); + MPI_Finalize(); +} + diff --git a/MpiApps/apps/run_imb b/MpiApps/apps/run_imb index 1a230dd..135122c 100755 --- a/MpiApps/apps/run_imb +++ b/MpiApps/apps/run_imb @@ -52,7 +52,7 @@ APP=IMB-MPI1 LOGFILE= . ./prepare_run -IMB_CMD=$MPICH_PREFIX/tests/IMB-3.2/IMB-MPI1 +IMB_CMD=$MPICH_PREFIX/tests/IMB-4.0/IMB-MPI1 if [ ! -x $IMB_CMD ] then echo " $IMB_CMD: Not Found" diff --git a/MpiApps/apps/runmyapp b/MpiApps/apps/runmyapp index 6df335d..6a4578b 100755 --- a/MpiApps/apps/runmyapp +++ b/MpiApps/apps/runmyapp @@ -51,6 +51,6 @@ MPICH_PREFIX=${MPICH_PREFIX:-`cat .prefix 2>/dev/null`} # This line can run your real application with appropriate arguments #PMB2.2.1/SRC_PMB/PMB-MPI1 "$@" -#$MPICH_PREFIX/tests/IMB-3.2/IMB-MPI1 "$@" +#$MPICH_PREFIX/tests/IMB-4.0/IMB-MPI1 "$@" cd hpl/bin/ICS.$(uname -s).$(./get_mpi_cc.sh) ./xhpl diff --git a/OpenIb_Host/LINUX/Makefile b/OpenIb_Host/LINUX/Makefile index 3c8c47f..8350487 100644 --- a/OpenIb_Host/LINUX/Makefile +++ b/OpenIb_Host/LINUX/Makefile @@ -286,8 +286,10 @@ package: echo "$(RELEASE_DIR)/IntelOPA-Tools-FF.$$ver.tgz" >> $(TL_DIR)/dist_files; \ echo "$(RELEASE_DIR)/IntelOPA-Tools.$$ver.tgz" >> $(TL_DIR)/packaged_files; \ echo "$(RELEASE_DIR)/IntelOPA-Tools.$$ver.tgz" >> $(TL_DIR)/dist_files; \ - echo "$(RELEASE_DIR)/opa-snapconfig$${vers}-$${MKRPM_REL}$${arch}.$(EXT)" >> $(TL_DIR)/packaged_files; \ - echo "$(RELEASE_DIR)/opa-snapconfig$${vers}-$${MKRPM_REL}$${arch}.$(EXT)" >> $(TL_DIR)/dist_files; \ + if [ "$(OPA_FEATURE_SET)" != "opa10" ]; then \ + echo "$(RELEASE_DIR)/opa-snapconfig$${vers}-$${MKRPM_REL}$${arch}.$(EXT)" >> $(TL_DIR)/packaged_files; \ + echo "$(RELEASE_DIR)/opa-snapconfig$${vers}-$${MKRPM_REL}$${arch}.$(EXT)" >> $(TL_DIR)/dist_files; \ + fi; \ final_package: mkdir -p $(RELEASE_DIR) @@ -318,8 +320,10 @@ final_package: cp $(RPMSDIR)/opa-libopamgt$(SEPARATOR)$${MKRPM_VER}-$${MKRPM_REL}$(RPM_EXT) $$basicrpmdir/ || echo "ERR""OR: cp $$basicrpmdir."; \ cp $(RPMSDIR)/opa-libopamgt-$(DEVEL)$(SEPARATOR)$${MKRPM_VER}-$${MKRPM_REL}$(RPM_EXT) $$basicrpmdir/ || echo "ERR""OR: cp $$basicrpmdir."; \ cp $(RPMSDIR)/opa-mpi-apps$(SEPARATOR)$${MKRPM_VER}-$${MKRPM_REL}$(RPM_EXT) $$rpmdir/ || echo "ERR""OR: cp $$rpmdir."; \ - cp $(RPMSDIR)/opa-snapconfig$(SEPARATOR)$${MKRPM_VER}-$${MKRPM_REL}$(RPM_EXT) $$dir/ || echo "ERR""OR: cp $$dir."; \ - cp $(RPMSDIR)/opa-snapconfig$(SEPARATOR)$${MKRPM_VER}-$${MKRPM_REL}$(RPM_EXT) $(RELEASE_DIR)/ || echo "ERR""OR: cp $$dir."; \ + if [ "$(OPA_FEATURE_SET)" != "opa10" ]; then \ + cp $(RPMSDIR)/opa-snapconfig$(SEPARATOR)$${MKRPM_VER}-$${MKRPM_REL}$(RPM_EXT) $$dir/ || echo "ERR""OR: cp $$dir."; \ + cp $(RPMSDIR)/opa-snapconfig$(SEPARATOR)$${MKRPM_VER}-$${MKRPM_REL}$(RPM_EXT) $(RELEASE_DIR)/ || echo "ERR""OR: cp $$dir."; \ + fi; \ if [ "$(BUILD_TARGET_OS_VENDOR)" = "redhat" ]; then \ cp $(RPMSDIR)/opa-$(DEBUGINFO)$(SEPARATOR)$${MKRPM_VER}-$${MKRPM_REL}$(DEBUG_EXT) $$rpmdir/; \ fi; \ diff --git a/OpenIb_Host/LINUX/opacapture.sh b/OpenIb_Host/LINUX/opacapture.sh index 891f7d1..59b583d 100755 --- a/OpenIb_Host/LINUX/opacapture.sh +++ b/OpenIb_Host/LINUX/opacapture.sh @@ -206,6 +206,16 @@ echo "Obtaining PCI device list ..." lspci -vvv -xxxx > /$dir/lspci 2>&1 ls -l /dev/ipath* /dev/hfi* /dev/infiniband > /$dir/lsdev +echo "Obtaining processor information ..." +cpucount=$(grep -c processor /proc/cpuinfo) +cpupower -c 0-$((cpucount - 1)) frequency-info > /$dir/cpu-frequency-info 2>&1 +grep . /sys/devices/system/cpu/cpu*/cpufreq/scaling* > /$dir/cpu-scaling-info 2>&1 +grep . /sys/devices/system/cpu/intel_pstate/* > /$dir/cpu-intel_pstate 2>&1 +unset cpucount + +lscpu > /$dir/lscpu 2>&1 +lscpu --extended=CPU,CORE,SOCKET,NODE,BOOK,DRAWER,CACHE,POLARIZATION,ADDRESS,CONFIGURED > /$dir/lscpu-extended 2>&1 + echo "Obtaining environment variables ..." env > /$dir/env 2>&1 @@ -451,13 +461,13 @@ then if [ $mgmt_disabled -eq 0 ] then - /usr/sbin/opareport $port_opt -o snapshot -s -V $router_opt > $hfi_port_dir/snapshot.xml 2>&1 - /usr/sbin/opareport $port_opt -o snapshot -m -M -s -V $router_opt > $hfi_port_dir/snapshot_direct.xml 2>&1 - /usr/sbin/opareport -o links -X $hfi_port_dir/snapshot.xml > $hfi_port_dir/fabric_links 2>&1 - /usr/sbin/opareport -o comps -X $hfi_port_dir/snapshot.xml > $hfi_port_dir/fabric_comps 2>&1 - /usr/sbin/opareport -o errors -X $hfi_port_dir/snapshot.xml > $hfi_port_dir/fabric_errors 2>&1 - /usr/sbin/opareport -o extlinks -X $hfi_port_dir/snapshot.xml > $hfi_port_dir/fabric_extlinks 2>&1 - /usr/sbin/opareport -o slowlinks -X $hfi_port_dir/snapshot.xml > $hfi_port_dir/fabric_slowlinks 2>&1 + /usr/sbin/opareport $port_opt -o snapshot -s -V $router_opt > $hfi_port_dir/snapshot.xml 2> $hfi_port_dir/snapshot.xml.err + /usr/sbin/opareport $port_opt -o snapshot -m -M -s -V $router_opt > $hfi_port_dir/snapshot_direct.xml 2> $hfi_port_dir/snapshot_direct.xml.err + /usr/sbin/opareport -o links -X $hfi_port_dir/snapshot.xml > $hfi_port_dir/fabric_links 2>&1 + /usr/sbin/opareport -o comps -X $hfi_port_dir/snapshot.xml > $hfi_port_dir/fabric_comps 2>&1 + /usr/sbin/opareport -o errors -X $hfi_port_dir/snapshot.xml > $hfi_port_dir/fabric_errors 2>&1 + /usr/sbin/opareport -o extlinks -X $hfi_port_dir/snapshot.xml > $hfi_port_dir/fabric_extlinks 2>&1 + /usr/sbin/opareport -o slowlinks -X $hfi_port_dir/snapshot.xml > $hfi_port_dir/fabric_slowlinks 2>&1 /usr/sbin/opareport -o vfmember -V -d 4 > $hfi_port_dir/fabric_vfmember 2>&1 fi diff --git a/OpenIb_Host/LINUX/opacapture.sh.base b/OpenIb_Host/LINUX/opacapture.sh.base index 891f7d1..59b583d 100755 --- a/OpenIb_Host/LINUX/opacapture.sh.base +++ b/OpenIb_Host/LINUX/opacapture.sh.base @@ -206,6 +206,16 @@ echo "Obtaining PCI device list ..." lspci -vvv -xxxx > /$dir/lspci 2>&1 ls -l /dev/ipath* /dev/hfi* /dev/infiniband > /$dir/lsdev +echo "Obtaining processor information ..." +cpucount=$(grep -c processor /proc/cpuinfo) +cpupower -c 0-$((cpucount - 1)) frequency-info > /$dir/cpu-frequency-info 2>&1 +grep . /sys/devices/system/cpu/cpu*/cpufreq/scaling* > /$dir/cpu-scaling-info 2>&1 +grep . /sys/devices/system/cpu/intel_pstate/* > /$dir/cpu-intel_pstate 2>&1 +unset cpucount + +lscpu > /$dir/lscpu 2>&1 +lscpu --extended=CPU,CORE,SOCKET,NODE,BOOK,DRAWER,CACHE,POLARIZATION,ADDRESS,CONFIGURED > /$dir/lscpu-extended 2>&1 + echo "Obtaining environment variables ..." env > /$dir/env 2>&1 @@ -451,13 +461,13 @@ then if [ $mgmt_disabled -eq 0 ] then - /usr/sbin/opareport $port_opt -o snapshot -s -V $router_opt > $hfi_port_dir/snapshot.xml 2>&1 - /usr/sbin/opareport $port_opt -o snapshot -m -M -s -V $router_opt > $hfi_port_dir/snapshot_direct.xml 2>&1 - /usr/sbin/opareport -o links -X $hfi_port_dir/snapshot.xml > $hfi_port_dir/fabric_links 2>&1 - /usr/sbin/opareport -o comps -X $hfi_port_dir/snapshot.xml > $hfi_port_dir/fabric_comps 2>&1 - /usr/sbin/opareport -o errors -X $hfi_port_dir/snapshot.xml > $hfi_port_dir/fabric_errors 2>&1 - /usr/sbin/opareport -o extlinks -X $hfi_port_dir/snapshot.xml > $hfi_port_dir/fabric_extlinks 2>&1 - /usr/sbin/opareport -o slowlinks -X $hfi_port_dir/snapshot.xml > $hfi_port_dir/fabric_slowlinks 2>&1 + /usr/sbin/opareport $port_opt -o snapshot -s -V $router_opt > $hfi_port_dir/snapshot.xml 2> $hfi_port_dir/snapshot.xml.err + /usr/sbin/opareport $port_opt -o snapshot -m -M -s -V $router_opt > $hfi_port_dir/snapshot_direct.xml 2> $hfi_port_dir/snapshot_direct.xml.err + /usr/sbin/opareport -o links -X $hfi_port_dir/snapshot.xml > $hfi_port_dir/fabric_links 2>&1 + /usr/sbin/opareport -o comps -X $hfi_port_dir/snapshot.xml > $hfi_port_dir/fabric_comps 2>&1 + /usr/sbin/opareport -o errors -X $hfi_port_dir/snapshot.xml > $hfi_port_dir/fabric_errors 2>&1 + /usr/sbin/opareport -o extlinks -X $hfi_port_dir/snapshot.xml > $hfi_port_dir/fabric_extlinks 2>&1 + /usr/sbin/opareport -o slowlinks -X $hfi_port_dir/snapshot.xml > $hfi_port_dir/fabric_slowlinks 2>&1 /usr/sbin/opareport -o vfmember -V -d 4 > $hfi_port_dir/fabric_vfmember 2>&1 fi diff --git a/OpenIb_Host/Makefile b/OpenIb_Host/Makefile index 03fd5da..64047e5 100644 --- a/OpenIb_Host/Makefile +++ b/OpenIb_Host/Makefile @@ -58,7 +58,6 @@ DIRS = \ $(TL_DIR)/Xml \ $(TL_DIR)/IbaTools \ $(TL_DIR)/MpiApps \ - $(TL_DIR)/ShmemApps \ $(TL_DIR)/Iih \ $(TL_DIR)/TestTools \ $(TL_DIR)/IbPrint \ diff --git a/OpenIb_Host/Makefile.tests b/OpenIb_Host/Makefile.tests index eb44419..aea6544 100644 --- a/OpenIb_Host/Makefile.tests +++ b/OpenIb_Host/Makefile.tests @@ -58,8 +58,7 @@ DIRS = \ $(TL_DIR)/InicTools \ $(TL_DIR)/Tests \ $(TL_DIR)/IbaTests \ - $(TL_DIR)/MpiApps \ - $(TL_DIR)/ShmemApps + $(TL_DIR)/MpiApps # DISABLED - MWHEINZ #$(TL_DIR)/L8sim diff --git a/OpenIb_Host/build.env b/OpenIb_Host/build.env index 3c400c6..acd12ac 100644 --- a/OpenIb_Host/build.env +++ b/OpenIb_Host/build.env @@ -1,6 +1,6 @@ # Adjust the environment variables if necessary export PRODUCT=OPENIB_FF -export RELEASE_TAG=10_9_3_1_1 +export RELEASE_TAG=10_10_0_0_445 export BUILD_CONFIG=${BUILD_CONFIG:-"release"} export BUILD_WITH_STACK=OPENIB export LDENVFS= diff --git a/OpenIb_Host/build_label b/OpenIb_Host/build_label index 48f9545..27a01b9 100644 --- a/OpenIb_Host/build_label +++ b/OpenIb_Host/build_label @@ -1 +1 @@ -Build of OPENIB_FF 06/11/19 17:41 Tag: OPENIB_FF_LINUX_opa-10_9_10_9_3_1_1 +Build of OPENIB_FF 10/16/19 23:49 Tag: OPENIB_FF_LINUX_opa-10_10_10_10_0_0_445 diff --git a/OpenIb_Host/build_tests.sh b/OpenIb_Host/build_tests.sh index f61c764..deb8196 100755 --- a/OpenIb_Host/build_tests.sh +++ b/OpenIb_Host/build_tests.sh @@ -68,7 +68,7 @@ cp *.project setenv $testdir cd $TL_DIR # -p will preserve timestamps (and ownership, etc) so that we will # not rebuild unless we need to -cp -r -p Makerules MakeTools opamgt Xml Topology SrpTools InicTools Tests IbaTests IbaTools IbAccess MpiApps ShmemApps Fd $testdir +cp -r -p Makerules MakeTools opamgt Xml Topology SrpTools InicTools Tests IbaTests IbaTools IbAccess MpiApps Fd $testdir if [ "$Cflag" = y ] then # if in-place FF build left builtbin, builtinclude and builtlibs, pick diff --git a/OpenIb_Host/debian/opa-fastfabric.install b/OpenIb_Host/debian/opa-fastfabric.install index 8ed7adb..b5031cf 100644 --- a/OpenIb_Host/debian/opa-fastfabric.install +++ b/OpenIb_Host/debian/opa-fastfabric.install @@ -95,6 +95,7 @@ /usr/sbin/opaextractlink /usr/sbin/opaextractmissinglinks /usr/sbin/opaextractperf +/usr/sbin/opaextractperf2 /usr/sbin/opaextractsellinks /usr/sbin/opaextractstat /usr/sbin/opaextractstat2 @@ -109,6 +110,7 @@ /usr/sbin/opahostsmanalysis /usr/sbin/opaledports /usr/sbin/opalinkanalysis +/usr/sbin/opamergeperf2 /usr/sbin/opapaquery /usr/sbin/opapingall /usr/sbin/opareport diff --git a/OpenIb_Host/ff_build.sh.base b/OpenIb_Host/ff_build.sh.base index 37d51ad..dd457e3 100755 --- a/OpenIb_Host/ff_build.sh.base +++ b/OpenIb_Host/ff_build.sh.base @@ -61,7 +61,7 @@ export BUILD_TARGET_OS_VERSION=${BUILD_TARGET_OS_VERSION:-`uname -r`} setver $BUILD_TARGET_OS_VENDOR $BUILD_TARGET_OS_VERSION export OPA_FEATURE_SET=opa10 -MODULEVERSION=`$TL_DIR/MakeTools/format_releasetag.py $RELEASE_TAG` +MODULEVERSION=`$TL_DIR/MakeTools/format_releasetag.sh $RELEASE_TAG` RELEASE_STRING=IntelOPA-Tools-FF.$BUILD_TARGET_OS_ID.$MODULEVERSION echo "stage.OPENIB_FF.$BUILD_CONFIG/$BUILD_TARGET_OS_VENDOR/$BUILD_TARGET/$RELEASE_STRING" > $1/RELEASE_PATH echo "../bin/$BUILD_TARGET/$BUILD_PLATFORM_OS_VENDOR.$BUILD_PLATFORM_OS_VENDOR_VERSION/lib/$BUILD_CONFIG/" > $1/LIB_PATH diff --git a/OpenIb_Host/ff_filegroups.sh b/OpenIb_Host/ff_filegroups.sh index 9eb584d..e7a0d8f 100644 --- a/OpenIb_Host/ff_filegroups.sh +++ b/OpenIb_Host/ff_filegroups.sh @@ -39,7 +39,7 @@ ff_tools_sbin="opacabletest opacheckload opaextracterror opaextractlink opaledports opaexpandfile opaextractbadlinks opaextractlids opaextractsellinks opaextractmissinglinks opaswenableall opaswdisableall opaverifyhosts opahostadmin opachassisadmin opaswitchadmin opapingall opascpall opasetupssh opashowallports - opauploadall opapaquery opashowmc opa2rm" + opauploadall opapaquery opashowmc opa2rm opaextractperf2 opamergeperf2" ff_tools_misc="ff_funcs opachassisip opagenswitcheshelper chassis_setup switch_setup opagetipaddrtype opafastfabric.conf.def show_counts opacablehealthcron" @@ -59,7 +59,7 @@ ff_mans="opaallanalysis.8 opacabletest.8 opacaptureall.8 opachassisadmin.8 opahostsmanalysis.8 opalinkanalysis.8 opapaquery.8 opapingall.8 opareport.8 opareports.8 opascpall.8 opasetupssh.8 opashowallports.8 opasorthosts.8 opaswitchadmin.8 opatop.8 opauploadall.8 opaverifyhosts.8 opaxlattopology.8 - opashowmc.8 opaxmlextract.8 opaxmlfilter.8 + opashowmc.8 opaxmlextract.8 opaxmlfilter.8 opaextractperf2.8 opamergeperf2.8 opaxmlgenerate.8 opaxmlindent.8 opaswdisableall.8 opaswenableall.8 opafirmware.8 opaextractmissinglinks.8 opa2rm.8" @@ -103,8 +103,4 @@ mpi_apps_files="Makefile mpi_hosts.sample README prepare_run select_mpi run_bw run_batch_script run_batch_cabletest hpl-count.diff groupstress deviation hpl-config/HPL.dat-* hpl-config/README mpicc mpif77" -shmem_apps_files="Makefile mpi_hosts.sample prepare_run README select_mpi run_barrier - run_get_bibw run_get_bw run_get_latency run_put_bibw run_put_bw run_put_latency - run_reduce run_hello run_alltoall shmem-hello.c" - -opasnapconfig_bin="opasnapconfig" +opasnapconfig_bin= diff --git a/OpenIb_Host/ff_filegroups.sh.base b/OpenIb_Host/ff_filegroups.sh.base new file mode 100644 index 0000000..e7a0d8f --- /dev/null +++ b/OpenIb_Host/ff_filegroups.sh.base @@ -0,0 +1,106 @@ +basic_tools_sbin="opacapture opafabricinfo opagetvf opagetvf_env opahfirev + opapacketcapture opaportinfo oparesolvehfiport opasaquery opasmaquery + opainfo" + +basic_tools_sbin_sym="opapmaquery opaportconfig" + +basic_tools_opt="setup_self_ssh usemem opaipcalc stream" + +basic_mans="opacapture.1 opafabricinfo.1 opagetvf.1 + opagetvf_env.1 opahfirev.1 opainfo.1 opapacketcapture.1 opapmaquery.1 + opaportconfig.1 opaportinfo.1 oparesolvehfiport.1 opasaquery.1 + opasmaquery.1" + +basic_configs="opamgt_tls.xml" + +basic_samples="opamgt_tls.xml-sample" + +ff_tools_opt="opaswquery opaswconfigure opaswfwconfigure opaswfwupdate + opaswfwverify opaswping opaswreset" + +ff_tools_exp="basic.exp chassis.exp chassis_configure.exp chassis_fmconfig.exp + chassis_fmcontrol.exp chassis_fmgetconfig.exp chassis_getconfig.exp + chassis_reboot.exp chassis_fmgetsecurityfiles.exp chassis_fmsecurityfiles.exp + chassis_upgrade.exp common_funcs.exp configipoib.exp extmng.exp ff_function.exp + ib.exp opa_to_xml.exp ibtools.exp install.exp ipoibping.exp load.exp mpi.exp + mpiperf.exp mpiperfdeviation.exp network.exp proc_mgr.exp reboot.exp sacache.exp + sm_control.exp switch_capture.exp switch_configure.exp switch_dump.exp + switch_fwverify.exp switch_getconfig.exp switch_hwvpd.exp switch_info.exp + switch_ping.exp switch_reboot.exp switch_upgrade.exp target.exp tools.exp + upgrade.exp tclIndex tcl_proc comm12 front" + +ff_tools_sbin="opacabletest opacheckload opaextracterror opaextractlink + opaextractperf opaextractstat opaextractstat2 opafindgood opafirmware + opagenchassis opagenesmchassis opagenswitches opalinkanalysis opareport + opareports opasorthosts opatop opaxlattopology opaxmlextract + opaxmlfilter opaxmlgenerate opaxmlindent opaallanalysis opacaptureall + opachassisanalysis opacmdall opadownloadall opaesmanalysis opafabricanalysis + opafastfabric opahostsmanalysis opadisablehosts opadisableports opaenableports + opaledports opaexpandfile opaextractbadlinks opaextractlids opaextractsellinks + opaextractmissinglinks opaswenableall opaswdisableall opaverifyhosts opahostadmin + opachassisadmin opaswitchadmin opapingall opascpall opasetupssh opashowallports + opauploadall opapaquery opashowmc opa2rm opaextractperf2 opamergeperf2" + +ff_tools_misc="ff_funcs opachassisip opagenswitcheshelper chassis_setup + switch_setup opagetipaddrtype opafastfabric.conf.def show_counts opacablehealthcron" + +ff_tools_fm="config_generate config_diff config_check config_convert" + +ff_libs_misc="libqlgc_fork.so" + +ff_mans="opaallanalysis.8 opacabletest.8 opacaptureall.8 opachassisadmin.8 + opachassisanalysis.8 opacheckload.8 opacmdall.8 opadisablehosts.8 + opadisableports.8 opadownloadall.8 opaenableports.8 opaledports.8 + opaesmanalysis.8 opaexpandfile.8 opaextractbadlinks.8 opaextracterror.8 + opaextractlids.8 opaextractlink.8 opaextractperf.8 opaextractsellinks.8 + opaextractstat.8 opaextractstat2.8 opafabricanalysis.8 opafastfabric.8 + opafindgood.8 opafmconfigcheck.8 opafmconfigdiff.8 opagenchassis.8 + opagenesmchassis.8 opagenswitches.8 opagentopology.8 opahostadmin.8 + opahostsmanalysis.8 opalinkanalysis.8 opapaquery.8 opapingall.8 opareport.8 + opareports.8 opascpall.8 opasetupssh.8 opashowallports.8 opasorthosts.8 + opaswitchadmin.8 opatop.8 opauploadall.8 opaverifyhosts.8 opaxlattopology.8 + opashowmc.8 opaxmlextract.8 opaxmlfilter.8 opaextractperf2.8 opamergeperf2.8 + opaxmlgenerate.8 opaxmlindent.8 opaswdisableall.8 opaswenableall.8 + opafirmware.8 opaextractmissinglinks.8 opa2rm.8" + +ff_iba_samples="hostverify.sh opatopology_FIs.txt opatopology_links.txt opatopology_SMs.txt + opatopology_SWs.txt linksum_swd06.csv linksum_swd24.csv README.topology + README.xlat_topology minimal_topology.xlsx detailed_topology.xlsx allhosts-sample chassis-sample + hosts-sample switches-sample ports-sample mac_to_dhcp filterFile.txt triggerFile.txt + opamon.conf-sample opamon.si.conf-sample opafastfabric.conf-sample + opa_ca_openssl.cnf-sample opa_comp_openssl.cnf-sample opagentopology esm_chassis-sample" + +help_doc="opatop_group_bw.hlp opatop_group_config.hlp opatop_group_ctg.hlp + opatop_group_focus.hlp opatop_group_info_sel.hlp opatop_img_config.hlp + opatop_pm_config.hlp opatop_port_stats.hlp opatop_summary.hlp opatop_vf_bw.hlp + opatop_vf_info_sel.hlp opatop_vf_config.hlp" + +opasadb_bin="opa_osd_dump opa_osd_exercise opa_osd_perf opa_osd_query opa_osd_query_many opa_osd_load" + +opasadb_header="opasadb.h opasadb_path.h opasadb_route.h opasadb_route2.h" + +opasadb_mans="opa_osd_dump.1 opa_osd_exercise.1 opa_osd_perf.1 opa_osd_query.1" + +opamgt_headers="opamgt.h opamgt_pa.h opamgt_sa.h opamgt_sa_notice.h" + +opamgt_iba_headers="ib_mad.h ib_sa_records.h ib_sd.h ib_sm_types.h + ib_status.h ib_types.h stl_mad_types.h stl_pa_types.h + stl_sa_types.h stl_sd.h stl_sm_types.h stl_types.h" + +opamgt_iba_public_headers="datatypes.h datatypes_osd.h ibyteswap.h ibyteswap_osd.h + ilist.h imath.h imemory.h imemory_osd.h ipackoff.h ipackon.h ispinlock.h + ispinlock_osd.h statustext.h iethernet.h" + +opamgt_examples="paquery.c saquery.c simple_sa_query.c simple_sa_notice.c simple_pa_query.c + job_schedule.c show_switch_cost_matrix.c Makefile README" + +mpi_apps_files="Makefile mpi_hosts.sample README prepare_run select_mpi run_bw + get_selected_mpi.sh get_mpi_cc.sh *.params gen_group_hosts gen_mpi_hosts + mpi_cleanup stop_daemons hpl_dat_gen config_hpl2 run_hpl2 run_lat run_imb run_lat2 + run_bw2 run_bibw2 run_bcast2 run_app runmyapp mpicheck run_mpicheck run_deviation + run_multibw run_mpi_stress run_osu run_cabletest run_allhfilatency run_nxnlatbw + run_alltoall3 run_bcast3 run_bibw3 run_bw3 run_lat3 run_mbw_mr3 run_multi_lat3 + run_batch_script run_batch_cabletest hpl-count.diff groupstress deviation + hpl-config/HPL.dat-* hpl-config/README mpicc mpif77" + +opasnapconfig_bin= diff --git a/OpenIb_Host/ff_install.sh b/OpenIb_Host/ff_install.sh index 97479fe..9430648 100755 --- a/OpenIb_Host/ff_install.sh +++ b/OpenIb_Host/ff_install.sh @@ -32,7 +32,7 @@ mkdir -p ${DESTDIR}/usr/include/opamgt/iba/public mkdir -p ${DESTDIR}/usr/src/opamgt mkdir -p ${DESTDIR}/usr/share/man/man1 mkdir -p ${DESTDIR}/usr/share/man/man8 -mkdir -p ${DESTDIR}/usr/src/opa/{mpi_apps,shmem_apps} +mkdir -p ${DESTDIR}/usr/src/opa/mpi_apps #Binaries and scripts installing (basic tools) #cd builtbin.OPENIB_FF.release @@ -96,10 +96,6 @@ cd ../src/mpi/mpi_apps tar -xzf mpi_apps.tgz -C ${DESTDIR}/usr/src/opa/mpi_apps/ cd ../../ -cd ../src/shmem/shmem_apps -tar -xzf shmem_apps.tgz -C ${DESTDIR}/usr/src/opa/shmem_apps/ -cd ../../ - #Config files cd ../config cp -t ${DESTDIR}/etc/rdma dsap.conf diff --git a/OpenIb_Host/tar_excludes b/OpenIb_Host/tar_excludes index 220c710..3500ba9 100644 --- a/OpenIb_Host/tar_excludes +++ b/OpenIb_Host/tar_excludes @@ -5,6 +5,7 @@ MakeTools/makeself-header.sh MakeTools/makeself.sh MakeTools/regdll.bat MakeTools/regexe.bat +MakeTools/format_releasetag.py MakeTools/ltsign IbAccess/Common/Ibt/ibt.vssscc MpiApps/apps/osu2 @@ -24,6 +25,7 @@ OpenIb_Host/build.kw OpenIb_Host/dist_files OpenIb_Host/FFresults OpenIb_Host/klocwork.env +OpenIb_Host/kwinject.out OpenIb_Host/kwtables/* OpenIb_Host/packaged_files OpenIb_Host/tests_build @@ -32,3 +34,4 @@ OpenIb_Host/opa_feature_settings* opasadb/lib/libopasadb.map.base opasadb/path_tools/load/opasadb.xml.base opasadb/lib/path/op_path_rec.conf.base +*/opasnapconfig* diff --git a/OpenIb_Host/tar_excludes.base b/OpenIb_Host/tar_excludes.base new file mode 100644 index 0000000..3500ba9 --- /dev/null +++ b/OpenIb_Host/tar_excludes.base @@ -0,0 +1,37 @@ +*VXWORKS* +Xml/XmlParser +MakeTools/zisofs-tools +MakeTools/makeself-header.sh +MakeTools/makeself.sh +MakeTools/regdll.bat +MakeTools/regexe.bat +MakeTools/format_releasetag.py +MakeTools/ltsign +IbAccess/Common/Ibt/ibt.vssscc +MpiApps/apps/osu2 +MpiApps/apps/osu-micro-benchmarks-3.8-July12 +MpiApps/apps/hpl-2.2 +MpiApps/apps/*.tgz +MpiApps/apps/PMB2.2.1 +MpiApps/apps/bandwidth +MpiApps/apps/latency +MpiApps/apps/mpi_multibw +MpiApps/apps/imb +MpiApps/apps/NPB* +OpenIb_Host/build.err +OpenIb_Host/build.res +OpenIb_Host/build.warn +OpenIb_Host/build.kw +OpenIb_Host/dist_files +OpenIb_Host/FFresults +OpenIb_Host/klocwork.env +OpenIb_Host/kwinject.out +OpenIb_Host/kwtables/* +OpenIb_Host/packaged_files +OpenIb_Host/tests_build +OpenIb_Host/TESTSresults +OpenIb_Host/opa_feature_settings* +opasadb/lib/libopasadb.map.base +opasadb/path_tools/load/opasadb.xml.base +opasadb/lib/path/op_path_rec.conf.base +*/opasnapconfig* diff --git a/OpenIb_Host/tar_manifest b/OpenIb_Host/tar_manifest index 2414ee1..4f943e6 100644 --- a/OpenIb_Host/tar_manifest +++ b/OpenIb_Host/tar_manifest @@ -13,7 +13,6 @@ Moab OpenIb_Host opasadb opamgt -ShmemApps TestTools Topology Xml diff --git a/OpenIb_Host/update_opa_spec.sh.base b/OpenIb_Host/update_opa_spec.sh.base index c458605..ebb07a0 100755 --- a/OpenIb_Host/update_opa_spec.sh.base +++ b/OpenIb_Host/update_opa_spec.sh.base @@ -38,6 +38,9 @@ sed -i "s/__RPM_FS/OPA_FEATURE_SET=$OPA_FEATURE_SET/g" opa.spec source ./ff_filegroups.sh +sed -i "/__RPM_OPASNAPCONFIG1/d" opa.spec +sed -i "/__RPM_OPASNAPCONFIG2/d" opa.spec + if [ "$id" = "rhel" -o "$id" = "centos" ] then GE_7_4=$(echo "$versionid >= 7.4" | bc) @@ -198,10 +201,6 @@ do do echo "/usr/src/opa/mpi_apps/$i" >> .tmpspec done - for i in $shmem_apps_files - do - echo "/usr/src/opa/shmem_apps/$i" >> .tmpspec - done else echo "$line" >> .tmpspec fi diff --git a/TestTools/extmng.exp b/TestTools/extmng.exp index b513c61..d250d50 100644 --- a/TestTools/extmng.exp +++ b/TestTools/extmng.exp @@ -522,7 +522,7 @@ proc get_portstate { ibnode } { ## Arguments: ## ibnode - ib node of switch, includes hfi/port ## Returns: -## port state as output in "opainfo" command +## port state as output in "opaportinfo" command ## Additional Information: ## global env @@ -535,9 +535,9 @@ proc get_portstate { ibnode } { set hfi_port [ resolve_ibnode $ibnode ] set hfi_port_args [ get_hfi_port_args "$hfi_port" ] - send_unix_cmd "opainfo $hfi_port_args" - set out [expect_list_with_punchlist "$ibnode" "Unable to open hfi:port" 30 { "PortState: [A-Za-z]+" } { "Error"}] - regexp {PortState: ([A-Za-z]+)} $out xx portstate + send_unix_cmd "opaportinfo $hfi_port_args" + set out [expect_list_with_punchlist "$ibnode" "Unable to open hfi:port" 30 { "PortState: +[A-Za-z]+" } { "failed"}] + regexp {PortState: +([A-Za-z]+)} $out xx portstate local_sh_exit diff --git a/Topology/fabricdata.c b/Topology/fabricdata.c index b5e59b6..c607cb0 100644 --- a/Topology/fabricdata.c +++ b/Topology/fabricdata.c @@ -1057,6 +1057,7 @@ PortData* NodeDataAddPort(FabricData_t *fabricp, NodeData *nodep, EUI64 guid, ST QListSetObj(&portp->AllPortsEntry, portp); portp->PortInfo = pPortInfo->PortInfo; portp->EndPortLID = pPortInfo->RID.EndPortLID; + memcpy(portp->LinkDownReasons, pPortInfo->LinkDownReasons, STL_NUM_LINKDOWN_REASONS * sizeof(STL_LINKDOWN_REASON)); if (nodep->NodeInfo.NodeType == STL_NODE_SW) { // a switch only gets 1 port Guid, we save it for switch diff --git a/Topology/focus.c b/Topology/focus.c index 4058d79..d992fdd 100644 --- a/Topology/focus.c +++ b/Topology/focus.c @@ -1738,6 +1738,23 @@ static FSTATUS ParseLinkQualityPoint(FabricData_t *fabricp, char *arg, Point *pP return FindLinkQualityPoint(fabricp, quality, comp, pPoint, find_flag); } +static FSTATUS ParseLinkDownReasonPoint(FabricData_t *fabricp, char *arg, Point *pPoint, uint8 find_flag, char **pp) +{ + uint8 ldr = IB_UINT8_MAX; + char *ldrp; + + ASSERT(! PointValid(pPoint)); + *pp = arg; + if (NULL != (ldrp = ComparePrefix(arg, ":"))) { + *pp = ldrp; + if (FSUCCESS != StringToUint8(&ldr, ldrp, pp, 0, TRUE)) { + fprintf(stderr, "%s: Invalid Link Quality format: '%s'\n", g_Top_cmdname, arg); + return FINVALID_PARAMETER; + } + } + + return FindLinkDownReasonPoint(fabricp, ldr, pPoint, find_flag); +} /* parse the arg string and find the mentioned Point * arg string formats: * gid:subnet:guid @@ -1869,6 +1886,8 @@ FSTATUS ParsePoint(FabricData_t *fabricp, char* arg, Point* pPoint, uint8 find_f status = ParseSmPoint(fabricp, param, pPoint, find_flag, pp); } else if (NULL != (param = ComparePrefix(arg, "linkqual"))) { status = ParseLinkQualityPoint(fabricp, param, pPoint, find_flag, pp); + } else if (NULL != (param = ComparePrefix(arg, "ldr"))) { + status = ParseLinkDownReasonPoint(fabricp, param, pPoint, find_flag, pp); } else { fprintf(stderr, "%s: Invalid format: '%s'\n", g_Top_cmdname, arg); return FINVALID_PARAMETER; diff --git a/Topology/search.c b/Topology/search.c index 0fbe7f2..d0c43dc 100644 --- a/Topology/search.c +++ b/Topology/search.c @@ -2156,6 +2156,58 @@ FSTATUS FindLinkQualityPoint(FabricData_t *fabricp, uint16 quality, LinkQualityC return FSUCCESS; } +FSTATUS FindLinkDownReasonPoint(FabricData_t *fabricp, uint8 ldr, Point *pPoint, uint8 find_flag) +{ + FSTATUS status; + + ASSERT(PointIsInInit(pPoint)); + if (0 == (find_flag & FIND_FLAG_FABRIC)) + return FINVALID_OPERATION; + + if (find_flag & FIND_FLAG_FABRIC) { + LIST_ITEM *p; + for (p=QListHead(&fabricp->AllPorts); p != NULL; p = QListNext(&fabricp->AllPorts, p)) { + PortData *portp = (PortData *)QListObj(p); + + boolean match = FALSE; + int i; + if (fabricp->flags & FF_SMADIRECT) { // SMA only + match = ldr == IB_UINT8_MAX + ? portp->PortInfo.LinkDownReason != STL_LINKDOWN_REASON_NONE + : portp->PortInfo.LinkDownReason == ldr; + match |= ldr == IB_UINT8_MAX + ? portp->PortInfo.NeighborLinkDownReason != STL_LINKDOWN_REASON_NONE + : portp->PortInfo.NeighborLinkDownReason == ldr; + } else { // SA + for (i = 0; i < STL_NUM_LINKDOWN_REASONS; ++i) { + STL_LINKDOWN_REASON *ldrp = &portp->LinkDownReasons[i]; + if (ldrp->Timestamp != 0) { + match = ldr == IB_UINT8_MAX + ? ldrp->LinkDownReason != STL_LINKDOWN_REASON_NONE + : ldrp->LinkDownReason == ldr; + match |= ldr == IB_UINT8_MAX + ? ldrp->NeighborLinkDownReason != STL_LINKDOWN_REASON_NONE + : ldrp->NeighborLinkDownReason == ldr; + } + if (match) break; + } + } + if (match) { + status = PointListAppend(pPoint, POINT_TYPE_PORT_LIST, portp); + if (FSUCCESS != status) + return status; + } + } + } + if (! PointValid(pPoint)) { + fprintf(stderr, "%s: Link Down Reason Not Found: %d\n", g_Top_cmdname, ldr); + return FNOT_FOUND; + } + PointCompress(pPoint); + return FSUCCESS; +} + + // Search through the ExpectedSMs for matching portGuid // FNOT_FOUND - no instances found // FINVALID_PARAMETER - input parameter not valid diff --git a/Topology/snapshot.c b/Topology/snapshot.c index b2b3aee..3244200 100644 --- a/Topology/snapshot.c +++ b/Topology/snapshot.c @@ -2753,7 +2753,96 @@ static IXML_FIELD MulticastFields[] = { }; +static void PortDataXmlOutputDownReason(IXmlOutputState_t *state, const char *tag, void *data) +{ + IXmlOutputDownReasonValue(state, tag, ((STL_LINKDOWN_REASON *)data)->LinkDownReason); +} +static void PortDataXmlParserEndDownReason(IXmlParserState_t *state, const IXML_FIELD *field, void *object, void *parent, XML_Char *content, unsigned len, boolean valid) +{ + uint8 value; + + if (IXmlParseUint8(state, content, len, &value)) + ((STL_LINKDOWN_REASON *)object)->LinkDownReason = value; +} +static void PortDataXmlOutputNeighborDownReason(IXmlOutputState_t *state, const char *tag, void *data) +{ + IXmlOutputDownReasonValue(state, tag, ((STL_LINKDOWN_REASON *)data)->NeighborLinkDownReason); +} +static void PortDataXmlParserEndNeighborDownReason(IXmlParserState_t *state, const IXML_FIELD *field, void *object, void *parent, XML_Char *content, unsigned len, boolean valid) +{ + uint8 value; + + if (IXmlParseUint8(state, content, len, &value)) + ((STL_LINKDOWN_REASON *)object)->NeighborLinkDownReason = value; +} + +// LinkDownReasonLog +static IXML_FIELD LDRLogFields[] = { + { tag:"LinkDownReason", format:'k', format_func:PortDataXmlOutputDownReason, end_func:IXmlParserEndNoop }, + { tag:"LinkDownReason_Int", format:'K', format_func:IXmlOutputNoop, end_func:PortDataXmlParserEndDownReason }, + { tag:"NeighborLinkDownReason", format:'k', format_func:PortDataXmlOutputNeighborDownReason, end_func:IXmlParserEndNoop }, + { tag:"NeighborLinkDownReason_Int", format:'K', format_func:IXmlOutputNoop, end_func:PortDataXmlParserEndNeighborDownReason }, + { tag:"Timestamp", format:'U', IXML_FIELD_INFO(STL_LINKDOWN_REASON, Timestamp) }, + { NULL } +}; + +static void LDRLogEntryXmlFormatAttr(IXmlOutputState_t *state, void *data) +{ + IXmlOutputPrint(state, " idx=\"%d\"", *(int *)data); +} +static void PortDataXmlOutputLDRLog(IXmlOutputState_t *state, const char *tag, void *data) +{ + PortData *portp = (PortData *)data; // data points to PortData + + int i; + for (i = 0; i < STL_NUM_LINKDOWN_REASONS; ++i) { + STL_LINKDOWN_REASON *ldr = &portp->LinkDownReasons[i]; + + if (ldr->Timestamp) { + IXmlOutputStartAttrTag(state, tag, &i, LDRLogEntryXmlFormatAttr); + + IXmlOutputStrUint(state, "LinkDownReason", + StlLinkDownReasonToText(ldr->LinkDownReason), ldr->LinkDownReason); + IXmlOutputStrUint(state, "NeighborLinkDownReason", + StlLinkDownReasonToText(ldr->NeighborLinkDownReason), ldr->NeighborLinkDownReason); + + IXmlOutputUint64(state, "Timestamp", ldr->Timestamp); + + IXmlOutputEndTag(state, tag); + } + } +} + +static void *LDRLogXmlParserStart(IXmlParserState_t *state, void *parent, const char **attr) +{ + PortData *pdata = (PortData *)parent; + int idx = -1; + if (attr == NULL) { + IXmlParserPrintError(state, "Failed to parse idx Attribute"); + return NULL; + } + + int i = 0; + while (attr[i]) { + if (!strcmp("idx", attr[i]) && attr[i+1] != NULL) { + if (attr[i + 1][1] == '\0') { + idx = attr[i + 1][0] - '0'; + if (idx >= 0 && idx < STL_NUM_LINKDOWN_REASONS) { + return &pdata->LinkDownReasons[idx]; + } + } + } + i++; + } + + IXmlParserPrintError(state, "Failed to parse idx Attribute: %d", idx); + return NULL; +} +static void LDRLogXmlParserEnd(IXmlParserState_t *state, const IXML_FIELD *field, void *object, void *parent, XML_Char *content, unsigned len, boolean valid) +{ + return; +} /** ========================================================================= * PortData definitions */ @@ -2881,6 +2970,7 @@ static IXML_FIELD PortDataFields[] = { { tag:"HFICongestionControlTable", format:'k', format_func:PortDataXmlOutputHFICCT, subfields:(IXML_FIELD*)HFICCTFields, start_func:HFICCTXmlParserStart}, { tag:"BundleNextPort", format:'u', IXML_FIELD_INFO(PortData, PortInfo.BundleNextPort) }, { tag:"BundleLane", format:'u', IXML_FIELD_INFO(PortData, PortInfo.BundleLane) }, + { tag:"LinkDownReasonLog", format:'k', format_func:PortDataXmlOutputLDRLog, subfields:LDRLogFields, start_func:LDRLogXmlParserStart, end_func:LDRLogXmlParserEnd }, // structure { NULL } }; diff --git a/Topology/topology.h b/Topology/topology.h index 8cec6f5..38d8449 100644 --- a/Topology/topology.h +++ b/Topology/topology.h @@ -122,6 +122,7 @@ typedef struct PortData_s { uint32 rate; // Active rate for this port STL_LID EndPortLID; // LID to get to device with this port STL_PORT_INFO PortInfo; // do not use LocalPortNum,use PortNum above + STL_LINKDOWN_REASON LinkDownReasons[STL_NUM_LINKDOWN_REASONS]; STL_LED_INFO LedInfo; //Led Info for this port @@ -1032,6 +1033,7 @@ extern ExpectedNode* FindExpectedNodeByNodeGuid(const FabricData_t* fabricp, EUI extern ExpectedNode* FindExpectedNodeByNodeDesc(const FabricData_t* fabricp, const char* nodeDesc, uint8 NodeType); extern ExpectedLink* FindExpectedLinkByOneSide(const FabricData_t* fabricp, EUI64 nodeGuid, uint8 portNum, uint8* side); extern FSTATUS FindLinkQualityPoint(FabricData_t *fabricp, uint16 quality, LinkQualityCompare comp, Point *pPoint, uint8 find_flag); +extern FSTATUS FindLinkDownReasonPoint(FabricData_t *fabricp, uint8 ldr, Point *pPoint, uint8 find_flag); extern FSTATUS FindExpectedSMByPortGuid(FabricData_t *fabricp, EUI64 portGuid); extern FSTATUS FindExpectedSMByNodeGuid(FabricData_t *fabricp, EUI64 nodeGuid); diff --git a/Xml/ixml.c b/Xml/ixml.c index 3888905..17110df 100644 --- a/Xml/ixml.c +++ b/Xml/ixml.c @@ -442,6 +442,21 @@ void IXmlOutputOptionalStrUint(IXmlOutputState_t *state, const char *tag, const IXmlOutputStrUint(state, tag, str, value); } +void IXmlOutputStrUint64(IXmlOutputState_t *state, const char *tag, const char* str, uint64 value) +{ + /* when serializing, we omit the string output tag */ + if (! (state->flags & IXML_OUTPUT_FLAG_SERIALIZE)) { + IXmlOutputStr(state, tag, str); + } + IXmlOutputUint64(state, tag, value); +} +// only output if value != 0 +void IXmlOutputOptionalStrUint64(IXmlOutputState_t *state, const char *tag, const char* str, uint64 value) +{ + if (value) + IXmlOutputStrUint64(state, tag, str, value); +} + void IXmlOutputStrInt(IXmlOutputState_t *state, const char *tag, const char* str, int value) { /* when serializing, we omit the string output and the _Int tag */ diff --git a/Xml/ixml.h b/Xml/ixml.h index 3d6fb19..7e3d6b3 100644 --- a/Xml/ixml.h +++ b/Xml/ixml.h @@ -347,6 +347,8 @@ extern void IXmlOutputStr(IXmlOutputState_t *state, const char *tag, const char* extern void IXmlOutputOptionalStr(IXmlOutputState_t *state, const char *tag, const char* value); extern void IXmlOutputStrUint(IXmlOutputState_t *state, const char *tag, const char* str, unsigned value); extern void IXmlOutputOptionalStrUint(IXmlOutputState_t *state, const char *tag, const char* str, unsigned value); +extern void IXmlOutputStrUint64(IXmlOutputState_t *state, const char *tag, const char* str, uint64 value); +extern void IXmlOutputOptionalStrUint64(IXmlOutputState_t *state, const char *tag, const char* str, uint64 value); extern void IXmlOutputStrInt(IXmlOutputState_t *state, const char *tag, const char* str, int value); extern void IXmlOutputOptionalStrInt(IXmlOutputState_t *state, const char *tag, const char* str, int value); extern void IXmlOutputStruct(IXmlOutputState_t *state, const char *tag, void *data, diff --git a/Xml/ixml_ib.c b/Xml/ixml_ib.c index 5191b27..f2b93c2 100644 --- a/Xml/ixml_ib.c +++ b/Xml/ixml_ib.c @@ -241,6 +241,24 @@ void IXmlOutputOptionalInitReason(IXmlOutputState_t *state, const char *tag, voi IXmlOutputOptionalInitReasonValue(state, tag, *(uint8 *)data); } +/* link down reason */ +void IXmlOutputDownReasonValue(IXmlOutputState_t *state, const char *tag, uint8 value) +{ + IXmlOutputStrUint(state, tag, StlLinkDownReasonToText(value), value); +} +void IXmlOutputOptionalDownReasonValue(IXmlOutputState_t *state, const char *tag, uint8 value) +{ + IXmlOutputOptionalStrUint(state, tag, StlLinkDownReasonToText(value), value); +} +void IXmlOutputDownReason(IXmlOutputState_t *state, const char *tag, void *data) +{ + IXmlOutputDownReasonValue(state, tag, *(uint8 *)data); +} +void IXmlOutputOptionalDownReason(IXmlOutputState_t *state, const char *tag, void *data) +{ + IXmlOutputOptionalDownReasonValue(state, tag, *(uint8 *)data); +} + /* typically a bitfield, so need to call with value instead of ptr */ void IXmlOutputPortPhysStateValue(IXmlOutputState_t *state, const char *tag, uint8 value) { diff --git a/Xml/ixml_ib.h b/Xml/ixml_ib.h index d3a8a84..ebfa4a3 100644 --- a/Xml/ixml_ib.h +++ b/Xml/ixml_ib.h @@ -68,6 +68,10 @@ extern void IXmlOutputInitReasonValue(IXmlOutputState_t *state, const char *tag, extern void IXmlOutputOptionalInitReasonValue(IXmlOutputState_t *state, const char *tag, uint8 value); extern void IXmlOutputInitReason(IXmlOutputState_t *state, const char *tag, void *data); extern void IXmlOutputOptionalInitReason(IXmlOutputState_t *state, const char *tag, void *data); +extern void IXmlOutputDownReasonValue(IXmlOutputState_t *state, const char *tag, uint8 value); +extern void IXmlOutputOptionalDownReasonValue(IXmlOutputState_t *state, const char *tag, uint8 value); +extern void IXmlOutputDownReason(IXmlOutputState_t *state, const char *tag, void *data); +extern void IXmlOutputOptionalDownReason(IXmlOutputState_t *state, const char *tag, void *data); /* typically a bitfield, so need to call with value instead of ptr */ extern void IXmlOutputPortPhysStateValue(IXmlOutputState_t *state, const char *tag, uint8 value); extern void IXmlOutputPortOptionalPhysStateValue(IXmlOutputState_t *state, const char *tag, uint8 value); diff --git a/opa-ff.spec.in b/opa-ff.spec.in index 08fc80a..3be4061 100644 --- a/opa-ff.spec.in +++ b/opa-ff.spec.in @@ -1,6 +1,6 @@ Name: opa -Version: 10.9.2.2 -Release: 1%{?dist} +Version: 10.10.0.0 +Release: 445%{?dist} Summary: Intel Omni-Path basic tools and libraries for fabric managment. Group: System Environment/Libraries @@ -18,7 +18,7 @@ __RPM_DEBUG_PKG %description This package contains the tools necessary to manage an Intel(R) Omni-Path Architecture fabric. -IFSComponent: Tools_FF 10.9.2.2.1%{?dist} +IFSComponent: Tools_FF 10.10.0.0.445%{?dist} %package basic-tools Summary: Managment level tools and scripts. @@ -35,7 +35,7 @@ Epoch: 1 %description basic-tools Contains basic tools for fabric managment necessary on all compute nodes. -IFSComponent: Tools_FF 10.9.2.2.1%{?dist} +IFSComponent: Tools_FF 10.10.0.0.445%{?dist} %package fastfabric Summary: Management level tools and scripts. @@ -48,7 +48,7 @@ Epoch: 1 %description fastfabric Contains tools for managing fabric on a managment node. -IFSComponent: Tools_FF 10.9.2.2.1%{?dist} +IFSComponent: Tools_FF 10.10.0.0.445%{?dist} %package address-resolution Summary: Contains Address Resolution manager @@ -62,18 +62,7 @@ Epoch: 1 %description address-resolution This package contains the ibacm distributed SA provider (dsap) for name and address resolution on OPA platform. It also contains the library and tools to access the shared memory database exported by dsap. -IFSComponent: Tools_FF 10.9.2.2.1%{?dist} - -#opasnapconfig -%package snapconfig -Summary: Configure fabric with snapshot file -Group: System Environment/Libraries -AutoReq: no -Requires: opa-fastfabric - -%description snapconfig -Parse information from provided snapshot file and issue packets to program -IFSComponent: Tools_FF 10.9.2.2.1%{?dist} +IFSComponent: Tools_FF 10.10.0.0.445%{?dist} %package libopamgt Summary: Omni-Path management API library @@ -82,7 +71,7 @@ Requires: __RPM_REQ_OPAMGT %description libopamgt This package contains the library necessary to build applications that interface with an Omni-Path FM. -IFSComponent: Tools_FF 10.9.2.2.1%{?dist} +IFSComponent: Tools_FF 10.10.0.0.445%{?dist} %package libopamgt-devel @@ -92,7 +81,7 @@ Requires: __RPM_REQ_OPAMGT_DEV %description libopamgt-devel This package contains the necessary headers for opamgt development. -IFSComponent: Tools_FF 10.9.2.2.1%{?dist} +IFSComponent: Tools_FF 10.10.0.0.445%{?dist} %prep #rm -rf %{_builddir}/* @@ -159,9 +148,6 @@ __RPM_FF_FILES %config(noreplace) %{_sysconfdir}/rdma/op_path_rec.conf %{_sysconfdir}/rdma/opasadb.xml -%files snapconfig -__RPM_SNAP_FILES - %files libopamgt /usr/lib/libopamgt.* diff --git a/opamgt/src/opamgt_sa.c b/opamgt/src/opamgt_sa.c index 0fdf75a..c5dd907 100644 --- a/opamgt/src/opamgt_sa.c +++ b/opamgt/src/opamgt_sa.c @@ -789,6 +789,13 @@ FSTATUS omgt_input_value_conversion(OMGT_QUERY *output_query, QUERY_INPUT_VALUE output_query->InputValue.TraceRecord.GidPair.SourceGid = old_query->GidPair.SourceGid; break; + case InputTypeLid: + output_query->InputValue.TraceRecord.Lid.DLid = + old_query->Lid; + /* SourceGid is a new field for this InputType */ + if (source_gid.AsReg64s.H == 0 || source_gid.AsReg64s.L == 0) return FERROR; + output_query->InputValue.TraceRecord.Lid.SourceGid = source_gid; + break; default: return FNOT_FOUND; } break; @@ -1675,6 +1682,17 @@ static FSTATUS omgt_query_sa_internal(struct omgt_port *port, OMGT_QUERY *pQuery pPR->Reversible = 1; pPR->NumbPath = PATHRECORD_NUMBPATH; break; + case InputTypeLid: + mad.SaHdr.ComponentMask = IB_PATH_RECORD_COMP_DLID | + IB_PATH_RECORD_COMP_SLID | + IB_PATH_RECORD_COMP_REVERSIBLE | + IB_PATH_RECORD_COMP_NUMBPATH; + (void)omgt_port_get_port_lid(port, (uint32_t *)&pPR->SLID); + pPR->DLID = pQuery->InputValue.TraceRecord.Lid.DLid; + pPR->Reversible = 1; + pPR->NumbPath = PATHRECORD_NUMBPATH; + break; + default: OMGT_OUTPUT_ERROR(port, "Query not supported by opamgt: Input=%s, Output=%s\n", iba_sd_query_input_type_msg(pQuery->InputType), diff --git a/update_opa_spec.sh b/update_opa_spec.sh index 7865b0e..8f31c44 100755 --- a/update_opa_spec.sh +++ b/update_opa_spec.sh @@ -52,6 +52,9 @@ sed -i "s/__RPM_FS/OPA_FEATURE_SET=$OPA_FEATURE_SET/g" $to source ./OpenIb_Host/ff_filegroups.sh +sed -i "/__RPM_OPASNAPCONFIG1/d" $to +sed -i "/__RPM_OPASNAPCONFIG2/d" $to + if [ "$id" = "rhel" -o "$id" = "centos" ] then GE_7_4=$(echo "$versionid >= 7.4" | bc) @@ -210,10 +213,6 @@ do do echo "/usr/src/opa/mpi_apps/$i" >> .tmpspec done - for i in $shmem_apps_files - do - echo "/usr/src/opa/shmem_apps/$i" >> .tmpspec - done else echo "$line" >> .tmpspec fi