ethextractstat2(8)

πŸ“¦ version 12.1.0.1, in centos-stream 9, fedora 43, fedora 44, opensuse-leap 16.0

πŸ¦‹ ethextractstat2 β€” NAME

okay so bestie, listen: ethextractstat2 does a per link error analysis of a fabric and hands you augmented info from a topology_file β€” including all the error counters. πŸ‘‘

The output is in a CSV format, so it's giving spreadsheet-ready, or you can parse it with other scripts, whatever slays for you. Also important: ethextractstat2 is a front end to the ethreport and ethxmlextract tools. And yes, this script can be used as a sample for creating custom reports. periodt. πŸ’…


Syntax

ethextractstat2 topology_file [ethreport options]

✨ Options ✨

  • --help β€” produces full help text. all of it. every crumb. πŸ“
  • topology_file β€” specifies the topology_file to use. the whole vibe starts here.
  • ethreport options β€” the following options are passed to ethreport. This subset is considered typical and useful for this command. And heads up, by design, the tool ignores the -o/--output report option. like, it simply will not hear it. πŸ™ˆ
    • -X/--infile snapshot_input β€” generates a report using the data in the snapshot_input file. snapshot_input must have been generated during a previous -o snapshot run. and you can use - as the snapshot_input to specify stdin. cute, right? ✨
    • -c/--config file β€” specifies the error thresholds configuration file. Default is /etc/eth-tools/ethmon.conf file.
    • -E/--eth config_file β€” specifies the Ethernet management configuration file. Default is /etc/eth-tools/mgt_config.xml file.
    • -p plane β€” name of the enabled plane defined in the Mgt config file. Default is the first enabled plane.
    • -L/--limit β€” limits operation to exact specified focus with -F for port error counters check (-o errors). Normally, the neighbor of each selected port is also checked. Does not affect other reports. no cap.
    • -F/--focus point β€” specifies the focus area for report. Used to limit scope of report. Refer to Point Syntax for details. ⭐

πŸŽ€ Point Syntax πŸŽ€

this is the part where you tell it exactly who you mean. icons only. 🌈

  • ifid:value β€” value is numeric ifid.
  • ifid:value:node β€” value is numeric ifid, selects node with given ifid.
  • ifid:value:port:value2 β€” value is numeric ifid of node, value2 is port number.
  • ifid:value:portid:value2 β€” value is numeric ifid of node, value2 is port id.
  • mgmtifaddr:value β€” value is numeric port mgmtifaddr.
  • ifaddr:value β€” value is numeric node ifaddr.
  • ifaddr:value1:port:value2 β€” value1 is numeric node ifaddr, value2 is port number.
  • ifaddr:value1:portid:value2 β€” value1 is numeric node ifaddr, value2 is port id.
  • chassisid:value β€” value is numeric chassisid.
  • chassisid:value1:port:value2 β€” value1 is numeric chassisid, value2 is port number.
  • chassisid:value1:portid:value2 β€” value1 is numeric chassisid, value2 is port id.
  • node:value β€” value is node description (node name).
  • node:value1:port:value2 β€” value1 is node description (node name), value2 is port number.
  • node:value1:portid:value2 β€” value1 is node description (node name), value2 is port id.
  • nodepat:value β€” value is glob pattern for node description (node name).
  • nodepat:value1:port:value2 β€” value1 is the glob pattern for the node description (node name), value2 is port number.
  • nodepat:value1:portid:value2 β€” value1 is the glob pattern for the node description (node name), value2 is port id.
  • nodedetpat:value β€” value is glob pattern for node details.
  • nodedetpat:value1:port:value2 β€” value1 is the glob pattern for the node details, value2 is port number.
  • nodedetpat:value1:portid:value2 β€” value1 is the glob pattern for the node details, value2 is port id.
  • nodetype:value β€” value is node type (SW or NIC).
  • nodetype:value1:port:value2 β€” value1 is node type (SW or NIC), value2 is port number.
  • nodetype:value1:portid:value2 β€” value1 is node type (SW or NIC), value2 is port id.
  • rate:value β€” value is string for rate (25g, 50g, 75g, 100g), omits switch mgmt port 0.
  • portstate:value β€” value is a string for state (up, down, testing, unknown, dormant, notactive).
  • portphysstate:value β€” value is a string for PHYs state (other, unknown, operational, standby, shutdown, reset).
  • mtucap:value β€” value is MTU size (maximum size 65535), omits switch mgmt port 0.
  • linkdetpat:value β€” value is glob pattern for link details.
  • portdetpat:value β€” value is glob pattern for port details.
  • nodepatfile:FILENAME β€” specifies the name of file with the list of nodepats or node descriptions.
  • nodepairpatfile:FILENAME β€” specifies the name of file with the list of node pairs, separated by a colon.
  • ldr β€” specifies the ports with a non-zero link down reason or neighbor link down reason.
  • ldr:value β€” specifies the ports with a link down reason or neighbor link down reason equal to value.

🫢 The part of the script that does the thing

The portion of the script that calls ethreport and ethxmlextract follows:

ethreport -x -d 10 -s -o errors -T $@ | ethxmlextract -d \;
-e Rate -e MTU -e Internal -e LinkDetails -e CableLength -e CableLabel
-e CableDetails -e Port.NodeGUID -e Port.PortGUID -e Port.PortNum
-e Port.PortId
-e Port.PortType -e Port.NodeDesc -e Port.PortDetails
-e PortXmitData.Value -e PortXmitPkts.Value -e PortRcvData.Value
-e PortRcvPkts.Value -e SymbolErrors.Value -e LinkErrorRecovery.Value
-e LinkDowned.Value -e PortRcvErrors.Value
-e PortRcvRemotePhysicalErrors.Value -e PortRcvSwitchRelayErrors.Value
-e PortXmitConstraintErrors.Value -e PortRcvConstraintErrors.Value
-e LocalLinkIntegrityErrors.Value -e ExcessiveBufferOverrunErrors.Value

🌸 Examples 🌸

run it with just the topology file, iconic behavior:

ethextractstat2 topology_file

or bring your own config file, main character energy:

ethextractstat2 topology_file -c my_ethmon.conf

okay that's literally the whole thing bestie, you're so ready. 🧚✨

this was ethextractstat2(8) from the EFSFFCLIRG man page set. Copyright(C) 2020-2024, Intel Corporation. mwah, go run it πŸ’–πŸ‘‘
πŸ“¦ where this page comes from