.\" .\" *********************************************************************
.\" .\" *                                                                   *
.\" .\" *             Copyright 2020-2024, Intel Corporation                *
.\" .\" *                                                                   *
.\" .\" *                       All Rights Reserved.                        *
.\" .\" *                                                                   *
.\" .\" *********************************************************************

.TH ethextractstat2 8 "Intel Corporation" "Copyright(C) 2020\-2024" "EFSFFCLIRG (Man Page)"
.SH NAME
ethextractstat2


.PP
Performs a per link 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. ethextractstat2 is a front end to the ethreport and ethxmlextract tools. This script can be used as a sample for creating custom reports.
.SH Syntax
ethextractstat2 topology\(ulfile [ethreport  \fIoptions\fR]
.SH Options

.TP 10
--help

Produces full help text.

.TP 10
topology\(ulfile

Specifies topology\(ulfile to use.

.TP 10
ethreport \fIoptions\fR

The following options are passed to ethreport. This subset is considered typical and useful for this command. By design, the tool ignores -o/--output report option.

.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. \[aq]-\[aq] may be used as the snapshot\(ulinput to specify stdin.

.RE

.RS
.TP 10

.sp
-c/--config \fIfile\fR
Specifies the error thresholds configuration file. Default is /etc/eth-tools/ethmon.conf file.

.RE

.RS
.TP 10

.sp
-E/--eth \fIconfig\(ulfile\fR
Specifies the Ethernet management configuration file. Default is /etc/eth-tools/mgt\(ulconfig.xml file.

.RE

.RS
.TP 10

.sp
-p \fIplane\fR
Name of the enabled plane defined in Mgt config file. Default is the first enabled plane.

.RE

.RS
.TP 10

.sp
-L/--limit
Limits operation to exact specified focus with -F for port error counters check (-o \fIerrors\fR). Normally, the neighbor of each selected port is also checked. Does not affect other reports.

.RE

.RS
.TP 10

.sp
-F/--focus \fIpoint\fR
Specifies the focus area for report. Used to limit scope of report. Refer to
\fIPoint Syntax\fR
for details.

.RE


.SH Point Syntax

.TP 10
ifid:\fIvalue\fR

\fIvalue\fR is numeric ifid.

.TP 10
ifid:\fIvalue\fR:node

\fIvalue\fR is numeric ifid, selects node with given ifid.

.TP 10
ifid:\fIvalue\fR:port:\fIvalue2\fR

\fIvalue\fR is numeric ifid of node, \fIvalue2\fR is port number.

.TP 10
ifid:\fIvalue\fR:portid:\fIvalue2\fR

\fIvalue\fR is numeric ifid of node, \fIvalue2\fR is port id.

.TP 10
mgmtifaddr:\fIvalue\fR

\fIvalue\fR is numeric port mgmtifaddr.

.TP 10
ifaddr:\fIvalue\fR

\fIvalue\fR is numeric node ifaddr.

.TP 10
ifaddr:\fIvalue1\fR:port:\fIvalue2\fR

\fIvalue1\fR is numeric node ifaddr, \fIvalue2\fR is port number.

.TP 10
ifaddr:\fIvalue1\fR:portid:\fIvalue2\fR

\fIvalue1\fR is numeric node ifaddr, \fIvalue2\fR is port id.

.TP 10
chassisid:\fIvalue\fR

\fIvalue\fR is numeric chassisid.

.TP 10
chassisid:\fIvalue1\fR:port:\fIvalue2\fR

\fIvalue1\fR is numeric chassisid, \fIvalue2\fR is port number.

.TP 10
chassisid:\fIvalue1\fR:portid:\fIvalue2\fR

\fIvalue1\fR is numeric chassisid, \fIvalue2\fR is port id.

.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
node:\fIvalue1\fR:portid:\fIvalue2\fR

\fIvalue1\fR is node description (node name), \fIvalue2\fR is port id.

.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
nodepat:\fIvalue1\fR:portid:\fIvalue2\fR

\fIvalue1\fR is the glob pattern for the node description (node name), \fIvalue2\fR is port id.

.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
nodedetpat:\fIvalue1\fR:portid:\fIvalue2\fR

\fIvalue1\fR is the glob pattern for the node details, \fIvalue2\fR is port id.

.TP 10
nodetype:\fIvalue\fR

\fIvalue\fR is node type (SW or NIC).

.TP 10
nodetype:\fIvalue1\fR:port:\fIvalue2\fR

\fIvalue1\fR is node type (SW or NIC), \fIvalue2\fR is port number.

.TP 10
nodetype:\fIvalue1\fR:portid:\fIvalue2\fR

\fIvalue1\fR is node type (SW or NIC), \fIvalue2\fR is port id.

.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 (up, down, testing, unknown, dormant, notactive).

.TP 10
portphysstate:\fIvalue\fR

\fIvalue\fR is a string for PHYs state (other, unknown, operational, standby, shutdown, reset).

.TP 10
mtucap:\fIvalue\fR

\fIvalue\fR is MTU size (maximum size 65535), omits switch mgmt port 0.

.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
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 ethreport and ethxmlextract follows:
.PP

.br
ethreport -x -d 10 -s -o errors -T $@ | ethxmlextract -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.PortId
.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

.br

.SH Examples
ethextractstat2 topology\(ulfile
.br

ethextractstat2 topology\(ulfile -c my\(ulethmon.conf
